@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/space-grotesk-variable.woff2') format('woff2');
}

:root {
  --bg: #08090a;
  --surface: #101214;
  --surface-2: #16191b;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.17);

  --text: #f4f5f4;
  --muted: #9ca3a1;
  --dim: #7c8381;

  --accent: #cdf564;
  --accent-press: #b9e148;
  --accent-wash: rgba(205, 245, 100, 0.12);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --nav-h: 4rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-variation-settings: 'wght' 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #070a02; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: #2a2e30 var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2e30; border: 3px solid var(--bg); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3a3f41; }
a { color: inherit; text-underline-offset: 0.2em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #070a02; padding: 0.8rem 1.25rem;
  font-size: 0.82rem; font-variation-settings: 'wght' 700; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ================= TYPE ================= */
h1, h2, h3, h4 { margin: 0; font-variation-settings: 'wght' 700; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.028em; }
h3 { font-size: 1.15rem; letter-spacing: -0.012em; line-height: 1.3; font-variation-settings: 'wght' 660; }
h4 { font-size: 0.95rem; letter-spacing: -0.006em; font-variation-settings: 'wght' 660; }
p { margin: 0 0 1.15em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }
strong { font-variation-settings: 'wght' 680; color: var(--text); }
.accent { color: var(--accent); }

.sub { font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.55; color: var(--muted); max-width: 46ch; }
.label {
  font-size: 0.75rem; font-variation-settings: 'wght' 640;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); line-height: 1.4;
}
.muted { color: var(--muted); }
/* Sentence-length fine print: small and quiet, never all-caps */
.fine { font-size: 0.85rem; line-height: 1.55; color: var(--dim); max-width: 60ch; }

/* ================= NAV ================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 2rem;
  height: var(--nav-h); padding: 0 var(--pad);
  background: rgba(8, 9, 10, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__mark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex: none; }
.nav__mark svg { width: 20px; height: 20px; display: block; color: var(--text); }
.nav__mark span { font-size: 0.98rem; font-variation-settings: 'wght' 720; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 1.75rem; margin-left: auto; align-items: center; }
.nav__links a {
  text-decoration: none; font-size: 0.9rem; color: var(--muted);
  transition: color 150ms ease;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { flex: none; }
.nav__burger { display: none; }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 0.94rem; font-variation-settings: 'wght' 640;
  letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms var(--ease-out), color 160ms ease;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:active { transform: scale(0.975); }
.btn--primary { background: var(--accent); color: #070a02; }
.btn--primary:hover { background: var(--accent-press); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: rgba(255,255,255,0.34); background: rgba(255,255,255,0.04); }
.btn--sm { padding: 0.6rem 1.05rem; font-size: 0.87rem; }

/* ================= LAYOUT ================= */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section--flush { border-top: 0; }
.section__head { max-width: 52ch; margin-bottom: clamp(2.5rem, 4vw, 3.75rem); }
.section__head h2 + p { margin-top: 1.15rem; }

/* ================= HERO ================= */
.hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 5vw, 4.5rem); }
.hero .wrap { max-width: 1320px; }
.hero__grid {
  display: grid; grid-template-columns: minmax(280px, 0.72fr) minmax(560px, 1.28fr);
  gap: clamp(1.5rem, 3.5vw, 3.75rem); align-items: center;
}
.hero__grid > div:first-child { position: relative; z-index: 2; }
.hero h1 { margin-bottom: 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.1rem; }
.hero__proof {
  margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--muted); max-width: 44ch;
}
.hero__proof strong { color: var(--text); }

/* ================= TILES ================= */
.tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.tile { background: var(--surface); padding: 1.5rem 1.4rem; }
.tile__fig { font-size: clamp(1.85rem, 2.6vw, 2.35rem); font-variation-settings: 'wght' 700; letter-spacing: -0.035em; line-height: 1.05; }
.tile__label { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); }
.tile__prov { margin-top: 0.9rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-variation-settings: 'wght' 620; }

/* ================= CARDS ================= */
.grid { display: grid; gap: 1rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card h3 { margin-bottom: 0.55rem; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card__step {
  font-size: 0.82rem; font-variation-settings: 'wght' 680;
  letter-spacing: 0.06em; color: var(--accent); margin-bottom: 1.6rem;
  display: block;
}

/* Panel: a wide feature surface */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3vw, 2.75rem);
}
.panel--split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1.75rem, 3vw, 3rem); align-items: center; }

/* Readout rows */
.rows { display: flex; flex-direction: column; }
.rows__row {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline;
  padding: 0.95rem 0; border-bottom: 1px solid var(--line);
}
.rows__row:last-child { border-bottom: 0; }
.rows__row b { font-size: 1.12rem; font-variation-settings: 'wght' 700; letter-spacing: -0.02em; }
.rows__row .label { margin-top: 0.25rem; }

/* In development: present, labeled, visually subordinate */
.dev { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.dev .card__step { color: var(--muted); }
.flag {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 1.15rem;
  padding: 0.34rem 0.7rem; border-radius: 999px; border: 1px dashed var(--line-strong);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  font-variation-settings: 'wght' 640;
}
.flag--live { border-style: solid; border-color: rgba(205,245,100,0.45); color: var(--accent); }

/* ================= CTA ================= */
.cta { text-align: center; }
.cta h2 { max-width: 18ch; margin: 0 auto 1.15rem; }
.cta .sub { margin: 0 auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-top: 2.1rem; }

/* ================= FOOTER ================= */
.foot { border-top: 1px solid var(--line); padding: clamp(3rem, 5vw, 4.5rem) 0 2.5rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem 2rem; }
.foot__col .foot__label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; font-variation-settings: 'wght' 640; }
.foot__col a { display: block; text-decoration: none; color: var(--muted); font-size: 0.94rem; padding: 0.3rem 0; transition: color 150ms ease; }
.foot__col a:hover { color: var(--text); }
.foot__bottom {
  display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center;
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--dim);
}
.foot__bottom a { color: var(--dim); text-decoration: none; }
.foot__bottom a:hover { color: var(--muted); }

/* ================= REVEAL ================= */
.rv { opacity: 0; transform: translateY(16px); }
.rv.in { opacity: 1; transform: none; transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1040px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .device { order: -1; width: min(300px, 100%); }
  .panel--split { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

/* The full link row stops fitting well before the phone breakpoint */
@media (max-width: 900px) {
  .nav__cta { display: none; }
  .nav__burger {
    display: grid; place-items: center; margin-left: auto;
    width: 38px; height: 34px; border-radius: 9px;
    background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
  }
  .nav__burger svg { width: 17px; height: 17px; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; margin: 0; padding: 0.5rem var(--pad) 1.25rem;
    background: rgba(8,9,10,0.97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav__links[data-open="true"] { display: flex; }
  .nav__links a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
}

@media (max-width: 620px) {
  .tiles { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__actions .btn, .cta__actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rv, .rv.in { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: background-color 160ms ease, border-color 160ms ease; }
}

/* ================= MACHINE STAGE =================
   A real, textured 3D reconstruction of the hero photo. The visitor drags
   or touches it directly; the tag hotspot tracks the model's own surface. */
.stage { position: relative; justify-self: center; width: 100%; max-width: 920px; }
/* The classic intrinsic-ratio box: aspect-ratio alone is unreliable on a
   custom element inside a center-aligned grid item across engines, so the
   square is built from padding instead and the viewer fills it absolutely. */
.stage__box {
  position: relative; width: 100%; padding-bottom: 100%;
  background: radial-gradient(120% 90% at 62% 32%, #16191c 0%, #0a0b0c 62%, #08090a 100%);
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
}
.stage__viewer {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover;
}

/* The hotspot sits over a static hero image now (see .hotspot--static below)
   -- there's no model-viewer tracking its 3D position across a rotation
   anymore, just a fixed point measured from the source render. */
.hotspot {
  width: 26px; height: 26px; border: 0; padding: 0; cursor: pointer; border-radius: 50%;
  background: transparent; position: relative;
}
.hotspot--static {
  position: absolute; transform: translate(-50%, -50%);
}
.hotspot::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px 2px rgba(205,245,100,0.55);
}
.hotspot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0;
}
.stage[data-fired="false"] .hotspot::after { animation: hs 2.4s var(--ease-out) infinite; }
@keyframes hs {
  0% { transform: scale(0.55); opacity: 0.9; }
  70%, 100% { transform: scale(1.9); opacity: 0; }
}
.hotspot:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* The card the tap produces */
.tapcard {
  position: absolute; right: clamp(0.75rem, 3%, 1.4rem); bottom: clamp(0.75rem, 3%, 1.4rem);
  width: min(214px, 46%);
  background: rgba(12, 14, 16, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 0.95rem 1.05rem;
  opacity: 0; transform: translateY(12px) scale(0.97);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
  pointer-events: none;
}
.stage[data-fired="true"] .tapcard { opacity: 1; transform: none; }
.tapcard__top { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; }
.tapcard__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tapcard__name { font-size: 1.05rem; font-variation-settings: 'wght' 700; letter-spacing: -0.025em; margin-bottom: 0.65rem; }
.tapcard__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; padding: 0.34rem 0; border-top: 1px solid var(--line); }
.tapcard__row span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-variation-settings: 'wght' 620; }
.tapcard__row b { font-size: 0.92rem; font-variation-settings: 'wght' 700; letter-spacing: -0.02em; }

.stage__controls { margin-top: 0.9rem; display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.stage__controls p { margin: 0; color: var(--dim); font-size: 0.82rem; text-align: center; }
.stage__demo { white-space: nowrap; }

@media (max-width: 960px) {
  .stage { order: -1; width: min(560px, 100%); }
}
@media (max-width: 620px) {
  .stage__controls { align-items: stretch; gap: 0.75rem; }
  .stage__controls p { width: 100%; }
  .stage__demo { width: 100%; }
}

/* Scroll-driven entrance: composited by the browser, zero JS. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stage {
      animation: stage-rise linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 40%;
    }
    @keyframes stage-rise {
      from { transform: translateY(22px) scale(0.97); opacity: 0.55; }
      to   { transform: none; opacity: 1; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage[data-fired="false"] .hotspot::after { animation: none; opacity: 0.55; }
  .tapcard { transition: none; }
}

.card__mark { display: block; margin-bottom: 1rem; }
