/* Wepro landings — shared styles
   Used by public/new.html (dark) and public/course/*.html (light, <html class="theme-light">).
   Tokens and base, the site header, buttons, lead forms and modal, the sticky bar on phones,
   the footer. Page-specific sections stay in each page's own <style>. */

/* ═══════════════ Tokens & reset ═══════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Dark is the default theme (new.html); <html class="theme-light"> switches a page to light */
:root {
    color-scheme: dark;
    --bg: #030407;
    --bg-elevated: #07090f;
    --text: #f2f4f8;
    --text-muted: #8a8f9c;
    --text-dim: #4a4e58;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --line-hover: rgba(255, 255, 255, 0.32);
    --accent: #1e63e9;
    --accent-glow: rgba(30, 99, 233, 0.35);
    --danger: #ff7a66;

    /* Hover washes, corner ticks, the solid (primary) button */
    --wash: rgba(255, 255, 255, 0.06);
    --wash-strong: rgba(255, 255, 255, 0.08);
    --corner: rgba(255, 255, 255, 0.4);
    --solid-bg: #f2f4f8;
    --solid-fg: #030407;
    --solid-hover: #fff;
    --solid-glow: rgba(120, 160, 255, 0.35);

    /* Glass surfaces, scrims, header pills */
    --glass: rgba(7, 9, 15, 0.72);
    --glass-bar: rgba(3, 4, 7, 0.78);
    --glass-strong: rgba(3, 4, 7, 0.82);
    --scrim: rgba(0, 0, 0, 0.55);
    --scrim-strong: rgba(3, 4, 7, 0.74);
    --panel-top: #0b0e16;
    --shadow: rgba(0, 0, 0, 0.6);
    --pill-bg: rgba(12, 15, 23, 0.72);
    --pill-border: rgba(255, 255, 255, 0.1);
    --pill-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 36px -14px rgba(0, 0, 0, 0.6);
    --link-hover: #a9c0ff;
    --selection: rgba(30, 99, 233, 0.45);
    --selection-fg: #fff;

    --font-display: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Onest', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --pad-x: 32px;
    --gap: 24px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root.theme-light {
    color-scheme: light;
    --bg: #ffffff;
    --bg-elevated: #f4f7fd;
    --text: #0b1b2e;
    --text-muted: #4a5566;
    --text-dim: #5b6b80;
    --line: rgba(11, 27, 46, 0.1);
    --line-strong: rgba(11, 27, 46, 0.2);
    --line-hover: rgba(11, 27, 46, 0.4);
    --accent-glow: rgba(30, 99, 233, 0.3);
    --danger: #c4513b;

    --wash: rgba(11, 27, 46, 0.05);
    --wash-strong: rgba(11, 27, 46, 0.08);
    --corner: rgba(11, 27, 46, 0.35);
    --solid-bg: #1e63e9;
    --solid-fg: #fff;
    --solid-hover: #1655cf;
    --solid-glow: rgba(30, 99, 233, 0.35);
    /* The forming-group card: its gradient's far end, its glow and its label (a course page sets its own) */
    --solid-deep: #1747b0;
    --solid-glow-strong: rgba(30, 99, 233, 0.85);
    --solid-muted: #d6e4ff;

    --glass: rgba(255, 255, 255, 0.82);
    --glass-bar: rgba(249, 251, 254, 0.85);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --scrim: rgba(11, 27, 46, 0.35);
    --scrim-strong: rgba(11, 27, 46, 0.45);
    --panel-top: #fff;
    --shadow: rgba(11, 27, 46, 0.18);
    --pill-bg: rgba(255, 255, 255, 0.72);
    --pill-border: rgba(255, 255, 255, 0.6);
    --pill-shadow: 0 1px 2px rgba(11, 27, 46, 0.04), 0 14px 36px -14px rgba(11, 27, 46, 0.16);
    --link-hover: #1e63e9;
    --selection: rgba(30, 99, 233, 0.18);
    --selection-fg: #0b1b2e;
}

html {
    background: var(--bg);
}

/* Lenis recommended styles */
html.lenis,
html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

svg,
img {
    display: block;
}

::selection {
    background: var(--selection);
    color: var(--selection-fg);
}

:focus-visible {
    outline: 1px solid var(--text);
    outline-offset: 4px;
}

.nobr {
    white-space: nowrap;
}

/* ═══════════════ Layout primitives ═══════════════ */
.container {
    width: 100%;
    padding: 0 var(--pad-x);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
}

.section {
    position: relative;
    padding: 96px 0;
}

.mono {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.mono-lg {
    font-size: 11px;
    letter-spacing: 0.2em;
}

.dim {
    color: var(--text-dim);
}

.divider {
    height: 1px;
    width: 100%;
    background: var(--line);
}

.arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.link-arrow:hover {
    color: var(--text);
}

.link-arrow:hover .arrow {
    transform: translate(2px, -2px);
}

/* Corner ticks — short L-shaped marks in the top-right and
   bottom-left corners, drawn over the 1px border. */
.corners {
    position: relative;
}

.corners::before,
.corners::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    border: 0 solid var(--corner);
    transition:
        top 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.corners::before {
    top: -1px;
    right: -1px;
    border-top-width: 1px;
    border-right-width: 1px;
}

.corners::after {
    bottom: -1px;
    left: -1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
}

/* ═══════════════ Header — the main site's header (components/HeaderModule.vue) ═══════════════
   Same structure and full width; coloured by the page theme (dark on new.html, light on the course pages).
   Pills on desktop, a solid bar with a drop-down menu below 1100px. */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    font-family: var(--font-body);
    border-bottom: 1px solid var(--line);
    background: var(--glass-bar);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    backdrop-filter: saturate(160%) blur(20px);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px var(--pad-x);
}

.sh-logo {
    display: flex;
    align-items: center;
}

.sh-logo img {
    width: 120px;
    height: auto;
}

.sh-links {
    display: flex;
    gap: 28px;
}

.sh-links a {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-muted);
    transition: color 0.15s;
}

.sh-links a:hover {
    color: var(--text);
}

.sh-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sh-lang {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--wash);
}

.sh-lang a,
.sh-lang span {
    padding: 6px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition:
        background 0.15s,
        color 0.15s;
}

.sh-lang a:hover {
    color: var(--text);
}

.sh-lang .is-active {
    background: var(--text);
    color: var(--bg);
}

.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition:
        transform 0.12s ease,
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.25s ease;
}

.sh-btn:active {
    transform: translateY(1px) scale(0.99);
}

/* Primary = the landing's solid white action */
.sh-btn-primary {
    background: var(--solid-bg);
    color: var(--solid-fg);
}

.sh-btn-primary:hover {
    background: var(--solid-hover);
    box-shadow: 0 0 28px var(--solid-glow);
}

.sh-btn-outline {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.sh-btn-outline:hover {
    background: var(--wash-strong);
    box-shadow: inset 0 0 0 1px var(--line-hover);
}

.sh-burger {
    display: none;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--wash);
    color: var(--text);
    transition:
        background 0.15s,
        transform 0.12s;
}

.sh-burger:hover {
    background: var(--wash-strong);
}

.sh-burger:active {
    transform: scale(0.94);
}

.sh-burger .icon-close,
.sh-burger.is-open .icon-open {
    display: none;
}

.sh-burger.is-open .icon-close {
    display: block;
}

/* Drop-down menu under the bar */
.sh-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 100%);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    /* Opaque: the hero headline must not show through the menu */
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px -12px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        transform 0.22s ease,
        opacity 0.18s ease,
        visibility 0s linear 0.22s;
}

.sh-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
        transform 0.22s ease,
        opacity 0.18s ease,
        visibility 0s linear 0s;
}

.sh-drawer-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px var(--pad-x) 24px;
}

.sh-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sh-drawer-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.sh-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sh-drawer-links a,
.sh-drawer-value {
    padding: 4px 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text);
    transition: color 0.15s;
}

.sh-drawer-links a:hover,
.sh-drawer-value:hover {
    color: var(--link-hover);
}

.sh-drawer-socials {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sh-drawer-socials a {
    padding: 4px 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s;
}

.sh-drawer-socials a:hover {
    color: var(--text);
}

.sh-drawer-lang {
    align-self: flex-start;
    margin-top: 4px;
}

.sh-drawer-close {
    align-self: center;
    width: min(100%, 320px);
    margin-top: 8px;
    padding: 14px 32px;
}

.sh-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--scrim);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0s linear 0.2s;
}

.sh-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.2s ease,
        visibility 0s linear 0s;
}

/* The full nav needs ~1060px — narrower, the links would wrap: solid bar + burger */
@media (max-width: 1099px) {
    .sh-pc {
        display: none !important;
    }

    .sh-burger {
        display: grid;
    }
}

/* The smallest phones (320–374px): logo, «Начать учиться» and the burger fit one row */
@media (max-width: 374px) {
    .site-header-inner {
        gap: 12px;
    }

    .sh-logo img {
        width: 92px;
    }

    .sh-cta {
        gap: 8px;
    }

    .sh-cta .sh-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Desktop: transparent bar with three frosted pills (getlayers.ai reference) */
@media (min-width: 1100px) {
    .site-header {
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-bottom: 0;
        /* Only the pills take clicks — the page stays clickable between them */
        pointer-events: none;
    }

    .site-header-inner {
        align-items: stretch;
        gap: 10px;
        padding: 12px var(--pad-x);
    }

    .sh-logo,
    .sh-nav,
    .sh-cta {
        pointer-events: auto;
        background: var(--pill-bg);
        -webkit-backdrop-filter: saturate(160%) blur(20px);
        backdrop-filter: saturate(160%) blur(20px);
        border: 1px solid var(--pill-border);
        border-radius: 999px;
        box-shadow: var(--pill-shadow);
    }

    .sh-logo {
        padding: 6px 20px 6px 14px;
    }

    .sh-logo img {
        width: auto;
        height: 28px;
    }

    .sh-nav {
        display: flex;
        align-items: center;
        padding: 6px 22px;
    }

    .sh-links {
        gap: 4px;
    }

    .sh-links a {
        padding: 8px 14px;
        border-radius: 999px;
        transition:
            background 0.15s,
            color 0.15s;
    }

    .sh-links a:hover {
        background: var(--wash);
    }

    .sh-cta {
        gap: 10px;
        padding: 6px 6px 6px 14px;
    }
}

/* ═══════════════ Buttons — the one system of the landings ═══════════════
   Every button is square-cornered and 48px tall (40px for .btn-sm), with a 1px border:
     .btn-ghost.corners             the secondary action — outline, corner ticks
     .btn-ghost.btn-solid.corners   the primary action — filled with the page's colour
     .btn-text                      a plain text link beside a button
     .btn-icon                      a 48px square for one icon (arrows, Telegram, the card's arrow)
   The labels of the first two are the small mono caps; the header (.sh-*) is the main site's
   and stays as it is. */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.btn-ghost:hover {
    background: var(--wash);
    border-color: var(--line-strong);
}

.btn-ghost:hover::before {
    top: -4px;
    right: -4px;
}

.btn-ghost:hover::after {
    bottom: -4px;
    left: -4px;
}

/* Solid variant — the primary action (free lesson), the one we want clicked */
.btn-solid {
    background: var(--solid-bg);
    border-color: var(--solid-bg);
    color: var(--solid-fg);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.4s ease;
}

.btn-solid:hover {
    background: var(--solid-hover);
    border-color: var(--solid-hover);
    box-shadow: 0 0 32px var(--solid-glow);
}

.btn-sm {
    min-height: 40px;
    padding: 0 16px;
    font-size: 10px;
    gap: 8px;
}

.btn-ghost[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.btn-text {
    position: relative;
    font-size: 14px;
    color: var(--text);
    padding-bottom: 3px;
}

.btn-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-text:hover::after {
    transform: scaleX(1);
}

/* The icon button — the review arrows, the Telegram square of the sticky bar, the arrow on a card */
.btn-icon,
.reviews-arrow,
.sticky-tg {
    flex: none;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        opacity 0.25s ease;
}

.btn-icon:hover,
.reviews-arrow:hover,
.sticky-tg:hover {
    background: var(--wash);
    border-color: var(--line-hover);
}

.btn-icon svg,
.sticky-tg svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ═══════════════ First-screen pieces: ratings, forming group, offer line ═══════════════ */
/* Social proof: map ratings + graduates */
.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
}

.proof-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 32px;
    border-left: 1px solid var(--line);
}

.proof-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.proof-num {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--text);
}

.proof-num svg {
    width: 0.62em;
    height: 0.62em;
    fill: #f6c64f;
    filter: drop-shadow(0 0 8px rgba(246, 198, 79, 0.45));
}

.proof-label {
    transition: color 0.25s ease;
}

a.proof-item:hover .proof-label {
    color: var(--text);
}

/* Forming groups with free spots — real numbers from the API, no fake dates.
           With several groups it rotates like stories: the fill is the timer.
           The loudest thing on the right: a blue glowing card, the course name in display type. */
.hero-group {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    overflow: hidden;
    border: 1px solid rgba(30, 99, 233, 0.8);
    background: linear-gradient(
        135deg,
        rgba(30, 99, 233, 0.3),
        rgba(30, 99, 233, 0.1)
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 50px -18px rgba(30, 99, 233, 0.7);
    text-align: left;
    color: var(--text);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.hero-group::before {
    content: '';
    position: relative;
    z-index: 1;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5b8cff;
    box-shadow: 0 0 14px 3px var(--accent-glow);
    animation: pulse 1.8s ease-in-out infinite;
}

.hero-group:hover {
    border-color: rgba(140, 175, 255, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 22px 60px -16px rgba(30, 99, 233, 0.9);
}

/* «↗» on the right — the card opens the sign-up form */
.hero-group::after {
    content: '↗';
    position: relative;
    z-index: 1;
    flex: none;
    font-size: 20px;
    line-height: 1;
    color: var(--text);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-group:hover::after {
    transform: translate(2px, -2px);
}

.hero-group[hidden] {
    display: none;
}

/* Timer fill: grows left → right with a glowing leading edge (width keeps the edge 1px) */
.hero-group-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: linear-gradient(
        90deg,
        rgba(30, 99, 233, 0.18),
        rgba(30, 99, 233, 0.55)
    );
    pointer-events: none;
}

.hero-group-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: rgba(175, 198, 255, 0.95);
    box-shadow: 0 0 12px 1px rgba(30, 99, 233, 0.9);
}

.hero-group:not(.is-cycling) .hero-group-fill {
    display: none;
}

.hero-group-body {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-group-meta {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #b9cdff;
}

/* Up to two lines: some course names are long («Mobilografiya ayollar uchun») */
.hero-group-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(22px, 1.8vw, 30px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--text);
}

.hero-group-count {
    position: relative;
    flex: none;
    font-size: 11px;
    color: var(--text-muted);
}

.hero-group-count:empty {
    display: none;
}

.hero-offer {
    line-height: 1.8;
}

.hero-offer b {
    font-weight: 500;
    color: var(--text);
}

/* A third line under the title (the course pages: the group's schedule) */
.hero-group-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* Light pages: the card turns solid, in the page's button colour — still the loudest thing on the first screen */
:root.theme-light .hero-group {
    --text: #fff;
    --text-muted: rgba(255, 255, 255, 0.78);
    border-color: var(--solid-bg);
    background: linear-gradient(135deg, var(--solid-bg), var(--solid-deep));
    box-shadow: 0 18px 44px -18px var(--solid-glow-strong);
}

:root.theme-light .hero-group:hover {
    border-color: var(--solid-hover);
    box-shadow: 0 22px 54px -16px var(--solid-glow-strong);
}

:root.theme-light .hero-group::before {
    background: #fff;
    box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.6);
}

:root.theme-light .hero-group-meta {
    color: var(--solid-muted);
}

/* ═══════════════ Video reviews — graduates (cards rendered by common.js) ═══════════════ */
.reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.reviews-nav {
    display: flex;
    gap: 6px;
}

.reviews-arrow[disabled] {
    opacity: 0.3;
    cursor: default;
}

/* min-height: the cards arrive with the script — the block keeps its height meanwhile */
.reviews-strip {
    --review-h: 480px;
    display: flex;
    gap: 12px;
    min-height: var(--review-h);
    padding: 0 var(--pad-x);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--pad-x);
    scrollbar-width: none;
}

.reviews-strip::-webkit-scrollbar {
    display: none;
}

.review {
    position: relative;
    flex: none;
    height: var(--review-h);
    /* All reviews are vertical. 1, 4 and 9 are stored anamorphic (960×540, SAR 81:256)
       but display as 9:16 — the browser applies SAR, the posters are pre-corrected. */
    aspect-ratio: 9 / 16;
    max-width: 86vw;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--line);
    background: #0b0e16;
}

/* Poster + play button; replaced by a <video> with native controls on click */
.review-cover {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.review img,
.review video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* While playing, show the whole frame — a landscape video in a narrow card keeps its captions */
.review video {
    object-fit: contain;
    background: #000;
}

.review img {
    filter: brightness(0.82);
    transition:
        filter 0.5s ease,
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.review:hover img {
    filter: brightness(1);
    transform: scale(1.03);
}

.review-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 40px var(--accent-glow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.review-play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    fill: var(--bg);
}

.review:hover .review-play {
    transform: scale(1.08);
}

.review-time {
    position: absolute;
    left: 14px;
    bottom: 12px;
    color: var(--text);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* Light pages: the cards stay dark (they are video), their labels stay light */
:root.theme-light .review-play svg {
    fill: #0b1b2e;
}

:root.theme-light .review-time {
    color: #fff;
}

/* ═══════════════ Final form box (CTA section) ═══════════════ */
.cta-box {
    width: 100%;
    max-width: 1040px;
    margin-top: 12px;
    padding: 32px;
    border: 1px solid var(--line);
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    text-align: left;
}

/* ═══════════════ Lead forms (shared by the modal and the CTA) ═══════════════ */
.lead-fields {
    display: grid;
    gap: 22px;
}

.cta-box .lead-fields {
    grid-template-columns: 1fr 1fr auto;
    align-items: start;
    gap: 24px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.field-label em {
    font-style: normal;
    color: var(--text-dim);
    margin-left: 6px;
}

.field input {
    width: 100%;
    padding: 10px 0 13px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--text);
    font: 400 16px/1.3 var(--font-body);
    outline: none;
    transition: border-color 0.25s ease;
}

.field input::placeholder {
    color: var(--text-dim);
}

.field input:focus {
    border-bottom-color: var(--text);
}

.field input:focus-visible {
    outline: none;
}

.field.has-error input {
    border-bottom-color: var(--danger);
}

.field-error {
    font-size: 12px;
    line-height: 1.3;
    color: var(--danger);
}

.field-error:empty {
    display: none;
}

.lead-submit {
    white-space: nowrap;
    padding: 0 26px;
}

/* In the one-row CTA form the button sits on the inputs' baseline */
.cta-box .lead-submit {
    margin-top: 19px;
}

.lead-form-modal .lead-submit {
    width: 100%;
    margin-top: 30px;
}

.form-error {
    margin-top: 16px;
    font-size: 13px;
    color: var(--danger);
}

.form-error:empty {
    display: none;
}

.form-fine {
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-dim);
}

.form-fine a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* "Prefer to chat?" — the Telegram alternative under every form */
.form-alt {
    display: inline-flex;
    align-items: center;
    /* On narrow forms the line breaks after the question instead of squeezing into columns */
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.form-alt svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.form-alt b {
    font-weight: 500;
    color: var(--text);
}

.form-alt:hover {
    color: var(--text);
}

.form-alt:hover .arrow {
    transform: translate(2px, -2px);
}

/* Course picked on a card — shown as context, not as a field to fill */
.modal-course {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 24px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    font-size: 14px;
    color: var(--text);
}

.modal-course[hidden] {
    display: none;
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.form-success[hidden],
.lead-form[hidden] {
    display: none;
}

.form-success-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.form-success-text {
    max-width: 520px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ═══════════════ Lead modal ═══════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px var(--pad-x);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.35s ease,
        visibility 0s linear 0.35s;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.35s ease,
        visibility 0s linear 0s;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--scrim-strong);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* The frame carries the corner ticks; the panel inside scrolls on short
   screens (ticks on a scroll container would get clipped). */
.modal-frame {
    position: relative;
    width: 100%;
    max-width: 560px;
    border: 1px solid var(--line);
    background: linear-gradient(
        180deg,
        var(--panel-top) 0%,
        var(--bg-elevated) 100%
    );
    transform: translateY(18px);
    transition: transform 0.5s var(--ease);
}

.modal.is-open .modal-frame {
    transform: none;
}

.modal-panel {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 36px 32px 32px;
    outline: none;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    padding: 6px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    margin: 14px 0 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.modal-sub {
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.modal-bullets {
    list-style: none;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
}

.modal-bullets li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-bullets li::before {
    content: '✦';
    font-size: 11px;
    color: var(--text);
}


/* ═══════════════ Footer ═══════════════ */
.footer {
    padding-top: 80px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.footer-grid {
    row-gap: 40px;
}

.footer-brand {
    grid-column: 1 / span 4;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand img {
    /* Not stretched across the column — a stretched SVG draws its logo centred */
    align-self: flex-start;
    height: 26px;
    width: auto;
    margin-bottom: 6px;
}

.footer-brand p {
    max-width: 300px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.footer-col {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.footer-col:first-of-type {
    grid-column: 6 / span 2;
}

.footer-col .mono:first-child {
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 11px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    flex-wrap: wrap;
    margin-top: 72px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.footer-legal {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-mega {
    width: 100%;
    margin-top: 8px;
    color: var(--text);
}

.footer-mega text {
    font-family: var(--font-display);
    font-weight: 900;
    fill: currentColor;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ═══════════════ Sticky CTA bar (phones) ═══════════════
   The main action stays one tap away between the hero and the final form; the page
   tells initLanding() which elements bound it. */
.sticky-cta {
    display: none;
}

@media (max-width: 767px) {
    .sticky-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 95;
        display: flex;
        gap: 8px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--glass-strong);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
        transform: translateY(110%);
        visibility: hidden;
        transition:
            transform 0.45s var(--ease),
            visibility 0s linear 0.45s;
    }

    .sticky-cta.is-visible {
        transform: none;
        visibility: visible;
        transition:
            transform 0.45s var(--ease),
            visibility 0s linear 0s;
    }

    .sticky-cta .btn-solid {
        flex: 1;
        padding: 0 12px;
    }
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 1279px) {
    .cta-box .lead-fields {
        grid-template-columns: 1fr 1fr;
    }

    .cta-box .lead-submit {
        grid-column: 1 / -1;
        margin-top: 8px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-col,
    .footer-col:first-of-type {
        grid-column: span 4;
    }
}

@media (max-width: 767px) {
    :root {
        --pad-x: 16px;
        --gap: 16px;
    }

    .section {
        padding: 64px 0;
    }

    .cta-box {
        padding: 24px 20px;
    }

    .cta-box .lead-fields {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 12px;
        align-items: end;
    }

    .modal-panel {
        padding: 32px 20px 24px;
        max-height: calc(100dvh - 24px);
    }

    .footer-col,
    .footer-col:first-of-type {
        grid-column: span 6;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-proof {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reviews-strip {
        --review-h: 420px;
    }

    .reviews-nav {
        display: none;
    }

    .proof-item {
        padding: 2px 12px;
    }

    .proof-num {
        font-size: 20px;
    }

    .hero-group {
        gap: 14px;
        padding: 16px 18px;
    }

    .hero-group-title {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-group::before {
        animation: none;
    }
}
