:root {
  --paper: oklch(98.4% 0.004 95);
  --paper-dim: oklch(96.2% 0.006 95);
  --ink: oklch(22% 0.012 260);
  --ink-soft: oklch(37% 0.014 260);
  --muted: oklch(50% 0.014 260);
  --hairline: oklch(89% 0.008 95);
  --accent: oklch(51% 0.1 225);          /* ghost-eye cyan, inked down for paper */
  --accent-glow: oklch(80% 0.115 210);   /* the eye glow itself, for dark surfaces */
  --night: #0b0e13;
  --night-2: #151b23;
  --night-line: rgba(255,255,255,0.10);
  --night-text: #f4f6f8;
  --night-soft: rgba(244,246,248,0.72);
  --ok: oklch(68% 0.14 155);
  --warn: oklch(75% 0.14 80);
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: oklch(88% 0.07 210); color: var(--ink); }
img, video, svg { display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- nav ---------- */
nav {
  display: flex; align-items: center; gap: 28px;
  padding: 20px clamp(16px, 4vw, 40px);
  max-width: 1120px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 0.95rem; color: var(--ink-soft); }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 9px 18px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  transition: transform 0.18s var(--ease), background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: oklch(30% 0.014 260); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn.ghost-btn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn.ghost-btn:hover { box-shadow: inset 0 0 0 1px oklch(76% 0.01 95); background: var(--paper-dim); }
.btn.big { font-size: 1.04rem; padding: 13px 24px; border-radius: 11px; }

/* ---------- hero ---------- */
header.hero { padding: clamp(24px, 5vh, 64px) 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft);
  padding: 5px 12px 5px 8px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hairline); background: color-mix(in oklch, var(--paper), white 40%);
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ok), transparent 80%); }
.hero h1 {
  margin-top: 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.2vw, 4.35rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 12ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub {
  margin-top: 22px; max-width: 590px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft); text-wrap: pretty;
}
.hero .cta { margin-top: 30px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 0.84rem; color: var(--muted); font-family: var(--mono); }
.hero .fine a { text-decoration: underline; text-underline-offset: 3px; }

/* the stage: a MacBook playing the real app */
.stage { position: relative; max-width: 1240px; margin: clamp(52px, 7vh, 76px) auto 0; padding: 0 clamp(16px, 4vw, 40px); }
.peek {
  position: absolute; top: -50px; right: clamp(52px, 11%, 150px);
  width: 90px; z-index: 0;
  transform: rotate(-3deg);
  filter: drop-shadow(0 6px 14px oklch(30% 0.02 260 / 0.22));
  animation: rise 1s var(--ease) 0.6s both;
}
@keyframes rise { from { transform: translateY(30px) rotate(-3deg); opacity: 0; } to { transform: rotate(-3deg); opacity: 1; } }
.device { position: relative; z-index: 1; }
.bezel {
  position: relative;
  border-radius: clamp(14px, 2.1vw, 28px);
  background: #08090b;
  padding: clamp(5px, 0.95vw, 13px);
  box-shadow:
    inset 0 0 0 1px #3a3c42,
    inset 0 0 0 clamp(2px, 0.22vw, 3px) #16171a,
    0 60px 120px -50px oklch(25% 0.03 250 / 0.55),
    0 30px 60px -35px oklch(25% 0.03 250 / 0.4);
}
.screen {
  position: relative; overflow: hidden;
  border-radius: clamp(6px, 1.05vw, 15px);
  aspect-ratio: 2560 / 1656;
  background: var(--night) url("media/hero-poster.webp") center / cover no-repeat;
}
.screen video { width: 100%; height: 100%; object-fit: cover; }
.base {
  position: relative; height: clamp(10px, 1.45vw, 19px);
  margin: 0 -6.2%;
  background: linear-gradient(180deg, #e2e4e8 0%, #c9ccd2 48%, #a3a7af 100%);
  border-radius: 2px 2px clamp(12px, 2vw, 26px) clamp(12px, 2vw, 26px) / 2px 2px clamp(8px, 1.3vw, 16px) clamp(8px, 1.3vw, 16px);
  box-shadow: 0 22px 34px -22px oklch(25% 0.03 250 / 0.45), inset 0 1px 0 rgba(255,255,255,0.85);
}
.base::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 13%; height: 46%; border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #9ea2aa, #c4c7cd);
}

.chapters {
  list-style: none; margin: 30px auto 0; max-width: 960px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2.4vw, 28px);
}
.chapters li { cursor: pointer; font-size: 0.93rem; line-height: 1.35; color: var(--muted); transition: color .2s; }
.chapters li b { display: block; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
.chapters li .n { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; }
.chapters li .bar { display: block; height: 2px; border-radius: 2px; background: var(--hairline); margin-bottom: 12px; overflow: hidden; }
.chapters li .bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.chapters li.on b { color: var(--ink); }
.chapters li:hover b { color: var(--ink); }
.film-row { display: flex; justify-content: center; margin-top: 26px; }
.film-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 0.92rem var(--sans); color: var(--ink);
  padding: 8px 16px 8px 9px; border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in oklch, var(--paper), white 50%); box-shadow: inset 0 0 0 1px var(--hairline);
  transition: box-shadow .15s, transform .18s var(--ease);
}
.film-btn:hover { box-shadow: inset 0 0 0 1px oklch(76% 0.01 95); transform: translateY(-1px); }
.film-btn .play { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.film-btn .play svg { width: 10px; height: 10px; margin-left: 2px; }
.film-btn .len { font-family: var(--mono); font-weight: 400; font-size: 0.8rem; color: var(--muted); }

/* works-with strip */
.works {
  margin-top: clamp(56px, 9vh, 96px);
  padding: 22px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); flex-wrap: wrap;
}
.works > span { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.works ul { list-style: none; display: flex; flex-wrap: wrap; gap: clamp(14px, 2.6vw, 30px); align-items: center; }
.works li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; color: var(--ink-soft); }
.works li svg { width: 17px; height: 17px; color: var(--ink); }

/* ---------- features ---------- */
section.feature { padding: clamp(72px, 12vh, 136px) 0 0; }
.f-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5.5vw, 80px); align-items: center; }
.f-grid.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.f-grid.flip .f-copy { order: 2; }
.kicker { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.02em; }
.feature h2 {
  font-family: var(--display); font-weight: 650;
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
  line-height: 1.07; letter-spacing: -0.025em;
  margin-top: 10px; text-wrap: balance;
}
.feature p { margin-top: 16px; color: var(--ink-soft); max-width: 470px; text-wrap: pretty; }
.feature p code, .terminal-things code { font-family: var(--mono); font-size: 0.86em; background: var(--paper-dim); padding: 1px 5px; border-radius: 4px; }
.legend { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend .spin { border: 2px solid var(--accent); border-right-color: transparent; background: transparent; width: 10px; height: 10px; }
.legend .amber { background: var(--warn); }
.legend .green { background: var(--ok); }

.clip {
  position: relative; overflow: hidden;
  border-radius: clamp(12px, 1.6vw, 18px);
  aspect-ratio: 1600 / 1035;
  background: var(--night) center / cover no-repeat;
  box-shadow: 0 0 0 1px oklch(22% 0.012 260 / 0.08), 0 30px 70px -34px oklch(25% 0.03 250 / 0.5), 0 12px 24px -16px oklch(25% 0.03 250 / 0.3);
}
.clip video { width: 100%; height: 100%; object-fit: cover; }
.clip .tag {
  position: absolute; left: 14px; bottom: 12px;
  font: 500 0.72rem var(--mono); color: var(--night-soft);
  padding: 4px 9px; border-radius: 999px; background: rgba(11,14,19,0.66); box-shadow: inset 0 0 0 1px var(--night-line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* team vignette */
.vig { font-family: var(--mono); font-size: 0.78rem; }
.mini {
  background: var(--night); color: #d9dde3;
  border-radius: 11px; padding: 13px 15px; line-height: 1.7;
  box-shadow: 0 18px 40px -22px oklch(20% 0.02 260 / 0.5);
}
.mini .dim { color: rgba(217,221,227,0.62); }
.mini .cyan { color: var(--accent-glow); }
.mini .green { color: var(--ok); }
.team { display: grid; gap: 10px; }
.team .workers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.team .mini { padding: 11px 13px; font-size: 0.74rem; }
.team .lead { font-size: 0.8rem; }
.team .arrows { display: grid; grid-template-columns: repeat(3, 1fr); color: var(--muted); text-align: center; font-size: 0.85rem; }

/* plain list, no cards */
.terminal-things { columns: 2; column-gap: clamp(28px, 5vw, 64px); margin-top: 28px; max-width: 760px; }
.terminal-things li {
  list-style: none; break-inside: avoid;
  padding: 11px 0; border-bottom: 1px solid var(--hairline);
  font-size: 0.97rem; color: var(--ink-soft);
}
.terminal-things li b { color: var(--ink); font-weight: 600; display: block; font-size: 1rem; }

/* ---------- download ---------- */
.download {
  margin-top: clamp(96px, 15vh, 170px);
  background: var(--night);
  color: var(--night-text);
  position: relative; overflow: hidden;
}
.download::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 360px at 12% 0%, rgba(111,216,232,0.14), transparent 70%), radial-gradient(600px 400px at 90% 110%, rgba(124,108,255,0.12), transparent 70%);
  pointer-events: none;
}
.download .wrap { padding-top: clamp(64px, 10vh, 110px); padding-bottom: clamp(64px, 10vh, 110px); position: relative; }
.download h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  letter-spacing: -0.03em; line-height: 1.04;
  max-width: 580px; text-wrap: balance;
}
.download p { margin-top: 16px; color: var(--night-soft); max-width: 470px; }
.download p > a { text-decoration: underline; text-underline-offset: 3px; }
.download .cta { margin-top: 34px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.download .btn { background: var(--night-text); color: var(--night); }
.download .btn:hover { background: #fff; }
.download .btn.ghost-btn { background: transparent; color: var(--night-text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.download .btn.ghost-btn:hover { background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); }
.download .fine { margin-top: 14px; font-family: var(--mono); font-size: 0.8rem; color: rgba(244,246,248,0.6); }
.download .fine a { text-decoration: underline; text-underline-offset: 3px; }
.download .big-ghost {
  position: absolute; right: clamp(-40px, 2vw, 60px); bottom: -26px;
  width: clamp(220px, 30vw, 360px); pointer-events: none;
  transform: rotate(2deg);
}
.download .big-ghost .eyes { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }

/* ---------- footer ---------- */
footer { background: var(--night); color: rgba(244,246,248,0.6); border-top: 1px solid var(--night-line); }
footer .wrap { display: flex; align-items: center; gap: 20px; padding-top: 22px; padding-bottom: 26px; font-size: 0.85rem; flex-wrap: wrap; }
footer .flinks { margin-left: auto; display: flex; gap: 20px; }
footer a:hover { color: var(--night-text); }

/* ---------- film dialog ---------- */
dialog.film { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); width: 100%; margin: auto; overflow: visible; }
dialog.film::backdrop { background: rgba(8,10,14,0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.film video { width: 100%; border-radius: 14px; background: #000; box-shadow: 0 40px 120px rgba(0,0,0,0.5); aspect-ratio: 1920 / 1242; }
dialog.film .close {
  position: absolute; top: -44px; right: 0; border: 0; cursor: pointer;
  font: 500 0.9rem var(--sans); color: #fff; background: rgba(255,255,255,0.12); padding: 6px 12px; border-radius: 999px;
}
dialog.film .close:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) {
  .peek, .download .big-ghost .eyes { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .f-grid, .f-grid.flip { grid-template-columns: 1fr; gap: 28px; }
  .f-grid.flip .f-copy { order: 0; }
  .terminal-things { columns: 1; }
  .nav-links a:not(.pricing-link) { display: none; }
  .chapters { grid-template-columns: 1fr; gap: 14px; max-width: 520px; }
  .chapters li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: start; }
  .chapters li .bar { grid-column: 1 / -1; margin-bottom: 8px; }
  .download .big-ghost { width: 132px; right: -26px; bottom: -34px; opacity: 0.5; }
  .peek { right: 12%; width: 58px; top: -34px; }
  .base { margin: 0 -4%; }
}
@media (max-width: 520px) {
  nav { gap: 14px; }
  nav > .btn { padding: 9px 12px; }
  .nav-links { font-size: 0.88rem; }
  .team .workers { grid-template-columns: 1fr; }
  .team .arrows { display: none; }
  .hero .cta .btn.big { width: 100%; justify-content: center; }
}
