/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:         #08070d;
  --bg-soft:    #0f0e18;
  --card:       #14131f;
  --ink:        #f1f0f5;
  --ink-soft:   rgba(241,240,245,0.72);
  --ink-mute:   rgba(241,240,245,0.48);
  --ink-faint:  rgba(241,240,245,0.28);
  --line:       rgba(241,240,245,0.1);
  --line-strong: rgba(241,240,245,0.18);

  --pearl-1:    #8fd6ff;
  --pearl-2:    #b9a4ff;
  --pearl-3:    #ffb3d6;
  --iridescent: linear-gradient(120deg, var(--pearl-1) 0%, var(--pearl-2) 50%, var(--pearl-3) 100%);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-weight: 300;
  line-height: 1.6; overflow-x: clip;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.08; }
::selection { background: var(--pearl-2); color: #08070d; }

.container { max-width: 1180px; margin-inline: auto; padding-inline: 1.5rem; }
.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: var(--bg); padding: .75rem 1.25rem; border-radius: 6px;
}
.skip-link:focus { left: 1rem; top: 1rem; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =============================================================
   3. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 610;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), padding .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(8,7,13,0.82); backdrop-filter: blur(14px);
  border-bottom-color: var(--line); padding: 1rem 2rem;
}
.nav-brand { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.28em; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 2.5rem; font-size: .82rem; letter-spacing: .04em; }
.nav-links a:not(.nav-cta) { color: var(--ink-mute); transition: color .3s; position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px;
  background: var(--pearl-2); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 32px; height: 32px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; position: relative; z-index: 620; }
.nav-toggle span { width: 20px; height: 1px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.9rem; border-radius: 100px; font-size: .82rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-position .6s ease;
}
.btn-iridescent {
  background: var(--iridescent); background-size: 200% 100%; color: #08070d;
  box-shadow: 0 18px 40px -18px rgba(139,166,255,0.55);
}
.btn-iridescent:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 22px 48px -16px rgba(185,164,255,0.6); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--pearl-2); color: var(--pearl-2); }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; justify-content: center; gap: inherit; will-change: transform; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 6rem 1.5rem 3rem;
}
.hero-media { position: absolute; inset: 0; z-index: 0; background: #08070d url('assets/img/threshold-poster.webp') center/cover no-repeat; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.no-video .hero-media video { display: none; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(8,7,13,0.55) 0%, rgba(8,7,13,0.2) 32%, rgba(8,7,13,0.35) 68%, rgba(8,7,13,0.92) 100%);
}
.hero-vignette {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, rgba(8,7,13,0.55) 100%);
}
.hero-glow {
  position: absolute; inset: -20%; z-index: 1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 42%), rgba(185,164,255,0.16), transparent 60%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .6s;
}
.hero.is-ready .hero-glow { opacity: 1; }

.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 1.6rem;
}
.hero-kicker::before, .hero-kicker::after { content: ""; width: 24px; height: 1px; background: var(--ink-faint); }
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 400;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.hero-title em { font-style: normal; background: var(--iridescent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub {
  margin-top: 1.6rem; font-size: 1.05rem; color: var(--ink-soft); max-width: 46ch; margin-inline: auto;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--ink-mute);
}
.hero-scroll-hint span { width: 1px; height: 34px; background: linear-gradient(180deg, var(--ink-mute), transparent); animation: scrollLine 2.4s ease-in-out infinite; }
@keyframes scrollLine { 0% { opacity: 0; transform: scaleY(0); transform-origin: top; } 40% { opacity: 1; transform: scaleY(1); transform-origin: top; } 60% { opacity: 1; transform: scaleY(1); transform-origin: bottom; } 100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; } }

/* =============================================================
   6. Manifesto
   ============================================================= */
.manifesto { padding: 8rem 0; }
.manifesto-inner { max-width: 780px; margin-inline: auto; text-align: center; }
.manifesto p {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.5; color: var(--ink-soft);
}
.manifesto em { font-style: normal; color: var(--ink); }
.manifesto-sign { margin-top: 2.5rem; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--ink-mute); }

/* =============================================================
   7. Section shared
   ============================================================= */
.section { padding: 7rem 0; }
.section-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--pearl-1); }
.section-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pearl-1); box-shadow: 0 0 12px var(--pearl-1); }
.section-title { margin-top: .8rem; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 400; }
.section-head { max-width: 640px; }

/* =============================================================
   8. Features trio
   ============================================================= */
.features-grid { margin-top: 3.5rem; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; grid-template-columns: repeat(3, 1fr); }
.feature { background: var(--bg); padding: 2.6rem 2rem; position: relative; isolation: isolate; transition: background .4s; }
.feature::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx,50%) var(--my,50%), rgba(185,164,255,0.14), transparent 60%);
}
.feature:hover::before { opacity: 1; }
.feature-index { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); }
.feature-title { margin-top: 1.2rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.feature-desc { margin-top: .8rem; font-size: .92rem; color: var(--ink-soft); line-height: 1.7; }

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

/* =============================================================
   9. Notes / specs (mono table)
   ============================================================= */
.notes { background: var(--bg-soft); }
.notes-grid { margin-top: 3.5rem; display: grid; gap: 2.5rem; grid-template-columns: repeat(3, 1fr); }
.notes-col { border-top: 1px solid var(--line-strong); padding-top: 1.4rem; }
.notes-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.notes-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.notes-list li { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.notes-list li span { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); }

.specs-table { margin-top: 4.5rem; width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .85rem; }
.specs-table tr { border-top: 1px solid var(--line); }
.specs-table tr:last-child { border-bottom: 1px solid var(--line); }
.specs-table td { padding: 1rem .5rem; }
.specs-table td:first-child { color: var(--ink-mute); letter-spacing: .04em; }
.specs-table td:last-child { text-align: right; color: var(--ink); }

@media (max-width: 780px) { .notes-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* =============================================================
   10. Gallery
   ============================================================= */
.gallery { padding: 0; }
.gallery-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; background: var(--line); height: 640px; }
.gallery-cell { position: relative; overflow: hidden; background: var(--card); }
.gallery-cell img, .gallery-cell video { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.92); transition: transform .8s var(--ease-soft), filter .8s; }
.gallery-cell:hover img, .gallery-cell:hover video { transform: scale(1.05); filter: saturate(1.05) brightness(1); }

@media (max-width: 780px) { .gallery-strip { grid-template-columns: 1fr; height: auto; } .gallery-cell { aspect-ratio: 4/5; } }

/* =============================================================
   11. Testimonials
   ============================================================= */
.press { padding: 6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.press-grid { display: grid; gap: 3rem; grid-template-columns: repeat(3, 1fr); }
.press-quote { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.6; color: var(--ink-soft); }
.press-source { margin-top: 1.2rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--ink-mute); text-transform: uppercase; }

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

/* =============================================================
   12. Final CTA
   ============================================================= */
.cta-final { text-align: center; padding: 8rem 0; position: relative; overflow: hidden; }
.cta-final-glow {
  position: absolute; left: 50%; top: 50%; width: 900px; height: 500px; transform: translate(-50%,-50%);
  background: radial-gradient(ellipse, rgba(185,164,255,0.14), transparent 65%); pointer-events: none;
}
.cta-final-inner { position: relative; max-width: 620px; margin-inline: auto; }
.cta-final .section-title { margin-top: 1rem; }
.cta-final p { margin-top: 1.2rem; color: var(--ink-soft); }
.cta-form { margin-top: 2.4rem; display: flex; gap: .75rem; max-width: 420px; margin-inline: auto; }
.cta-form input {
  flex: 1; background: var(--card); border: 1px solid var(--line-strong); border-radius: 100px;
  padding: .9rem 1.3rem; color: var(--ink); font-family: var(--font-body); font-size: .88rem;
}
.cta-form input::placeholder { color: var(--ink-faint); }
.cta-form input:focus { outline: none; border-color: var(--pearl-2); }
.cta-note { margin-top: 1rem; font-size: .76rem; color: var(--ink-faint); }
.cta-success { display: none; margin-top: 2.4rem; font-family: var(--font-mono); font-size: .85rem; color: var(--pearl-1); }
.cta-success.is-visible { display: block; }
.cta-wrap.is-sent .cta-form, .cta-wrap.is-sent .cta-note { display: none; }

/* =============================================================
   13. Footer
   ============================================================= */
.footer { padding: 3.5rem 0 2rem; border-top: 1px solid var(--line); }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; }
.footer-brand { font-family: var(--font-display); font-size: 1rem; letter-spacing: .24em; }
.footer-tagline { margin-top: .6rem; font-size: .8rem; color: var(--ink-mute); max-width: 32ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .8rem; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; }
.footer-links a { color: var(--ink-mute); }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }

/* =============================================================
   14. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-scroll-hint span { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* =============================================================
   15. Responsive
   ============================================================= */
.nav-scrim {
  position: fixed; inset: 0; z-index: 590; background: rgba(8,7,13,0.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-out);
}
.nav-scrim.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 76px; right: 0; z-index: 600; height: calc(100vh - 76px); width: min(80vw, 320px);
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    padding: 2rem 1.8rem; background: var(--bg-soft); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .5s var(--ease-out);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a:not(.nav-cta) { display: block; width: 100%; padding: 1.1rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin-top: 1.6rem; width: 100%; text-align: center; }
  .section { padding: 5rem 0; }
  .press-grid, .features-grid { gap: 1px; }
}
