/* ===================================================================
   NUVA — Design System v3 · Premium Edition
   Aesthetic: Linear × Stripe × Vercel — minimal, alive, premium
   =================================================================== */

/* ——— Reset ——— */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ——— Design Tokens ——— */
:root {
    color-scheme: light;
    --bg:            #FAFAF9;
    --surface:       #FFFFFF;
    --ink:           #111113;
    --ink-2:         #55555D;
    --ink-3:         #9E9EA7;
    --brand:         #7C3AED;
    --brand-dark:    #6D28D9;
    --brand-light:   #EDE9FE;
    --brand-subtle:  #F5F3FF;
    --border:        #E8E8EC;
    --border-light:  #F4F4F5;
    --success:       #10B981;
    --danger:        #EF4444;

    --text-xs:  0.75rem;
    --text-sm:  0.875rem;
    --text-base: 1rem;
    --text-lg:  1.125rem;
    --text-xl:  1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.5rem;

    --sp-1:  0.25rem;
    --sp-2:  0.5rem;
    --sp-3:  0.75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --sp-32: 8rem;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.07);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.10);

    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 150ms;
    --dur-base: 250ms;
    --dur-slow: 500ms;
    --dur-reveal: 700ms;
}

/* ——— Accessibility ——— */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--sp-4);
    background: var(--ink);
    color: white;
    padding: var(--sp-2) var(--sp-4);
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: top var(--dur-fast) var(--ease);
    opacity: 0;
}
.skip-link:focus {
    top: var(--sp-2);
    opacity: 1;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus { outline: none; }
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

a:focus, button:focus, img:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ——— Layout ——— */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--sp-6);
}

/* ——— Typography ——— */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.1;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, var(--text-5xl)); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, var(--text-3xl)); letter-spacing: -0.035em; }
h3 { font-size: var(--text-xl); }

p {
    font-size: var(--text-base);
    color: var(--ink-2);
    line-height: 1.65;
}

img { display: block; }

/* ——— Scroll Reveal System ——— */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity var(--dur-reveal) var(--ease-out),
        transform var(--dur-reveal) var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 400ms; }

/* ——— Section Header ——— */
.section-header {
    text-align: center;
    margin-bottom: var(--sp-16);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--sp-4);
    padding: var(--sp-1) var(--sp-3);
    background: var(--brand-light);
    border-radius: var(--radius-full);
}

.section-header__title {
    margin-bottom: var(--sp-4);
}

.section-header__subtitle {
    font-size: var(--text-lg);
    color: var(--ink-3);
    max-width: 480px;
    margin: 0 auto;
}

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    min-height: 48px;
    min-width: 44px;
    transition: all var(--dur-base) var(--ease);
    line-height: 1;
    position: relative;
    overflow: hidden;
}

/* Button shine sweep effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s var(--ease);
    pointer-events: none;
}
.btn:hover::before {
    left: 100%;
}

.btn--secondary {
    background: transparent;
    color: var(--ink-2);
    border: 1.5px solid var(--border);
}
.btn--secondary:hover,
.btn--secondary:focus {
    color: var(--ink);
    border-color: var(--ink-3);
}

/* ——— Store Badges (App Store / Google Play) ——— */
.store-badge {
    display: inline-flex;
    align-items: center;
    transition: opacity var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
}
.store-badge img {
    height: 44px;
    width: auto;
    display: block;
}
.header .store-badge,
.header .store-badge img {
    height: 34px;
    min-height: auto;
}
.store-badge:active {
    transform: scale(0.97);
}
@media (hover: hover) {
    .store-badge:hover { opacity: 0.75; }
}

/* ===================================================================
   HEADER — Glassmorphic Premium Nav
   =================================================================== */
.header {
    position: sticky;
    top: 0;
    background: rgba(250, 250, 249, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.header.scrolled {
    background: rgba(250, 250, 249, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.03);
}

.header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: var(--sp-8);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.logo {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    transition: opacity var(--dur-fast) var(--ease);
    line-height: 1;
    flex-shrink: 0;
}
.logo:hover,
.logo:focus { opacity: 0.7; }

.logo__icon {
    border-radius: var(--radius-sm);
    display: block;
}
.logo:hover .logo__icon,
.logo:focus .logo__icon { transform: none; }

/* Navigation */
.nav__list {
    display: flex;
    list-style: none;
    gap: var(--sp-8);
    align-items: center;
}
.nav__link {
    color: var(--ink-3);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    letter-spacing: 0.005em;
    transition: color var(--dur-fast) var(--ease);
    position: relative;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--ink);
    transition: width var(--dur-base) var(--ease);
}
.nav__link:hover,
.nav__link:focus { color: var(--ink); }
.nav__link:hover::after,
.nav__link:focus::after { width: 100%; }

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 3px 4px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.language-switcher__link {
    color: var(--ink-3);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--dur-fast) var(--ease);
    padding: 3px 7px;
    border-radius: 4px;
    line-height: 1;
}
.language-switcher__link:hover { color: var(--ink); }
.language-switcher__link--active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.language-switcher__divider {
    display: none;
}

/* ===================================================================
   HERO — Premium with mesh gradient & grid background
   =================================================================== */
.hero {
    padding: var(--sp-24) 0 0;
    position: relative;
    overflow: hidden;
}

/* Animated mesh gradient background */
.hero::before {
    content: '';
    position: absolute;
    inset: -60% -30%;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
    filter: blur(60px);
    animation: meshMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Fading grid pattern */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(3%, -2%) scale(1.03); }
    66%      { transform: translate(-2%, 3%) scale(0.97); }
}

.hero__content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--sp-16);
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s var(--ease-out) both;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--sp-6);
    padding: 6px 14px;
    background: var(--brand-light);
    border-radius: var(--radius-full);
    border: 1px solid rgba(124, 58, 237, 0.1);
    animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

/* Gradient text — the Linear signature */
.hero__title {
    margin-bottom: var(--sp-5);
    line-height: 1.05;
    text-wrap: balance;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.8s var(--ease-out) 0.15s both;
}

.hero__subtitle {
    font-size: clamp(var(--text-base), 1.2vw + 0.5rem, var(--text-lg));
    margin-bottom: var(--sp-10);
    color: var(--ink-2);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    animation: fadeUp 0.8s var(--ease-out) 0.25s both;
}

.hero__actions {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--sp-8);
    animation: fadeUp 0.8s var(--ease-out) 0.35s both;
}

.hero__proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
    font-size: var(--text-sm);
    color: var(--ink-3);
}

.hero__proof-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.hero__proof-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border);
}

/* Scroll hint. Decorative: hidden from AT, not focusable */
.hero__scroll {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    margin-top: var(--sp-4);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
    text-decoration: none;
    animation: fadeUp 0.8s var(--ease-out) 0.5s both;
    transition: color var(--dur-fast) var(--ease);
}
.hero__scroll:hover { color: var(--ink); }
.hero__scroll svg {
    width: 16px;
    height: 16px;
    animation: scrollNudge 1.8s ease-in-out infinite;
}
@keyframes scrollNudge {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(5px); opacity: 1; }
}

body.lang-mn .hero {
    padding-top: var(--sp-20);
}

body.lang-mn .hero__content {
    margin-bottom: var(--sp-12);
}

body.lang-mn .hero__title {
    max-width: none;
    width: fit-content;
    white-space: nowrap;
    margin-left: auto;
    margin-right: auto;
}

body.lang-mn .hero__subtitle {
    max-width: 50ch;
    margin-bottom: var(--sp-8);
}

body.lang-mn .hero__title {
    max-width: 16ch;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
}

body.lang-mn .comparison__cell--nuva,
body.lang-mn .comparison__cell--tutor {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

@media (min-width: 900px) {
    body.lang-mn #features .section-header {
        max-width: none;
    }

    body.lang-mn #features .section-header__title {
        white-space: nowrap;
    }
}

/* ——— App Preview Carousel ——— */
.app-preview {
    padding: var(--sp-20) 0;
    position: relative;
    z-index: 1;
}

.app-preview__track-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    isolation: isolate;
}

.app-preview__track-wrapper::before,
.app-preview__track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    pointer-events: none;
    z-index: 2;
}
.app-preview__track-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}
.app-preview__track-wrapper::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.app-preview__track {
    display: flex;
    width: max-content;
    flex-wrap: nowrap;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    animation: carouselScroll 96s linear infinite;
}

.app-preview__group {
    display: flex;
    flex-shrink: 0;
    align-items: stretch;
    gap: var(--sp-4);
    padding-right: var(--sp-4);
}

.app-preview__shot {
    flex: 0 0 auto;
    width: clamp(152px, 14vw, 200px);
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(17, 17, 19, 0.06);
    background: var(--border-light);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.app-preview__shot:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 16px 48px rgba(0, 0, 0, 0.12);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes carouselScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* ===================================================================
   SHOWCASE — pinned phone, one screen per feature step
   =================================================================== */
.showcase {
    padding: var(--sp-24) 0 var(--sp-12);
    background: var(--surface);
    position: relative;
}

.showcase__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--sp-16);
    align-items: start;
    max-width: 960px;
    margin: 0 auto;
}

.showcase__steps {
    display: flex;
    flex-direction: column;
}

.showcase__step {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--sp-8) 0;
    opacity: 0.35;
    transform: translateY(8px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.showcase__step.is-active {
    opacity: 1;
    transform: translateY(0);
}

.showcase__eyebrow {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--sp-4);
}

.showcase__title {
    font-size: clamp(1.75rem, 2.4vw + 0.5rem, 2.5rem);
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: var(--sp-4);
    max-width: 14ch;
    text-wrap: balance;
}

.showcase__desc {
    font-size: var(--text-lg);
    color: var(--ink-2);
    max-width: 42ch;
    line-height: 1.65;
}

/* Pinned column: stays centred in the viewport while the steps scroll past */
.showcase__stage {
    position: sticky;
    top: calc(50vh - 340px);
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    justify-content: center;
}

.showcase__phone {
    position: relative;
    width: 300px;
    aspect-ratio: 467 / 1000;
    border-radius: 44px;
    background: #0B0910;
    border: 9px solid #17151C;
    box-shadow:
        0 0 0 1px rgba(17, 17, 19, 0.08),
        0 30px 80px rgba(124, 58, 237, 0.18),
        0 12px 32px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    isolation: isolate;
}
/* Soft brand glow behind the phone, echoing the hero mesh */
.showcase__phone::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 50% 30%, rgba(124, 58, 237, 0.35), transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.showcase__screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out);
}
.showcase__screen.is-active {
    opacity: 1;
    transform: scale(1);
}

.showcase__dots {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.showcase__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background var(--dur-base) var(--ease), transform var(--dur-base) var(--ease-spring);
}
.showcase__dot:hover { background: var(--ink-3); }
.showcase__dot.is-active {
    background: var(--brand);
    transform: scale(1.5);
}

/* ===================================================================
   COMPARISON TABLE — Premium with glow accents
   =================================================================== */
.comparison {
    padding: var(--sp-24) 0;
    background: var(--bg);
}

.comparison__table {
    max-width: 880px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 8px 32px rgba(0,0,0,0.04);
}

.comparison__header {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr;
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
}
.comparison__header .comparison__cell {
    padding: var(--sp-4) var(--sp-6);
    text-align: center;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--ink);
}

.comparison__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    font-weight: 600;
}
.comparison__brand img {
    border-radius: 5px;
    width: 22px;
    height: 22px;
}

.comparison__row {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity var(--dur-slow) var(--ease-out),
        transform var(--dur-slow) var(--ease-out),
        background var(--dur-fast) var(--ease);
}
.comparison__row:last-child { border-bottom: none; }

@media (hover: hover) {
    .comparison__row:hover { background: var(--border-light); }
}

.comparison__cell {
    padding: var(--sp-4) var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comparison__cell--label {
    align-items: flex-start;
    justify-content: center;
}
.comparison__cell--label strong {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
    display: block;
}
.comparison__desc {
    font-size: var(--text-xs);
    color: var(--ink-3);
    font-weight: 400;
}

.comparison__cell--nuva,
.comparison__cell--tutor {
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: var(--sp-2);
}

.comparison__check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--success);
    stroke-width: 3;
}
.comparison__cross {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--danger);
    stroke-width: 3;
    opacity: 0.5;
}

.comparison__cell--nuva span,
.comparison__cell--tutor span {
    font-size: var(--text-sm);
    line-height: 1.4;
}
.comparison__cell--nuva span {
    color: var(--ink);
    font-weight: 500;
}
.comparison__cell--tutor span {
    color: var(--ink-3);
    font-weight: 400;
}

/* ===================================================================
   REELS — Instagram highlights, self-hosted video
   =================================================================== */
/* Straight under the hero: three phones fanned out, the middle one raised,
   so the reels read as the hero visual rather than a gallery */
.reels {
    padding: var(--sp-4) 0 var(--sp-24);
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.reels__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 250px));
    gap: var(--sp-6);
    justify-content: center;
    align-items: end;
    padding-top: var(--sp-4);
}

.reel {
    --tilt: 0deg;
    --lift: 0px;
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--ink);
    border: 1px solid rgba(17, 17, 19, 0.06);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.08);
    transform: rotate(var(--tilt)) translateY(var(--lift));
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.reel:nth-child(1) { --tilt: -3deg; --lift: 16px; }
.reel:nth-child(2) { --lift: -12px; z-index: 1; }
.reel:nth-child(3) { --tilt: 3deg; --lift: 16px; }
@media (hover: hover) {
    .reel:hover {
        transform: rotate(0deg) translateY(calc(var(--lift) - 6px)) scale(1.02);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.06),
            0 24px 56px rgba(124, 58, 237, 0.16);
    }
}

.reel__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Icon only — 36px keeps the footprint the old text pill had.
   Top-left, mirroring the sound button: the reels have burned-in captions
   along the bottom, and native controls appear there in reduced-motion mode */
.reel__cta {
    position: absolute;
    left: var(--sp-3);
    top: var(--sp-3);
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease);
}
.reel__cta:hover,
.reel__cta:focus {
    background: rgba(255, 255, 255, 0.28);
}
.reel__cta svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.reel__sound {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}
.reel__sound:hover,
.reel__sound:focus-visible {
    background: rgba(0, 0, 0, 0.65);
}
.reel__sound svg {
    width: 18px;
    height: 18px;
}
/* Swap the muted / unmuted glyph off one attribute */
.reel__sound .reel__icon--on { display: none; }
.reel__sound[aria-pressed="true"] .reel__icon--on { display: block; }
.reel__sound[aria-pressed="true"] .reel__icon--off { display: none; }

.reels__follow {
    display: block;
    text-align: center;
    margin-top: var(--sp-10);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
}
.reels__follow:hover,
.reels__follow:focus { color: var(--brand); }

@media (max-width: 768px) {
    .reels { animation-delay: 0.2s; }
    .reels__grid { gap: var(--sp-3); }
    .reel { --tilt: 0deg; --lift: 0px; }
    .reel:nth-child(1), .reel:nth-child(3) { --lift: 0px; }
}

/* Phones: one horizontal swipe row, snapping per reel */
@media (max-width: 560px) {
    .reels .container { padding: 0; }
    .reels__grid {
        display: flex;
        gap: var(--sp-3);
        padding: var(--sp-4) var(--sp-4) var(--sp-2);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .reels__grid::-webkit-scrollbar { display: none; }
    .reel {
        flex: 0 0 68vw;
        max-width: 280px;
        scroll-snap-align: center;
    }
}

/* ===================================================================
   OUTCOMES — horizontal row of "with Nuva you can finally" cards
   =================================================================== */
.outcomes {
    /* Left edge lines up with the container, the row runs off the right edge */
    --outcomes-inset: max(var(--sp-6), calc(50vw - 560px + var(--sp-6)));
    padding: var(--sp-24) 0;
    background: var(--bg);
    overflow: hidden;
}
.outcomes .section-header { margin-bottom: var(--sp-10); }

.outcomes__scroller {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--outcomes-inset);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: var(--sp-3) 0 var(--sp-6);
}
.outcomes__scroller::-webkit-scrollbar { display: none; }

.outcomes__track {
    list-style: none;
    display: flex;
    gap: var(--sp-5);
    width: max-content;
    padding-left: var(--outcomes-inset);
    padding-right: var(--sp-6);
}

.outcome {
    --tint-a: #7C3AED;
    --tint-b: #4C1D95;
    position: relative;
    flex: 0 0 auto;
    width: 320px;
    aspect-ratio: 4 / 5;
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius-xl);
    color: white;
    background:
        radial-gradient(120% 90% at 100% 0%, var(--tint-a) 0%, transparent 55%),
        linear-gradient(160deg, var(--tint-b) 0%, #111113 85%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 16px 40px rgba(17, 17, 19, 0.14);
    scroll-snap-align: start;
    overflow: hidden;
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
/* Grain, same texture as the dark CTA, so the cards feel like one family */
.outcome::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
    background-size: 182px;
    opacity: 0.05;
    pointer-events: none;
}
.outcome--1 { --tint-a: #8B5CF6; --tint-b: #4C1D95; }
.outcome--2 { --tint-a: #10B981; --tint-b: #064E3B; }
.outcome--3 { --tint-a: #38BDF8; --tint-b: #0C4A6E; }
.outcome--4 { --tint-a: #F59E0B; --tint-b: #78350F; }
.outcome--5 { --tint-a: #F472B6; --tint-b: #831843; }

@media (hover: hover) {
    .outcome:hover {
        transform: translateY(-4px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 24px 56px rgba(17, 17, 19, 0.2);
    }
}

/* Mimics an in-app mode chip: icon + mode label */
.outcome__chip {
    position: relative;
    z-index: 1;
    display: inline-grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--sp-3);
    align-items: center;
    align-self: flex-start;
    padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.outcome__chip-icon {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.14);
    color: white;
}
.outcome__chip-label {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}
.outcome__chip-mode {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
}

.outcome__title {
    position: relative;
    z-index: 1;
    color: white;
    font-size: var(--text-2xl);
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
}

.outcomes__hint {
    text-align: center;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* ===================================================================
   QR DOCK — desktop visitors scan, phones go to the store directly
   =================================================================== */
.qr-dock {
    display: none;
    position: fixed;
    right: var(--sp-6);
    bottom: var(--sp-6);
    z-index: 90;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-3) var(--sp-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease-out);
    pointer-events: none;
}
.qr-dock.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.qr-dock img {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-sm);
}
.qr-dock span {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--ink-2);
}
@media (min-width: 1024px) and (hover: hover) {
    .qr-dock { display: flex; }
}

/* ===================================================================
   CTA — Dark premium with grain texture & gradient glow
   =================================================================== */
.cta {
    padding: var(--sp-32) 0;
    background: var(--ink);
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: 40px 40px 0 0;
}

/* Gradient glow orb */
.cta::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 55%);
    pointer-events: none;
    animation: ctaGlow 8s ease-in-out infinite;
}

/* Grain texture */
.cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 182px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

@keyframes ctaGlow {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50%      { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.cta__content {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.cta__title {
    color: white;
    margin-bottom: var(--sp-4);
    font-size: clamp(1.75rem, 3vw + 0.5rem, var(--text-3xl));
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cta__subtitle {
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: var(--sp-10);
    font-size: var(--text-base);
    line-height: 1.65;
}
.cta__downloads {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ===================================================================
   FOOTER — Refined
   =================================================================== */
.footer {
    padding: var(--sp-10) 0;
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-6);
}

.footer__links {
    display: flex;
    gap: var(--sp-8);
}
.footer__link {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 400;
    transition: color var(--dur-fast) var(--ease);
}
.footer__link:hover,
.footer__link:focus { color: rgba(255, 255, 255, 0.85); }

.footer__social {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.footer__social-link:hover,
.footer__social-link:focus {
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}
.footer__social-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

.footer__social-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.footer__copyright {
    color: rgba(255, 255, 255, 0.18);
    font-size: var(--text-xs);
}

/* ===================================================================
   LEGAL PAGES
   =================================================================== */
.legal-hero {
    background: var(--ink);
    color: white;
    padding: var(--sp-20) 0 var(--sp-16);
    text-align: center;
    position: relative;
}
.legal-hero__title {
    font-size: clamp(2rem, 4vw, var(--text-4xl));
    color: white;
    margin-bottom: var(--sp-3);
    position: relative;
    z-index: 1;
}
.legal-hero__subtitle {
    font-size: var(--text-lg);
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
}
.legal-hero__date {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
}

.legal-page { background: var(--bg); min-height: 60vh; }
.legal-page__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-16);
    padding: var(--sp-16) 0;
}
.legal-nav { display: none; }
.legal-content {
    max-width: 720px;
    margin: 0 auto;
    background: var(--surface);
    padding: var(--sp-16) var(--sp-12);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    content-visibility: auto;
    contain-intrinsic-size: 1500px;
}
.legal-content > p {
    margin-bottom: var(--sp-6);
    line-height: 1.8;
    color: var(--ink-2);
}
.legal-content > h2 {
    font-size: var(--text-2xl);
    margin-top: var(--sp-16);
    margin-bottom: var(--sp-6);
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.legal-content > h2:first-of-type { margin-top: 0; }
.legal-content > h3 {
    font-size: var(--text-xl);
    margin-top: var(--sp-10);
    margin-bottom: var(--sp-4);
    color: var(--ink);
    font-weight: 600;
}
.legal-section { margin-bottom: var(--sp-16); }
.legal-section h2 { font-size: var(--text-2xl); margin-bottom: var(--sp-6); color: var(--ink); }
.legal-section h3 { font-size: var(--text-xl); margin-bottom: var(--sp-3); color: var(--ink); }

.legal-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--sp-6) var(--sp-8);
    margin-bottom: var(--sp-4);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity var(--dur-slow) var(--ease-out),
        transform var(--dur-slow) var(--ease-out),
        box-shadow var(--dur-base) var(--ease);
}
@media (hover: hover) {
    .legal-card:hover {
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px) !important;
    }
}
.legal-card--highlight {
    background: var(--brand-subtle);
    border-color: var(--brand-light);
}
.legal-card p { margin-bottom: var(--sp-3); line-height: 1.7; }
.legal-card p:last-child { margin-bottom: 0; }

.legal-list {
    margin: var(--sp-4) 0 var(--sp-6);
    padding-left: var(--sp-8);
    line-height: 1.8;
}
.legal-list li { margin-bottom: var(--sp-3); color: var(--ink-2); }
.legal-list li strong { color: var(--ink); font-weight: 600; }
.legal-contact { font-size: var(--text-lg); line-height: 1.8; }

.legal-content a,
.legal-card a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease);
}
.legal-content a:hover, .legal-content a:focus,
.legal-card a:hover, .legal-card a:focus {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1279px) {
    .outcomes { --outcomes-inset: var(--sp-6); }
}

@media (max-width: 900px) {
    .showcase { padding-top: var(--sp-16); }
    .showcase__layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    /* Phone pins under the header, the steps scroll beneath it */
    .showcase__stage {
        order: -1;
        top: 64px;
        z-index: 2;
        padding: var(--sp-3) 0 var(--sp-4);
        background: var(--surface);
        box-shadow: 0 12px 16px -12px rgba(17, 17, 19, 0.08);
    }
    .showcase__phone { width: min(190px, 40vw); border-width: 6px; border-radius: 30px; }
    .showcase__dots { gap: 10px; }
    .showcase__step {
        min-height: 0;
        padding: var(--sp-10) 0;
        text-align: center;
        align-items: center;
        opacity: 1;
        transform: none;
    }
    .showcase__title { max-width: 18ch; }
    .showcase__desc { font-size: var(--text-base); max-width: 36ch; }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--sp-5); }
    .nav { display: none; }
    .header__content { height: 56px; }
    .header__actions { gap: var(--sp-3); }
    /* Two badges don't fit next to the language switcher — hero CTAs carry it */
    .header__actions .store-badge { display: none; }

    .hero { padding: var(--sp-16) 0 0; }
    .hero__content { margin-bottom: var(--sp-10); }
    .hero__eyebrow { font-size: 0.6875rem; padding: 5px 12px; }
    .hero__proof { flex-wrap: wrap; gap: var(--sp-4); }

    .hero::after {
        background-size: 32px 32px;
    }

    .app-preview { padding: var(--sp-6) 0 var(--sp-16); }
    .app-preview__track-wrapper::before,
    .app-preview__track-wrapper::after { width: 80px; }
    .app-preview__track { animation-duration: 80s; }

    .section-header { margin-bottom: var(--sp-10); }
    .showcase__stage { top: 56px; }
    .app-preview { padding: var(--sp-12) 0; }

    .outcomes { padding: var(--sp-16) 0; }
    .outcomes { --outcomes-inset: var(--sp-5); }
    .outcomes__track { gap: var(--sp-4); padding-right: var(--sp-5); }
    .outcome { width: 260px; padding: var(--sp-5); }
    .outcome__title { font-size: var(--text-xl); }

    .cta { border-radius: 28px 28px 0 0; }

    .comparison { padding: var(--sp-16) 0; }
    .comparison__header, .comparison__row { grid-template-columns: 1fr; }
    .comparison__header .comparison__cell--label { display: none; }
    .comparison__cell--label {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
        background: var(--border-light);
        padding: var(--sp-3) var(--sp-4);
    }
    .comparison__cell--nuva, .comparison__cell--tutor { padding: var(--sp-3) var(--sp-4); }
    .comparison__check, .comparison__cross { width: 15px; height: 15px; }

    .cta { padding: var(--sp-20) 0; }

    .footer__content { flex-direction: column; text-align: center; }
    .footer__links { justify-content: center; }
    .footer__social { justify-content: center; }

    .legal-hero { padding: var(--sp-12) 0 var(--sp-10); }
    .legal-content { padding: var(--sp-8) var(--sp-6); }
    .legal-content > h2 { font-size: var(--text-xl); margin-top: var(--sp-10); }
    .legal-card { padding: var(--sp-5) var(--sp-6); }

    body.lang-mn .hero__title {
        width: auto;
        max-width: 22ch;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 var(--sp-4); }
    .hero { padding: var(--sp-12) 0 0; }
    .hero__actions { flex-direction: column; align-items: center; }
    .hero__proof { flex-direction: column; gap: var(--sp-2); }
    .hero__proof-dot { display: none; }
    .cta__downloads { flex-direction: column; align-items: center; }
    .app-preview__shot {
        width: clamp(136px, 38vw, 160px);
        border-radius: 20px;
    }
    .app-preview__track { animation-duration: 70s; }
}

@media (min-width: 1280px) {
    .container { padding: 0 var(--sp-10); }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
    .hero__content, .hero__eyebrow, .hero__title, .hero__subtitle, .hero__actions, .app-preview {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .hero::before { animation: none; }
    .cta::before { animation: none; }
    .app-preview__track { animation: none; }
    .comparison__row, .legal-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reels, .hero__scroll { animation: none; opacity: 1; transform: none; }
    .hero__scroll svg { animation: none; }
    .showcase__step { opacity: 1; transform: none; transition: none; }
    .showcase__screen { transition: opacity 0.01ms; transform: none; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (prefers-reduced-data: reduce) {
    .app-preview__track {
        animation: none;
    }
}
