:root {
    --bg: #03070b;
    --bg-soft: #081018;
    --panel: rgba(255, 255, 255, 0.02);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-glass: rgba(13, 23, 33, 0.6);
    --accent: #a5f3fc;
    --accent-glow: rgba(165, 243, 252, 0.15);
    --ambient-primary: rgba(116, 243, 255, 0.16);
    --ambient-secondary: rgba(65, 154, 255, 0.1);
    --ambient-orb: rgba(165, 243, 252, 0.18);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --font-display: "Sora", system-ui, sans-serif;
    --font-body: "Manrope", system-ui, sans-serif;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --container-width: 1100px;
    --transition-base: 400ms cubic-bezier(0.2, 0, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: color 500ms ease, background-color 500ms ease;
    isolation: isolate;
}

body[data-theme="hero"],
body[data-theme="open"] {
    --accent: #8aeaff;
    --accent-glow: rgba(138, 234, 255, 0.18);
    --ambient-primary: rgba(74, 214, 255, 0.17);
    --ambient-secondary: rgba(43, 112, 188, 0.12);
    --ambient-orb: rgba(138, 234, 255, 0.2);
}

body[data-theme="transition"] {
    --accent: #91f0ff;
    --accent-glow: rgba(145, 240, 255, 0.16);
    --ambient-primary: rgba(93, 212, 210, 0.14);
    --ambient-secondary: rgba(92, 52, 130, 0.13);
    --ambient-orb: rgba(186, 149, 255, 0.16);
}

body[data-theme="gate"] {
    --accent: #fb7185;
    --accent-glow: rgba(251, 113, 133, 0.22);
    --ambient-primary: rgba(180, 32, 71, 0.2);
    --ambient-secondary: rgba(251, 113, 133, 0.12);
    --ambient-orb: rgba(255, 93, 121, 0.18);
}

body[data-theme="progress"] {
    --accent: #f5cd79;
    --accent-glow: rgba(245, 205, 121, 0.18);
    --ambient-primary: rgba(223, 164, 55, 0.16);
    --ambient-secondary: rgba(126, 88, 20, 0.1);
    --ambient-orb: rgba(245, 205, 121, 0.16);
}

body[data-theme="privacy"] {
    --accent: #93c5fd;
    --accent-glow: rgba(147, 197, 253, 0.16);
    --ambient-primary: rgba(75, 113, 184, 0.15);
    --ambient-secondary: rgba(45, 65, 122, 0.12);
    --ambient-orb: rgba(147, 197, 253, 0.18);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

p {
    color: var(--text-secondary);
}

h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text-primary);
}

.container {
    width: min(var(--container-width), calc(100% - 3rem));
    margin: 0 auto;
}

.bg-stellar {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
    overflow: hidden;
}

.bg-stellar::before,
.bg-stellar::after {
    content: "";
    position: absolute;
    inset: -12%;
    transition: background 900ms ease, opacity 900ms ease, transform 900ms ease;
}

.bg-stellar::before {
    background:
        radial-gradient(circle at 20% 20%, var(--ambient-primary), transparent 34%),
        radial-gradient(circle at 78% 18%, var(--ambient-secondary), transparent 26%),
        radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 42%);
    filter: blur(18px);
    animation: ambientDrift 18s ease-in-out infinite alternate;
}

.bg-stellar::after {
    inset: 0;
    opacity: 0.38;
    background:
        radial-gradient(circle at 50% 40%, var(--ambient-orb), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%);
    mix-blend-mode: screen;
    animation: ambientPulse 12s ease-in-out infinite;
}

.text-cyan {
    color: var(--accent);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: padding 300ms ease, background-color 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
}

.site-header.is-scrolled {
    padding: 1rem 0;
    background: var(--panel-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.brand-copy strong {
    display: block;
    font-size: 1.1rem;
    font-family: var(--font-display);
}

.brand-copy span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.nav-cta {
    background: var(--accent);
    color: var(--bg);
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.92rem;
}

.breadcrumb .current {
    color: var(--text-primary);
}

/* Section Base */
section {
    padding: 8rem 0;
    position: relative;
}

.eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.centered {
    text-align: center;
}

/* Hero Section */
.hero {
    padding-top: 14rem;
    padding-bottom: 8rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-visual {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.hero-mockup {
    width: 320px;
    border-radius: 44px;
    padding: 10px;
    background: var(--panel-glass);
    border: 1px solid var(--panel-border);
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5);
    transform: rotateX(5deg);
    transition: var(--transition-base);
    position: relative;
}

.hero-mockup:hover {
    transform: rotateX(0deg) translateY(-10px);
}

.hero-mockup::after {
    content: "";
    position: absolute;
    inset: auto 10% -7%;
    height: 20%;
    border-radius: 999px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    filter: blur(24px);
    opacity: 0.9;
}

.hero-mockup img {
    border-radius: 36px;
    width: 100%;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--accent);
}

.btn-secondary {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    backdrop-filter: blur(18px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -32%;
    width: 24%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-22deg) translateX(-220%);
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 120%, var(--accent-glow), transparent 62%);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
    z-index: -1;
}

.btn:hover::before,
.btn:focus-visible::before {
    transform: skewX(-22deg) translateX(520%);
}

.btn:hover::after,
.btn:focus-visible::after {
    opacity: 1;
}

/* Feature Grid Section */
.feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.story {
    padding-top: 4rem;
}

.story-shell {
    display: grid;
    gap: 3rem;
}

.story-intro {
    max-width: 720px;
}

.story-intro h2 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    margin-bottom: 1rem;
}

.story-intro p {
    font-size: 1.05rem;
    max-width: 620px;
}

.story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 4rem;
    align-items: start;
}

.story-steps {
    display: grid;
    gap: 1.5rem;
}

.story-step {
    min-height: 55vh;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    gap: 1.25rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: color 300ms ease, transform 300ms ease;
}

.story-step.is-active {
    color: var(--text-primary);
    transform: translateX(10px);
}

.story-step h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
}

.story-step p {
    max-width: 34rem;
}

.story-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease, background-color 300ms ease;
}

.story-step.is-active .story-index {
    transform: scale(1.06);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.02);
}

.story-visual-wrap {
    position: sticky;
    top: 7rem;
}

.story-visual {
    position: relative;
    min-height: 720px;
    display: grid;
    place-items: center;
    border-radius: calc(var(--radius-xl) + 12px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(5, 9, 15, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    overflow: hidden;
}

.story-rings {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.story-rings span {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: ringPulse 6s ease-in-out infinite;
}

.story-rings span:nth-child(1) {
    width: 220px;
    height: 220px;
}

.story-rings span:nth-child(2) {
    width: 320px;
    height: 320px;
    animation-delay: 1.4s;
}

.story-rings span:nth-child(3) {
    width: 420px;
    height: 420px;
    animation-delay: 2.8s;
}

.story-device {
    position: relative;
    width: min(100%, 300px);
    aspect-ratio: 390 / 844;
}

.story-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    filter: saturate(0.86) brightness(0.94);
    transition: opacity 450ms ease, transform 650ms cubic-bezier(0.2, 0, 0, 1), filter 450ms ease;
    will-change: transform, opacity;
}

.story-screen.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1) brightness(1);
}

.feature-split.reversed {
    direction: rtl;
}

.feature-split.reversed > * {
    direction: ltr;
}

.feature-copy h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.feature-copy p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.feature-visual {
    background: var(--panel);
    border-radius: var(--radius-xl);
    padding: 4rem;
    border: 1px solid var(--panel-border);
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.feature-visual::before {
    content: "";
    position: absolute;
    inset: -20% auto auto -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    opacity: 0.6;
    filter: blur(24px);
    transition: transform 600ms ease, opacity 600ms ease;
}

.feature-visual img {
    width: 280px;
    border-radius: 32px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}

.feature-visual:hover::before {
    transform: translate3d(6%, 8%, 0);
    opacity: 0.9;
}

/* Privacy Section */
.privacy-compact {
    max-width: 800px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    padding: 4rem;
    backdrop-filter: blur(20px);
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.privacy-item h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.privacy-item p {
    font-size: 0.9rem;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--panel-border);
}

.footer-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer-links {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Reveals */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition:
        opacity 700ms cubic-bezier(0.2, 0, 0, 1),
        transform 900ms cubic-bezier(0.2, 0, 0, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

[data-reveal="slide-left"] {
    transform: translate3d(-56px, 0, 0);
}

[data-reveal="slide-right"] {
    transform: translate3d(56px, 0, 0);
}

[data-reveal="slow-rise"] {
    transform: translate3d(0, 42px, 0) scale(0.98);
    transition-duration: 900ms, 1200ms;
}

[data-reveal="zoom"] {
    transform: translate3d(0, 18px, 0) scale(0.92);
}

[data-reveal].in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

@keyframes ambientDrift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
    100% {
        transform: translate3d(3%, 2%, 0) scale(1.06);
    }
}

@keyframes ambientPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.5;
    }
}

@keyframes ringPulse {
    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.04);
        opacity: 0.45;
    }
}

@media (max-width: 900px) {
    .feature-split {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .feature-split.reversed {
        direction: ltr;
    }

    .section-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-mockup {
        width: 260px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .story-step {
        min-height: auto;
        padding: 1.5rem 0;
    }

    .story-step.is-active {
        transform: none;
    }

    .story-visual-wrap {
        position: relative;
        top: 0;
    }

    .story-visual {
        min-height: 540px;
    }

    .feature-visual {
        padding: 2rem;
    }

    .feature-visual img {
        width: 220px;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .footer-shell {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .story-step {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .story-visual {
        min-height: 460px;
    }

    .privacy-compact {
        padding: 2.5rem 1.5rem;
    }
}

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

    .bg-stellar::before,
    .bg-stellar::after,
    .story-rings span {
        animation: none;
    }

    [data-reveal],
    .story-screen,
    .btn,
    .feature-visual::before,
    .site-header,
    .bg-stellar::before,
    .bg-stellar::after {
        transition: none;
    }
}
