:root {
    --ink: #0a0a0f;
    --ink-2: #13131b;
    --ink-3: #1c1c27;
    --line: rgba(255, 255, 255, 0.09);
    --paper: #f4f1ea;
    --muted: #9a98a6;
    --blue: #3f7bff;
    --violet: #8b6cff;
    --pink: #ff7ab8;
    --green: #5af2a6;
    --grad: linear-gradient(100deg, var(--blue) 0%, var(--violet) 45%, var(--pink) 100%);
    --sans: 'Inter Tight', system-ui, sans-serif;
    --serif: 'Instrument Serif', Georgia, serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.mono { font-family: var(--mono); }
::selection { background: var(--pink); color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 6px; }

#glyph-field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}
main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--gutter);
    transition: background .3s, border-color .3s, padding .3s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(10, 10, 15, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: var(--line);
    padding-top: 12px; padding-bottom: 12px;
}
.brand img { height: 30px; width: auto; filter: invert(1); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
    text-decoration: none;
    font-size: 15px;
    color: var(--muted);
    transition: color .2s;
}
.nav-links a:hover { color: var(--paper); }
.nav-links .nav-cta {
    color: var(--ink);
    background: var(--paper);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
}
.nav-links .nav-cta:hover { color: var(--ink); background: #fff; }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.menu-btn span {
    position: absolute; left: 9px; right: 9px; height: 2px; background: var(--paper);
    transition: transform .3s, top .3s;
}
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Shared ---------- */
.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(80px, 12vw, 160px) var(--gutter) 0;
}
.section-head { max-width: 780px; margin-bottom: 56px; }
h2 {
    font-size: clamp(36px, 5.6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 600;
    margin: 18px 0 20px;
}
h2 em { font-size: 1.08em; letter-spacing: -0.01em; }
.section-lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 560px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 26px;
    border-radius: 999px;
    transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-light span { transition: transform .2s; }
.btn-light:hover span { transform: translateX(4px); }
.btn-ghost { border: 1px solid var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .35); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 140px var(--gutter) 80px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas:
        "eyebrow visual"
        "title   visual"
        "lede    visual"
        "actions visual";
    grid-template-rows: auto auto auto auto;
    column-gap: 56px;
    align-content: center;
}
.hero .eyebrow { grid-area: eyebrow; }
.pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(90, 242, 166, .6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(90, 242, 166, .55); }
    70% { box-shadow: 0 0 0 10px rgba(90, 242, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(90, 242, 166, 0); }
}
.hero-title {
    grid-area: title;
    font-size: clamp(48px, 7.6vw, 112px);
    line-height: .95;
    letter-spacing: -0.045em;
    font-weight: 600;
    margin: 24px 0 28px;
}
.hero-title > * { display: block; }
.hero-serif { font-size: 1.04em; letter-spacing: -0.02em; color: var(--muted); }
.decode { white-space: nowrap; }
.decode .g { color: var(--violet); opacity: .8; font-family: var(--mono); font-weight: 400; }
.gradient {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gradient .g { -webkit-text-fill-color: var(--pink); }
.hero-lede { grid-area: lede; color: var(--muted); font-size: clamp(17px, 1.7vw, 21px); max-width: 520px; }
.hero-actions { grid-area: actions; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; align-self: start; }

.hero-visual {
    grid-area: visual;
    align-self: center;
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
    transform: perspective(1200px) rotateY(var(--ry, -6deg)) rotateX(var(--rx, 2deg));
    transition: transform .4s ease-out;
    box-shadow: 0 40px 120px -30px rgba(139, 108, 255, .45);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 55% center; transform: scale(1.06); }
.hero-visual::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 15, .65));
}
.hero-visual-tag {
    position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1;
    display: flex; align-items: center; gap: 12px;
    font-size: 11px; letter-spacing: .2em; color: rgba(255, 255, 255, .85);
}
.tag-line { flex: 1; height: 1px; background: rgba(255, 255, 255, .5); position: relative; overflow: hidden; }
.tag-line::after {
    content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
    background: #fff; animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan { to { left: 100%; } }

/* ---------- Ticker ---------- */
.ticker {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    padding: 22px 0;
    background: rgba(19, 19, 27, .6);
    position: relative; z-index: 1;
}
.ticker-track {
    display: flex; gap: 36px; width: max-content;
    font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 36px);
    color: var(--muted);
    animation: tick 40s linear infinite;
}
.ticker-track span:nth-child(even) { color: var(--violet); font-style: normal; font-size: .6em; align-self: center; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Products ---------- */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.product {
    position: relative;
    overflow: hidden;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(28px, 3.4vw, 44px);
    min-height: 440px;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    transition: border-color .3s, transform .3s;
}
.product:hover { border-color: rgba(255, 255, 255, .2); transform: translateY(-4px); }
.product::before {
    content: "";
    position: absolute;
    width: 520px; height: 520px;
    right: -180px; bottom: -220px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .45;
    z-index: -1;
    transition: opacity .4s;
}
.product:hover::before { opacity: .7; }
.product-featured { grid-column: 1 / -1; min-height: 480px; }
.product-featured h3 { font-size: clamp(48px, 7vw, 96px); }
.product-featured .product-tagline { font-size: clamp(26px, 3vw, 40px); }
.product-scenaria::before { background: radial-gradient(circle, var(--pink), var(--violet) 60%, transparent 70%); }
.product-wifi::before { background: radial-gradient(circle, #12b9e4, var(--blue) 60%, transparent 70%); }
.product-rps::before { background: radial-gradient(circle, #ffb86b, #ff5f6d 60%, transparent 70%); }

.product-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.status {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
}
.status-live { color: var(--green); border-color: rgba(90, 242, 166, .35); }
.status-live::before { content: "● "; }
.status-flagship { color: var(--pink); border-color: rgba(255, 122, 184, .4); }
.product h3 {
    font-size: clamp(36px, 4.2vw, 56px);
    letter-spacing: -0.04em;
    line-height: 1;
    font-weight: 600;
    margin: auto 0 14px;
    padding-top: 80px;
}
.product-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; margin-bottom: 14px; }
.product p:not(.product-tagline) { color: var(--muted); max-width: 520px; }
.product-links { display: flex; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.product-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    padding-bottom: 2px;
    transition: border-color .2s;
}
.product-links a:hover { border-color: var(--paper); }

.product-art { position: absolute; top: 36px; right: 36px; z-index: -1; }
/* Scenaria: floating greetings */
.product-scenaria .product-art { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.product-scenaria .product-art span {
    font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2vw, 26px);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--line);
    padding: 6px 18px;
    border-radius: 18px 18px 4px 18px;
    animation: bob 5s ease-in-out infinite;
}
.product-scenaria .product-art span:nth-child(2) { animation-delay: -1.2s; margin-right: 40px; }
.product-scenaria .product-art span:nth-child(3) { animation-delay: -2.4s; }
.product-scenaria .product-art span:nth-child(4) { animation-delay: -3.6s; margin-right: 60px; }
@keyframes bob { 50% { transform: translateY(-8px); } }
/* WiFi: radiating rings */
.product-wifi .product-art { width: 180px; height: 180px; }
.product-wifi .product-art span {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1px solid rgba(18, 185, 228, .6);
    animation: ring 3.2s ease-out infinite;
    opacity: 0;
}
.product-wifi .product-art span:nth-child(2) { animation-delay: .8s; }
.product-wifi .product-art span:nth-child(3) { animation-delay: 1.6s; }
.product-wifi .product-art span:nth-child(4) { animation-delay: 2.4s; }
@keyframes ring { 0% { transform: scale(.15); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
/* RPS: cycling hands */
.product-rps .product-art { width: 90px; height: 90px; font-size: 64px; }
.product-rps .product-art span { position: absolute; inset: 0; opacity: 0; animation: cycle 3.6s infinite; }
.product-rps .product-art span:nth-child(2) { animation-delay: 1.2s; }
.product-rps .product-art span:nth-child(3) { animation-delay: 2.4s; }
@keyframes cycle { 0%, 30% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; transform: scale(.8) rotate(-10deg); } }

/* ---------- Manifesto ---------- */
.principles {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}
.principles li {
    padding: 36px 32px 8px 0;
    border-right: 1px solid var(--line);
}
.principles li + li { padding-left: 32px; }
.principles li:last-child { border-right: 0; }
.principle-num { color: var(--violet); font-size: 13px; }
.principles h3 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; margin: 18px 0 12px; font-weight: 600; }
.principles p { color: var(--muted); }

/* ---------- Lab ---------- */
.lab-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: end;
    background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(28px, 5vw, 64px);
}
.lab-inner h2 { margin-bottom: 16px; }
.lab-list { list-style: none; font-size: 14px; }
.lab-list li {
    display: flex; gap: 14px; align-items: center;
    padding: 18px 0;
    border-bottom: 1px dashed var(--line);
}
.lab-list li:last-child { border-bottom: 0; }
.lab-dot {
    flex: none; width: 10px; height: 10px; border-radius: 3px;
    background: var(--grad);
    animation: blink 2.4s infinite;
}
.lab-list li:nth-child(2) .lab-dot { animation-delay: .6s; }
.lab-list li:nth-child(3) .lab-dot { animation-delay: 1.2s; }
.lab-list li:nth-child(4) .lab-dot { animation-delay: 1.8s; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-card .section-lede { margin: 0 auto; }
.contact-email {
    margin-top: 44px;
    font-size: clamp(22px, 4.4vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 2px solid rgba(255, 122, 184, .35);
    padding-bottom: 6px;
    overflow-wrap: anywhere;
    transition: border-color .2s;
}
.contact-email:hover { border-color: var(--pink); }

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 28px var(--gutter);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "eyebrow" "title" "lede" "actions" "visual";
        grid-template-rows: auto;
        padding-top: 120px;
    }
    .hero-visual { margin-top: 56px; aspect-ratio: 3 / 2; transform: none; }
    .products { grid-template-columns: minmax(0, 1fr); }
    .principles { grid-template-columns: minmax(0, 1fr); }
    .principles li, .principles li + li { padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .lab-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
    .menu-btn { display: block; }
    .nav-links {
        position: fixed;
        inset: 66px 12px auto 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        background: rgba(19, 19, 27, .96);
        backdrop-filter: blur(14px);
        border: 1px solid var(--line);
        border-radius: 20px;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity .25s, transform .25s;
    }
    .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
    .nav-links a { display: block; padding: 12px 14px; font-size: 17px; color: var(--paper); }
    .nav-links .nav-cta { text-align: center; margin-top: 6px; }
    .decode { white-space: normal; }
    .product { min-height: 380px; }
    .product-art { position: relative; top: auto; right: auto; order: 1; align-self: flex-end; margin-top: 24px; }
    .product > :not(.product-meta):not(.product-art) { order: 2; }
    .product h3 { padding-top: 32px; }
    .product-wifi .product-art { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    .product-rps .product-art span:first-child { opacity: 1; }
    .product-wifi .product-art span { opacity: .5; }
}
