/* ─── HERO (лендинг) ──────────────────────────────────────────────────────
   Главный экран лендинга: градиентный фон, анимированные пилюли,
   заголовок с ротацией, CTA.
   ─────────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 560px;
    background: linear-gradient(150deg, #071e2a 0%, #0c3545 30%, #145f73 65%, #1e8ca6 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Pills canvas */
#pillsBg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-pill {
    position: absolute;
    background: linear-gradient(135deg, rgba(57,160,179,.68), rgba(27,122,148,.52));
    border: 1px solid rgba(100,205,225,.35);
    color: rgba(255,255,255,.9);
    font-weight: 600;
    padding: 6px 15px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(27,122,148,.28);
}

@keyframes pillRise {
    0%   { transform: translateY(22px) scale(.55); opacity: 0; }
    14%  { transform: translateY(-6px) scale(1.12); opacity: .9; }
    22%  { transform: translateY(3px) scale(.97); opacity: .86; }
    55%  { transform: translateY(-175px) scale(1.04) rotate(var(--r, 2deg)); opacity: .78; }
    80%  { transform: translateY(-295px) translateX(calc(var(--dx, 0px) * .55)) scale(.91); opacity: .22; }
    100% { transform: translateY(-385px) translateX(var(--dx, 0px)) scale(.76); opacity: 0; }
}

@keyframes pillRiseTall {
    0%   { transform: translateY(22px) scale(.55); opacity: 0; }
    10%  { transform: translateY(-6px) scale(1.1); opacity: .88; }
    18%  { transform: translateY(3px) scale(.97); opacity: .84; }
    45%  { transform: translateY(-190px) scale(1.03) rotate(var(--r, 2deg)); opacity: .72; }
    72%  { transform: translateY(-370px) translateX(calc(var(--dx, 0px) * .6)) scale(.9); opacity: .35; }
    88%  { transform: translateY(-490px) translateX(calc(var(--dx, 0px) * .85)) scale(.82); opacity: .1; }
    100% { transform: translateY(-560px) translateX(var(--dx, 0px)) scale(.72); opacity: 0; }
}

/* Sparkles */
.sparkle {
    position: absolute;
    color: rgba(80,190,215,.75);
    pointer-events: none;
    animation: sparkTwinkle ease-in-out infinite;
    font-size: 22px;
}

@keyframes sparkTwinkle {
    0%   { opacity: 0;   transform: scale(.1)  rotate(0deg); }
    28%  { opacity: .7;  transform: scale(.85) rotate(70deg); }
    55%  { opacity: 1;   transform: scale(1.0) rotate(140deg); }
    80%  { opacity: .5;  transform: scale(.75) rotate(200deg); }
    100% { opacity: 0;   transform: scale(.1)  rotate(260deg); }
}

/* Overlay — затемняет левую сторону для читаемости текста */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 80% at 28% 55%, rgba(7,30,42,.65) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 10;
    max-width: var(--W);
    margin: 0 auto;
    padding: 60px var(--pad);
    width: 100%;
}

.hero-content {
    max-width: 660px;
}

.hero-headline {
    font-size: clamp(2.2rem, 4vw, 3.375rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 24px;
}

.hero-changing-wrap {
    display: block;
    overflow: hidden;
    height: 2.5em;
    position: relative;
}

.hero-changing {
    display: block;
    animation: hIn .45s cubic-bezier(.22,1,.36,1) both;
}

.hero-changing.out {
    animation: hOut .35s cubic-bezier(.55,0,1,.45) both;
}

@keyframes hIn  { from { transform: translateY(105%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes hOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-105%); opacity: 0; } }

.hero-fixed {
    display: block;
    color: rgba(255,255,255,.75);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: .9em;
    margin-top: 2px;
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: rgba(255,255,255,.6);
    line-height: 1.65;
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.hero-trust {
    font-size: .8rem;
    color: rgba(255,255,255,.35);
    letter-spacing: .05em;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero { min-height: 520px; }
    .hero-inner { padding: 52px 20px 56px; }
    .hero-content { max-width: 100%; }
    .hero-headline { font-size: clamp(1.625rem, 7vw, 2.5rem); line-height: 1.1; }
    .hero-changing-wrap { height: 2.5em; overflow: hidden; }
    .hero-fixed { font-size: .875em; margin-top: 4px; }
    .hero-sub { font-size: .9375rem; max-width: 100%; margin-bottom: 32px; padding-right: 90px; }
    .hero-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
    .hero-trust { font-size: .8125rem; letter-spacing: .01em; display: flex; flex-direction: column; gap: 5px; }
    .ht-sep { display: none; }
    .ht-item::before { content: '·\00a0'; color: rgba(255,255,255,.4); }
}
