:root {
    color-scheme: dark;
    --bg: #050507;
    --ink: #f7f7fb;
    --soft: #d8d9e2;
    --muted: #8f93a3;
    --line: rgba(255, 255, 255, 0.18);
    --accent: #ff5a8a;
    --accent-2: #ffb000;
    --accent-3: #6ea8ff;
    --glass-tint: rgba(255, 255, 255, 0.075);
    --px: 50%;
    --py: 26%;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(128deg, rgba(255, 90, 138, 0.18), transparent 32%),
        linear-gradient(238deg, rgba(110, 168, 255, 0.18), transparent 36%),
        linear-gradient(180deg, #050507 0%, #0d0d13 46%, #050507 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 80%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.08) 12%, transparent 18%),
        linear-gradient(70deg, transparent 62%, rgba(255, 176, 0, 0.13) 69%, transparent 78%);
    opacity: 0.46;
}

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

button {
    border: 0;
    color: inherit;
    font: inherit;
}

.ambient-plane {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0%, rgba(255, 90, 138, 0.12) 44%, transparent 48%),
        linear-gradient(250deg, transparent 16%, rgba(110, 168, 255, 0.18) 50%, transparent 55%);
    transform: translate3d(calc((var(--px) - 50%) * 0.02), calc((var(--py) - 50%) * 0.02), 0);
}

.glass-control {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055) 48%, rgba(255, 255, 255, 0.12)),
        color-mix(in srgb, var(--accent) 12%, rgba(18, 19, 25, 0.82));
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.13),
        0 18px 60px rgba(0, 0, 0, 0.28);
}

.glass-control::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(118deg, transparent 0%, rgba(255, 255, 255, 0.46) 46%, transparent 58%),
        linear-gradient(55deg, transparent 52%, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent 78%);
    opacity: 0.5;
    transform: translate3d(calc((var(--px) - 50%) * 0.04), calc((var(--py) - 50%) * 0.03), 0);
}

.global-nav {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 20;
    width: min(1040px, calc(100% - 32px));
    min-height: 54px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 7px;
    border-radius: 28px;
    transform: translateX(-50%);
}

.brand,
.nav-links,
.nav-cta {
    display: inline-flex;
    align-items: center;
}

.brand {
    gap: 10px;
    padding-left: 8px;
    font-size: 15px;
    font-weight: 720;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25)),
        linear-gradient(135deg, var(--accent), var(--accent-3));
    color: #07070a;
    font-weight: 860;
}

.nav-links {
    justify-content: center;
    gap: 4px;
}

.nav-links a,
.nav-cta {
    min-height: 38px;
    border-radius: 22px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 650;
}

.nav-links a:hover,
.nav-cta:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-cta {
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
}

.site-shell {
    min-height: 100svh;
    display: grid;
    grid-template-rows: 1fr auto;
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 94px 0 26px;
}

.product-view {
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 0.84fr) minmax(420px, 1fr);
    align-items: center;
    gap: 54px;
}

.copy-stack {
    min-width: 0;
    transform: translate3d(var(--copy-x, 0), 0, 0);
    opacity: var(--copy-opacity, 1);
    transition: transform 360ms cubic-bezier(.2, .8, .2, 1), opacity 220ms ease;
}

.kicker {
    margin: 0 0 18px;
    color: var(--accent-2);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 680px;
    margin: 0 0 20px;
    font-size: 76px;
    line-height: 0.99;
    font-weight: 820;
    letter-spacing: 0;
}

.lede {
    max-width: 500px;
    margin: 0;
    color: var(--soft);
    font-size: 21px;
    line-height: 1.45;
    letter-spacing: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.primary-action,
.secondary-action {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    padding: 0 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 760;
}

.primary-action {
    color: #09080a;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.28)),
        linear-gradient(135deg, var(--accent), var(--accent-2));
}

.secondary-action {
    min-width: 120px;
}

.visual-stack {
    position: relative;
    min-height: 560px;
    display: grid;
    place-items: center;
    perspective: 1200px;
}

.product-shadow {
    position: absolute;
    width: 74%;
    height: 18%;
    bottom: 70px;
    filter: blur(28px);
    background: color-mix(in srgb, var(--accent) 36%, transparent);
    opacity: 0.42;
    transform: rotateX(72deg);
}

.device-frame {
    position: relative;
    width: min(520px, 100%);
    aspect-ratio: 0.82;
    border-radius: 38px;
    padding: 10px;
    transform:
        rotateX(var(--device-rx, 0deg))
        rotateY(var(--device-ry, -9deg))
        translate3d(var(--device-x, 0), 0, 0)
        scale(var(--device-scale, 1));
    transition:
        transform 520ms cubic-bezier(.2, .8, .2, 1),
        filter 260ms ease;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.06) 42%, rgba(255, 255, 255, 0.26)),
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 38%, #111018), #111018 52%, color-mix(in srgb, var(--accent-3) 28%, #0b0c12));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.35),
        0 36px 110px rgba(0, 0, 0, 0.52);
}

.device-glass {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 30px;
    background:
        linear-gradient(122deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.045) 42%, rgba(255, 255, 255, 0.15)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18)),
        rgba(7, 8, 12, 0.62);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.device-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(118deg, transparent 3%, rgba(255, 255, 255, 0.62) 10%, transparent 19%),
        linear-gradient(72deg, transparent 58%, rgba(255, 255, 255, 0.2), transparent 76%);
    opacity: 0.48;
    transform: translate3d(calc((var(--px) - 50%) * 0.08), calc((var(--py) - 50%) * 0.05), 0);
}

.status-line {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 720;
}

.device-display {
    position: absolute;
    inset: 78px 22px 22px;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 44%),
        rgba(255, 255, 255, 0.06);
}

.focus-chip {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #08080a;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.22)),
        linear-gradient(135deg, var(--accent-2), var(--accent));
    font-weight: 860;
}

.display-copy {
    align-self: end;
}

.display-copy span {
    display: block;
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--accent-2) 72%, white);
    font-size: 13px;
    font-weight: 760;
}

.display-copy strong {
    display: block;
    color: #fff;
    font-size: 42px;
    line-height: 1.02;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.signal-grid span {
    height: 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
}

.signal-grid span:nth-child(3n) {
    background: color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.18));
}

.specular-bar {
    position: absolute;
    top: 18%;
    left: 10%;
    width: 72%;
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.58);
    opacity: 0.28;
    filter: blur(0.5px);
    transform: rotate(-24deg);
}

.chapter-bar {
    align-self: end;
    width: min(760px, 100%);
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 34px;
}

.chapter {
    position: relative;
    min-width: 0;
    min-height: 56px;
    border-radius: 28px;
    background: transparent;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease;
}

.chapter span,
.chapter small {
    display: block;
    letter-spacing: 0;
}

.chapter span {
    color: #fff;
    font-size: 14px;
    font-weight: 760;
}

.chapter small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 620;
}

.chapter.is-active {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
        color-mix(in srgb, var(--accent) 20%, transparent);
}

.scroll-theater {
    position: relative;
    height: 380svh;
    margin-top: 40px;
    scroll-margin-top: 0;
}

.theater-pin {
    position: sticky;
    top: 0;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1fr);
    align-items: center;
    gap: 44px;
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 86px 0 44px;
}

.theater-copy {
    min-width: 0;
    transform: translate3d(calc((var(--story-progress, 0) - 0.5) * -24px), 0, 0);
}

h2 {
    max-width: 660px;
    margin: 0 0 18px;
    font-size: 64px;
    line-height: 1;
    font-weight: 820;
    letter-spacing: 0;
}

.theater-copy p:last-child {
    max-width: 460px;
    margin: 0;
    color: var(--soft);
    font-size: 20px;
    line-height: 1.48;
}

.theater-visual {
    position: relative;
    min-height: 620px;
    display: grid;
    place-items: center;
    perspective: 1400px;
}

.product-lens {
    position: relative;
    width: min(560px, 100%);
    aspect-ratio: 1;
    border-radius: 46px;
    padding: 10px;
    transform:
        translate3d(
            calc((var(--story-progress, 0) - 0.5) * -42px),
            calc((var(--story-progress, 0) - 0.5) * 28px),
            0
        )
        rotateX(calc(-8deg + var(--story-progress, 0) * 12deg))
        rotateY(calc(14deg - var(--story-progress, 0) * 24deg))
        scale(calc(0.82 + var(--story-progress, 0) * 0.3));
    transition: filter 180ms ease;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.06) 42%, rgba(255, 255, 255, 0.26)),
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 45%, #111018), #111018 56%, color-mix(in srgb, var(--accent-3) 36%, #0a0b10));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.34),
        0 44px 120px rgba(0, 0, 0, 0.5);
    will-change: transform;
}

.lens-surface {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 38px;
    background:
        linear-gradient(124deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.05) 46%, rgba(255, 255, 255, 0.18)),
        rgba(10, 11, 16, 0.66);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
}

.lens-surface::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        conic-gradient(from calc(var(--story-progress, 0) * 1turn), transparent 0 18%, rgba(255, 255, 255, 0.42) 22%, transparent 28% 58%, color-mix(in srgb, var(--accent-2) 32%, transparent) 64%, transparent 72%),
        linear-gradient(112deg, transparent 8%, rgba(255, 255, 255, 0.36) 15%, transparent 22%);
    opacity: 0.7;
    transform: translate3d(calc((var(--px) - 50%) * 0.05), calc((var(--py) - 50%) * 0.05), 0);
}

.lens-number,
.lens-title {
    position: absolute;
    z-index: 2;
    letter-spacing: 0;
}

.lens-number {
    top: 24px;
    left: 24px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #07070a;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.18)),
        linear-gradient(135deg, var(--accent-2), var(--accent));
    font-weight: 860;
}

.lens-title {
    left: 28px;
    right: 28px;
    bottom: 28px;
    color: #fff;
    font-size: 48px;
    line-height: 0.98;
    font-weight: 820;
}

.lens-rails {
    position: absolute;
    inset: 112px 28px 112px;
    z-index: 1;
    display: grid;
    gap: 14px;
}

.lens-rails i {
    border-radius: 12px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 44%, transparent), rgba(255, 255, 255, 0.13));
    transform: scaleX(calc(0.34 + var(--story-progress, 0) * 0.58));
    transform-origin: left;
}

.lens-rails i:nth-child(2) {
    transform: scaleX(calc(0.52 + var(--story-progress, 0) * 0.32));
}

.lens-rails i:nth-child(3) {
    transform: scaleX(calc(0.42 + var(--story-progress, 0) * 0.45));
}

.zoom-ring {
    position: absolute;
    width: min(660px, 112%);
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--accent-2) 44%, transparent);
    border-radius: 50%;
    opacity: calc(0.18 + var(--story-progress, 0) * 0.24);
    transform: scale(calc(0.72 + var(--story-progress, 0) * 0.54));
}

.scroll-meter {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: min(380px, calc(100% - 44px));
    height: 4px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    transform: translateX(-50%);
}

.scroll-meter span {
    display: block;
    width: calc(var(--story-progress, 0) * 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.detail-strip {
    width: min(1040px, calc(100% - 44px));
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 auto 42px;
}

.detail-item {
    min-height: 128px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.detail-item span {
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 820;
}

.detail-item strong {
    display: block;
    margin: 8px 0;
    font-size: 20px;
}

.detail-item p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.closing-panel {
    width: min(980px, calc(100% - 44px));
    min-height: 52svh;
    display: grid;
    align-content: center;
    justify-items: center;
    margin: 0 auto 74px;
    text-align: center;
}

.closing-panel h2 {
    margin-bottom: 28px;
}

body.is-switching .copy-stack {
    --copy-x: -14px;
    --copy-opacity: 0.22;
}

body.is-switching .theater-copy {
    opacity: 0.28;
    transform: translate3d(-12px, 0, 0);
}

@media (max-width: 980px) {
    .global-nav {
        grid-template-columns: auto auto;
    }

    .nav-links {
        display: none;
    }

    .product-view {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 34px;
    }

    .theater-pin {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .visual-stack {
        min-height: 380px;
        order: -1;
    }

    .theater-visual {
        min-height: 420px;
        order: -1;
    }

    .product-lens {
        width: min(440px, 86vw);
    }

    .device-frame {
        width: min(420px, 86vw);
        --device-ry: 0deg;
        --device-scale: 0.86;
    }

    h1,
    h2 {
        font-size: 58px;
    }
}

@media (max-width: 640px) {
    .global-nav {
        top: 12px;
        width: calc(100% - 24px);
        min-height: 52px;
        border-radius: 26px;
    }

    .brand span:last-child {
        display: none;
    }

    .site-shell {
        width: calc(100% - 28px);
        padding-top: 82px;
    }

    .product-view {
        min-height: auto;
    }

    .scroll-theater {
        height: 340svh;
    }

    .theater-pin {
        width: calc(100% - 28px);
        padding-top: 76px;
    }

    .copy-stack {
        text-align: left;
    }

    .kicker {
        font-size: 11px;
    }

    h1,
    h2 {
        max-width: 350px;
        font-size: 44px;
        line-height: 1.03;
    }

    .lede {
        max-width: 330px;
        font-size: 18px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 26px;
    }

    .visual-stack {
        min-height: 300px;
    }

    .theater-visual {
        min-height: 330px;
    }

    .product-lens {
        width: min(330px, 82vw);
        border-radius: 30px;
        padding: 7px;
    }

    .lens-surface {
        border-radius: 24px;
    }

    .lens-title {
        font-size: 31px;
    }

    .lens-rails {
        inset: 92px 22px 94px;
    }

    .theater-copy p:last-child {
        max-width: 330px;
        font-size: 17px;
    }

    .device-frame {
        width: min(330px, 82vw);
        border-radius: 28px;
        padding: 7px;
        --device-scale: 0.84;
    }

    .device-glass {
        border-radius: 22px;
    }

    .status-line {
        padding: 18px 18px 0;
    }

    .device-display {
        inset: 62px 14px 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .display-copy strong {
        font-size: 30px;
    }

    .chapter-bar {
        min-height: 66px;
        grid-template-columns: repeat(4, 150px);
        justify-content: start;
        overflow-x: auto;
        margin-top: 16px;
        border-radius: 30px;
        scrollbar-width: none;
    }

    .chapter-bar::-webkit-scrollbar {
        display: none;
    }

    .detail-strip {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        margin-top: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
