/* Marketing layout (home + features / pricing / faq / setup / download).
   Pairs with tokens.css + base.css + components.css + motion.css. Holds the
   marketing nav + footer, hero, sections, showcase, and the marketing-only
   components (device mockup, feature grid, pricing, compare matrix). Nothing
   here defines colours from raw values — everything pulls from custom
   properties so the same rules work in light + dark.
   Note: nav + footer live here while only marketing pages use them; they move
   to components.css when legal/portal pages adopt the injected footer. */

/* Active nav link from <body data-page> (set by components.js). */
.nav-links a.active {
    color: var(--text);
}
.nav-links-mobile-only {
    display: none;
}

/* ============================ NAV ============================ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
    transition:
        padding var(--dur-med) var(--ease-out-soft),
        background-color var(--dur-med) var(--ease-out-soft),
        backdrop-filter var(--dur-med) var(--ease-out-soft),
        border-color var(--dur-med) var(--ease-out-soft);
    border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
    padding: 10px 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(var(--blur-strong)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(140%);
    border-bottom-color: var(--line);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    padding: 6px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 74%, transparent);
    transition:
        background-color var(--dur-med) var(--ease-out-soft),
        border-color var(--dur-med) var(--ease-out-soft);
}

.site-nav.is-scrolled .nav-links {
    background: var(--surface-soft);
    border-color: var(--line);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
}

.nav-links a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    color: var(--text-soft);
    transition:
        background-color var(--dur-fast) var(--ease-out-soft),
        color var(--dur-fast) var(--ease-out-soft);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--surface-strong);
}

.nav-links-mobile {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    transition:
        transform 220ms var(--ease-out-soft),
        opacity 220ms var(--ease-out-soft);
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}

/* ============================ HERO ============================ */

.hero {
    position: relative;
    padding: clamp(48px, 9vw, 120px) 0 clamp(28px, 6vw, 72px);
}

.hero-inner {
    display: grid;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

:root[data-theme='light'] .kicker {
    color: var(--accent-link);
}

.hero-h1 {
    margin: 0;
    font-size: clamp(3rem, 8.8vw, 6.8rem);
    line-height: 0.96;
    letter-spacing: 0;
    font-weight: 700;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.04em;
}

.hero-headline {
    display: block;
}

.hero-headline-accent {
    display: block;
    font-weight: 700;
}

.hero-headline-accent em {
    font-style: italic;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: 0.04em;
}

.hero-intro {
    margin: 0;
    max-width: 60ch;
    color: var(--text-soft);
    font-size: clamp(1.04rem, 1.6vw, 1.22rem);
    line-height: 1.62;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

/* Honest trust signals (no numbers/claims) — a check-marked chip row. */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.trust-row li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text-soft);
}

.trust-row svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--accent);
}

.trust-row--center {
    justify-content: center;
}

.btn-lg {
    min-height: 56px;
    padding: 0 28px;
    font-size: 1rem;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.92rem;
    max-width: max-content;
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
}

.hero-meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* Hero stat strip. */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: clamp(40px, 7vw, 80px);
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.hero-stat {
    display: grid;
    gap: 10px;
}

.hero-stat-num {
    margin: 0;
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-stat-label {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.55;
}

/* ============================ MARQUEE WRAPPER ============================ */

.marquee {
    margin-top: clamp(40px, 7vw, 72px);
}

/* ============================ SECTIONS (BASE) ============================ */

.section {
    padding: clamp(64px, 10vw, 140px) 0;
    position: relative;
}

.section-compact {
    padding: clamp(48px, 8vw, 96px) 0;
}

.section-head {
    display: grid;
    gap: 16px;
    max-width: 720px;
    margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2 {
    margin: 0;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: 0;
    color: var(--text);
}

.section-copy {
    margin: 0;
    color: var(--text-soft);
    font-size: 1.04rem;
    line-height: 1.66;
    max-width: 56ch;
}

/* ============================ SHOWCASE LAYOUT ============================ */

.section-showcase {
    padding-top: clamp(48px, 7vw, 96px);
}

@media (max-width: 900px) {
    .section-showcase .showcase-inner {
        grid-template-columns: 1fr;
    }

    .showcase-captions {
        min-height: 200px;
    }
}

/* ============================ FEATURES ============================ */

.feature-list {
    display: grid;
    gap: 12px;
}

.feature-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: clamp(22px, 3vw, 32px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 82%, var(--surface-soft));
    position: relative;
    overflow: hidden;
    transition:
        border-color var(--dur-med) var(--ease-out-soft),
        background-color var(--dur-med) var(--ease-out-soft),
        transform var(--dur-med) var(--ease-out-soft);
}

.feature-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, var(--accent-soft) 50%, transparent 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    opacity: 0;
    transition:
        opacity var(--dur-med) var(--ease-out-soft),
        background-position 1.2s var(--ease-out-soft);
    pointer-events: none;
}

.feature-row:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.feature-row:hover::before {
    opacity: 1;
    background-position: 0 0;
}

.feature-row > * {
    position: relative;
    z-index: 1;
}

.row-number {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.feature-copy h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.feature-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.62;
    max-width: 60ch;
}

/* ============================ EXPERIENCE (DARK SHELL) ============================ */

.section-dark {
    padding: clamp(64px, 9vw, 120px) 0;
}

.dark-shell {
    border-radius: var(--radius-xl);
    padding: clamp(40px, 6vw, 72px);
    background:
        linear-gradient(135deg, rgba(36, 199, 183, 0.12), transparent 42%),
        linear-gradient(315deg, rgba(245, 158, 11, 0.12), transparent 44%),
        linear-gradient(180deg, var(--panel-dark-soft) 0%, var(--panel-dark) 100%);
    color: var(--text-on-dark);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.section-head-dark h2 {
    color: var(--text-on-dark);
}
.section-head-dark .section-copy {
    color: var(--text-on-dark-soft);
}

.principle-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.principle-row {
    padding: 24px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition:
        background-color var(--dur-med) var(--ease-out-soft),
        border-color var(--dur-med) var(--ease-out-soft);
}

.principle-row:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(36, 199, 183, 0.36);
}

.principle-row h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-on-dark);
    letter-spacing: 0;
}

.principle-row p {
    margin: 0;
    color: var(--text-on-dark-soft);
    line-height: 1.62;
}

/* ============================ STAGES (account) ============================ */

.stages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    position: relative;
}

.stages::before {
    content: '';
    position: absolute;
    top: 56px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--brand-2), transparent);
    opacity: 0.4;
}

.stage {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
    position: relative;
    z-index: 1;
}

.stage-num {
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

:root[data-theme='light'] .stage-num {
    color: var(--accent-link);
}

.stage h3 {
    margin: 0 0 10px;
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.stage p {
    margin: 0 0 16px;
    color: var(--text-soft);
    line-height: 1.62;
}

.inline-link {
    color: var(--accent);
    font-weight: 600;
    transition:
        color var(--dur-fast) var(--ease-out-soft),
        letter-spacing var(--dur-fast) var(--ease-out-soft);
}

:root[data-theme='light'] .inline-link {
    color: var(--accent-link);
}

.inline-link:hover {
    color: var(--accent-bright);
}

/* ============================ SETUP ============================ */

.setup-shell {
    display: grid;
    gap: clamp(32px, 5vw, 56px);
}

.setup-list {
    display: grid;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.setup-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
    padding: 18px 18px 18px 64px;
    position: relative;
}

.setup-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--bg);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    position: absolute;
    left: 0;
    top: 14px;
    z-index: 1;
    transition:
        color var(--dur-med) var(--ease-out-soft),
        border-color var(--dur-med) var(--ease-out-soft),
        background-color var(--dur-med) var(--ease-out-soft);
}

.setup-row.is-in .setup-num {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.setup-copy h3 {
    margin: 0 0 6px;
    font-size: 1.24rem;
    font-weight: 700;
    color: var(--text);
}

.setup-copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.62;
}

.setup-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.setup-note {
    margin: var(--sp-4) 0 0;
    color: var(--text-faint);
    font-size: var(--fs-sm);
}

/* ============================ COMPLIANCE ============================ */

.compliance-shell {
    display: grid;
    gap: clamp(28px, 4vw, 48px);
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.compliance-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface-soft);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
}

.compliance-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
}

.compliance-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.compliance-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* The site footer lives in components.css (universal, injected by components.js). */

/* ============================ RESPONSIVE ============================ */

@media (max-width: 920px) {
    .nav-row {
        position: relative;
        padding-right: 52px;
    }

    .nav-links {
        position: fixed;
        inset: 64px 14px auto 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px;
        border-radius: var(--radius-md);
        background: var(--surface);
        backdrop-filter: blur(var(--blur-strong));
        -webkit-backdrop-filter: blur(var(--blur-strong));
        border: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition:
            transform var(--dur-med) var(--ease-out-soft),
            opacity var(--dur-med) var(--ease-out-soft);
    }

    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links-mobile {
        display: inline-flex;
    }

    .nav-cta-secondary {
        display: none;
    }

    .nav-toggle {
        position: fixed;
        top: 14px;
        right: auto;
        left: min(calc(100vw - 56px), 332px);
        z-index: 2;
        display: inline-flex !important;
        transform: none;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-row {
        grid-template-columns: 56px 1fr;
        gap: 18px;
    }

    .principle-list,
    .stages,
    .compliance-grid {
        grid-template-columns: 1fr;
    }

    .stages::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .nav-actions {
        display: none;
    }

    .nav-cta-secondary {
        display: none;
    }

    .nav-actions .btn-primary {
        display: none;
    }

    .hero-h1 {
        font-size: clamp(2.6rem, 13vw, 4.2rem);
    }

    .hero-actions .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hero-cine {
        min-height: auto;
        align-items: flex-start;
        margin-top: -76px;
    }

    .hero-cine-inner {
        max-width: 100%;
        padding-block: 132px 52px;
        gap: 18px;
    }

    .hero-cine h1 {
        max-width: 9.2ch;
        font-size: clamp(2.55rem, 12vw, 3.15rem);
        line-height: 1.02;
    }

    .hero-cine-sub {
        max-width: 34ch;
        font-size: 1rem;
        line-height: 1.56;
    }

    .kicker {
        max-width: 100%;
        font-size: 0.66rem;
        letter-spacing: 0.08em;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .rail-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .rail-head .inline-link {
        max-width: 100%;
        font-size: 0.92rem;
        overflow-wrap: anywhere;
    }
}

/* ============================ MOBILE-ONLY NAV LINKS ============================ */

@media (max-width: 920px) {
    .nav-links-mobile-only {
        display: inline-flex;
    }
}

/* ============================ PAGE HERO (subpages) ============================ */

.page-hero {
    position: relative;
    isolation: isolate;
    padding: clamp(56px, 9vw, 120px) 0 clamp(28px, 5vw, 56px);
    display: grid;
    gap: 18px;
    max-width: 760px;
}

/* Wide cinematic glow behind every subpage hero, tying them to the homepage. */
.page-hero::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: clamp(-120px, -10vw, -70px);
    left: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 460px;
    pointer-events: none;
    background:
        linear-gradient(
            120deg,
            transparent 0 18%,
            color-mix(in srgb, var(--accent) 12%, transparent) 18% 19%,
            transparent 19% 100%
        ),
        linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 74%, transparent), transparent 68%);
}

.page-hero h1 em {
    font-style: normal;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-hero h1 {
    margin: 0;
    font-size: var(--fs-display);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    font-weight: 700;
    color: var(--text);
}

.page-hero p {
    margin: 0;
    color: var(--text-soft);
    font-size: var(--fs-md);
    line-height: 1.62;
    max-width: 60ch;
}

.page-hero .hero-actions {
    margin-top: 6px;
}

/* ============================ FIRE TV DEVICE MOCKUP ============================ */
/* Generalises the showcase frame so it can hold a screenshot <img> or the
   CSS .mock-* panels, reusable across home / features / setup. */

.device-tv {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, #111811 0%, #050805 100%);
    border: 1px solid var(--line);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.device-tv::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.06), transparent 35%),
        linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.45) 100%);
}

.device-tv-screen {
    position: absolute;
    inset: 14px;
    border-radius: calc(var(--radius-xl) - 10px);
    overflow: hidden;
}

.device-tv-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.device-tv--floating {
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ============================ FEATURE GRID ============================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(16px, 2.5vw, 24px);
}

.feature-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: clamp(22px, 3vw, 30px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 82%, var(--surface-soft));
    transition:
        border-color var(--dur-med) var(--ease-out-soft),
        transform var(--dur-med) var(--ease-out-soft);
}

.feature-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
}

.feature-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.feature-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

/* ============================ PRICING ============================ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(18px, 2.5vw, 28px);
    align-items: start;
}

.pricing-card {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: clamp(24px, 3vw, 34px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft));
    box-shadow: var(--shadow-card);
}

.pricing-card--featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.pricing-card-head {
    display: grid;
    gap: 8px;
}

.pricing-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.24rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.pricing-price {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
}

.pricing-price small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: 0;
}

.pricing-card-sub {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.55;
}

.pricing-feature-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pricing-feature-list li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--text-soft);
    line-height: 1.5;
}

.pricing-feature-list li::before {
    content: '';
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--success-soft);
    border: 1px solid var(--success-line);
    background-image: linear-gradient(var(--success), var(--success));
    background-size: 8px 2px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============================ FREE-VS-PREMIUM MATRIX ============================ */

.compare-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.compare-table th,
.compare-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.compare-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface-strong);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    z-index: 1;
}

.compare-table tbody th {
    font-weight: 600;
    color: var(--text);
}

.compare-table td {
    text-align: center;
    color: var(--text-soft);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.compare-col-feature {
    text-align: left !important;
    width: 46%;
}

.compare-yes {
    color: var(--success);
    font-weight: 700;
}

.compare-pro {
    color: var(--pro-from);
    font-weight: 700;
}

.compare-no {
    color: var(--text-faint);
}

.compare-note {
    margin: 12px 0 0;
    color: var(--text-faint);
    font-size: 0.86rem;
    line-height: 1.5;
}

/* ============================ CLOUD BACKUP ADD-ON CALLOUT ============================ */
/* Cloud Backup is a separate add-on (never bundled with Premium). Neutral
   styling — NOT the PRO gold — so it reads as an add-on, not a plan. */

.cloud-backup-callout {
    display: grid;
    gap: 12px;
    padding: clamp(24px, 3vw, 34px);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line-strong);
    background: color-mix(in srgb, var(--surface) 80%, var(--surface-soft));
}

.cloud-backup-callout h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.cloud-backup-callout p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.62;
    max-width: 64ch;
}

/* ============================ DOWNLOAD / SETUP HELPERS ============================ */

.code-mono {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.req-list {
    display: grid;
    gap: 8px;
    margin: var(--sp-4) 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-soft);
}

/* Downloader install sequence (the "Install with Downloader" card). Mirrors
   the .setup-row pattern: an absolutely-positioned numbered badge with the
   step text flowing in the left-padded body, so multi-line steps lay out
   correctly. */
.downloader-steps {
    display: grid;
    gap: 18px;
    margin: var(--sp-5) 0;
    padding: 0;
    list-style: none;
    counter-reset: dl-step;
}

.downloader-steps li {
    position: relative;
    padding-left: 48px;
    counter-increment: dl-step;
}

.downloader-steps li::before {
    content: counter(dl-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--bg);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
}

.step-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    font-size: 0.98rem;
    margin-bottom: 4px;
}

.step-detail {
    margin: 0;
    color: var(--text-soft);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.downloader-code-hero {
    display: inline-block;
    margin-top: 2px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

/* The numeric code is the focal point of the install card. */
.downloader-code-hero .code-mono {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.downloader-code-hero.no-code .code-mono {
    font-size: 1.02rem;
    letter-spacing: 0.04em;
}

.step-fallback {
    margin: 8px 0 0;
    color: var(--text-faint);
    font-size: var(--fs-sm);
}

/* History block — separates "Previous versions" from the latest release. */
.download-history {
    margin-top: var(--section-y-compact);
}

/* Space the rendered "Download APK" button below the release line — scoped to
   the download list so other pages' .setup-actions are unaffected. */
#downloadLatest .setup-actions {
    margin-top: var(--sp-5);
}

@media (max-width: 720px) {
    .compare-table th,
    .compare-table td {
        padding: 12px 12px;
        font-size: 0.9rem;
    }
}

/* ============================ CINEMATIC (streaming look) ============================ */

/* Full-bleed helper: break an element out of the centered container to the
   viewport edges (body has overflow-x:hidden so 100vw is safe). */
.bleed {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* ---- Full-bleed hero ---- */
.hero-cine {
    position: relative;
    min-height: clamp(500px, 64vh, 680px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
    margin-top: clamp(-96px, -8vh, -58px);
}

.hero-cine-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(
            115deg,
            transparent 0 48%,
            color-mix(in srgb, var(--accent) 13%, transparent) 48% 49%,
            transparent 49% 100%
        ),
        linear-gradient(90deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
        linear-gradient(180deg, color-mix(in srgb, var(--line) 22%, transparent) 1px, transparent 1px),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 68%);
    background-size:
        auto,
        92px 92px,
        92px 92px,
        auto;
}

/* Compact cinematic banner for subpages (shorter than the homepage hero). */
.hero-cine--compact {
    min-height: clamp(300px, 50vh, 480px);
    align-items: center;
}

.hero-cine--compact .hero-cine-inner {
    padding-block: clamp(116px, 20vh, 200px) clamp(28px, 5vh, 56px);
    gap: 18px;
}

.hero-cine--compact h1 {
    font-size: var(--fs-display);
    line-height: 1.04;
}

/* Bottom scrim so copy stays legible and the hero blends into the first rail. */
.hero-cine::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--bg) 72%, transparent) 0%, transparent 56%),
        linear-gradient(180deg, transparent 42%, color-mix(in srgb, var(--bg) 94%, transparent) 100%);
}

.hero-cine-inner {
    display: grid;
    gap: 22px;
    max-width: 720px;
    padding-block: clamp(104px, 14vh, 150px) clamp(30px, 5vh, 54px);
}

.hero-cine h1 {
    margin: 0;
    font-size: clamp(2.9rem, 7.2vw, 6rem);
    line-height: 0.98;
    letter-spacing: 0;
    font-weight: 800;
    color: var(--text);
}

.hero-cine h1 em {
    font-style: normal;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-cine-sub {
    margin: 0;
    max-width: 56ch;
    color: var(--text-soft);
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.6;
}

/* Big device peeking from the right on desktop. */
.hero-cine-art {
    position: absolute;
    right: -8%;
    top: 48%;
    transform: translateY(-50%) rotate(-2deg);
    width: min(52%, 740px);
    z-index: -1;
    filter: drop-shadow(0 50px 120px rgba(0, 0, 0, 0.65));
}

@media (max-width: 960px) {
    .hero-cine-art {
        display: none;
    }
}

/* ---- Rails (streaming-style poster rows) ---- */
.rail {
    margin-block: clamp(26px, 5vw, 52px);
}

.rail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.rail-head h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.95rem);
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.rail-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.rail-track::-webkit-scrollbar {
    height: 8px;
}

.rail-track::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: var(--radius-pill);
}

.poster {
    --poster-glow: rgba(36, 199, 183, 0.18);
    --poster-ink: #24c7b7;
    flex: 0 0 auto;
    width: clamp(196px, 23vw, 244px);
    min-height: clamp(148px, 16vw, 176px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    padding: 18px;
    color: var(--text);
    background: linear-gradient(155deg, var(--surface), var(--surface-soft));
    transition:
        transform var(--dur-fast) var(--ease-out-soft),
        border-color var(--dur-fast) var(--ease-out-soft),
        box-shadow var(--dur-fast) var(--ease-out-soft);
}

/* A soft single-hue glow drifting from the top corner gives each card a gentle
   identity, instead of the old saturated full-bleed gradient + barber-pole
   stripes that read as empty placeholder blocks. */
.poster::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(135% 100% at 12% -12%, var(--poster-glow), transparent 58%);
    pointer-events: none;
}

.poster:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-card);
}

/* Glyph medallion, top-left, tinted with the card's own hue. Sits above the
   bottom-aligned title/description (the card is justify-end). */
.poster-icon {
    width: 42px;
    height: 42px;
    margin-bottom: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--poster-ink) 16%, transparent);
    color: var(--poster-ink);
}

.poster-icon svg {
    width: 22px;
    height: 22px;
}

.poster h3 {
    margin: 0;
    position: relative;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.poster p {
    margin: 5px 0 0;
    position: relative;
    font-size: 0.86rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.poster .badge {
    align-self: flex-start;
    margin-bottom: 10px;
    position: relative;
}

.poster--a {
    --poster-glow: rgba(36, 199, 183, 0.18);
    --poster-ink: #24c7b7;
}
.poster--b {
    --poster-glow: rgba(47, 111, 237, 0.18);
    --poster-ink: #5b94f5;
}
.poster--c {
    --poster-glow: rgba(225, 29, 72, 0.16);
    --poster-ink: #f4647e;
}
.poster--d {
    --poster-glow: rgba(22, 163, 74, 0.18);
    --poster-ink: #34c06a;
}
.poster--e {
    --poster-glow: rgba(245, 158, 11, 0.18);
    --poster-ink: #f5a623;
}

/* ---- Scenes: alternating big device + copy ---- */
.scene {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    margin-block: clamp(48px, 8vw, 112px);
}

.scene--reverse .scene-media {
    order: 2;
}

.scene-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
}

.scene-copy p {
    margin: 0 0 16px;
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.66;
    max-width: 52ch;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 2.4vw, 24px);
}

.screenshot-card {
    margin: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft));
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.screenshot-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-deep);
}

.screenshot-card figcaption {
    padding: 14px 16px 16px;
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 600;
}

.screenshot-note {
    max-width: 76ch;
    margin: 18px 0 0;
    color: var(--text-faint);
    font-size: 0.9rem;
    line-height: 1.55;
}

@media (max-width: 860px) {
    .scene {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .scene--reverse .scene-media {
        order: 0;
    }

    .screenshot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav-toggle {
        position: fixed;
        top: 14px;
        right: auto;
        left: min(calc(100vw - 56px), 332px);
        width: 42px;
        height: 42px;
        border-color: var(--accent-strong);
        background: var(--accent);
        color: var(--accent-ink);
        box-shadow: var(--shadow-button);
        display: inline-flex !important;
        transform: none;
    }

    .hero-cine {
        min-height: auto;
        align-items: flex-start;
        margin-top: -76px;
    }

    .hero-cine-inner {
        max-width: 100%;
        padding-block: 132px 52px;
        gap: 18px;
    }

    .hero-cine h1 {
        max-width: 9.2ch;
        font-size: clamp(2.55rem, 12vw, 3.15rem);
        line-height: 1.02;
    }

    .hero-cine-sub {
        width: min(100%, 34ch);
        max-width: 34ch;
        font-size: 1rem;
        line-height: 1.56;
    }

    .kicker {
        max-width: 100%;
        font-size: 0.66rem;
        letter-spacing: 0.08em;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .rail-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .rail-head .inline-link {
        max-width: 100%;
        font-size: 0.92rem;
        overflow-wrap: anywhere;
    }
}

/* Final compact-hero overrides must live after the generic cinematic hero rules. */
.hero-cine.hero-cine--compact {
    min-height: auto;
}

.hero-cine.hero-cine--compact .hero-cine-inner {
    padding-block: clamp(92px, 12vh, 132px) clamp(32px, 5vh, 54px);
}

.hero-cine.hero-cine--compact h1 {
    max-width: 11ch;
    font-size: clamp(3.1rem, 6.2vw, 5rem);
    line-height: 1.02;
}

.hero-cine.hero-cine--compact .hero-cine-sub {
    max-width: 58ch;
}

.hero-cine.hero-cine--compact + .section,
.hero-cine.hero-cine--compact + .section-compact {
    padding-top: clamp(28px, 4vw, 56px);
}

@media (max-width: 600px) {
    .hero-cine.hero-cine--compact .hero-cine-inner {
        padding-block: 132px 42px;
    }

    .hero-cine.hero-cine--compact h1 {
        max-width: 9ch;
        font-size: clamp(2.45rem, 11vw, 3rem);
    }

    .hero-cine.hero-cine--compact + .section,
    .hero-cine.hero-cine--compact + .section-compact {
        padding-top: 28px;
    }
}

/* ===== Changelog / release notes (changelog.html) ===== */

.changelog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.changelog-entry {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface-soft) 74%, transparent);
    backdrop-filter: blur(var(--blur-soft));
    -webkit-backdrop-filter: blur(var(--blur-soft));
    padding: 22px 24px;
}

.changelog-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 6px;
}

.changelog-version {
    display: inline-flex;
    align-items: center;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: var(--radius-pill);
    padding: 2px 12px;
}

.changelog-date {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.changelog-title {
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
}

.changelog-body {
    color: var(--text-soft);
    line-height: 1.62;
}

.changelog-body p {
    margin: 0 0 10px;
}

.changelog-body p:last-child {
    margin-bottom: 0;
}

.changelog-bullets {
    margin: 0 0 10px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.changelog-bullets:last-child {
    margin-bottom: 0;
}

.changelog-bullets li {
    list-style: disc;
}
