@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("/fonts/spline-sans-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --mat: #e3e6e1;      /* mat board: the page */
  --paper: #f5f6f2;    /* print paper: inputs, code */
  --ink: #1f2d3d;      /* blue-slate ink: text, terminal */
  --ink-soft: #4b5866; /* secondary text */
  --amber: #a8691a;    /* autumn leaves: prompts, focus */
  --amber-light: #e3a845;
  --moss: #3d5a48;     /* "ready" */
  --rule: #c5cbc6;

  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  /* Type scale, ratio ~1.25 */
  --step--1: 0.85rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: clamp(2rem, 1.4rem + 2.2vw, 2.8rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.4vw, 5rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 10vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mat);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem; }
.skip:focus { left: 0.5rem; z-index: 10; }

h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

/* Header */
.site-header { display: flex; align-items: baseline; justify-content: space-between; padding-block: 1.5rem; }
.wordmark { font-weight: 850; font-size: var(--step-1); letter-spacing: -0.04em; text-decoration: none; }
.header-link { font-weight: 550; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(2rem, 6vw, 5rem) var(--section);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 11ch;
}
.lede { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 34ch; }

/* Waitlist form */
.waitlist { margin-top: 2.25rem; max-width: 30rem; }
.waitlist label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.4rem; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.waitlist input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  font: inherit;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
.waitlist input::placeholder { color: #7d8791; }
.waitlist button {
  flex: 0 0 auto;
  font: 650 var(--step-0)/1 var(--sans);
  padding: 0.85rem 1.2rem;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.waitlist button:hover { background: #2c3e52; }
.waitlist button[disabled] { opacity: 0.6; cursor: progress; }
.form-note { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-soft); }
.form-note[data-state="ok"] { color: var(--moss); font-weight: 600; }
.form-note[data-state="error"] { color: #9b2c1f; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Contact sheet: the hero's one memorable moment */
.sheet {
  margin: 0;
  background: var(--ink);
  border-radius: 10px;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--mat);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 30px 60px -30px rgba(31,45,61,0.55);
}
.terminal pre {
  margin: 0;
  font: 400 clamp(0.7rem, 0.62rem + 0.35vw, 0.85rem)/1.6 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 13.5em;
}
.terminal .prompt { color: var(--amber-light); }
.terminal .ok { color: #8fc39f; }
.frames {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px dashed rgba(227,230,225,0.25);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.frame { position: relative; }
.frame img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 2px;
  background: #34465a;
}
/* Where to crop landscape photos into the 2:3 frames (inline styles are blocked by the CSP) */
.frame[data-frame="1"] img { object-position: 75% 50%; } /* 0600 */
.frame[data-frame="3"] img { object-position: 60% 50%; } /* 1037 */
.frame[data-frame="6"] img { object-position: 55% 50%; } /* 1395 */
.frame[data-frame="7"] img { object-position: 40% 50%; } /* 1441 */
.frame[data-frame="8"] img { object-position: 0% 50%; } /* 1557: crop out the artwork on the island */
.frame-no {
  display: block;
  font: 500 0.68rem/1 var(--mono);
  color: rgba(227,230,225,0.6);
  margin-bottom: 0.3rem;
}

/* Playback state, only when JS runs and motion is allowed */
.is-playing .terminal .line { visibility: hidden; }
.is-playing .terminal .line.is-shown { visibility: visible; }
.is-playing .frame img { filter: blur(12px) saturate(0.6); transform: scale(1.04); transition: filter 0.7s ease, transform 0.7s ease; }
.is-playing .frame { overflow: hidden; border-radius: 2px; }
.is-playing .frame.is-ready img { filter: none; transform: none; }

/* Section rules sit inside the gutters, aligned with the content */
.ruled {
  background: linear-gradient(var(--rule), var(--rule)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
}

/* Clients */
.clients {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: var(--section);
  align-items: center;
}
@media (min-width: 60rem) {
  .clients { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
}
.clients-photo { margin: 0; }
.clients-photo img { border-radius: 4px; max-height: min(44rem, 75vh); width: 100%; object-fit: cover; }
.clients h2, .build h2, .open h2, .cta h2 { font-size: var(--step-3); }
.clients-copy > p { margin-top: 1rem; font-size: var(--step-1); color: var(--ink-soft); max-width: 36ch; }
.features { margin: 2.5rem 0 0; display: grid; gap: 1.75rem; max-width: 38rem; }
.features dt { font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
.features dd { margin: 0.3rem 0 0; color: var(--ink-soft); max-width: 60ch; }

/* Build */
.build { padding-block: var(--section); }
.build-intro { max-width: 42rem; }
.build-intro p { margin-top: 1rem; font-size: var(--step-1); color: var(--ink-soft); }
.examples {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 52rem) {
  .examples { grid-template-columns: 1fr 1fr; }
}
.example h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.example p { margin-top: 0.5rem; color: var(--ink-soft); max-width: 46ch; }
.example pre {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  overflow-x: auto;
  font: 400 0.82rem/1.6 var(--mono);
  color: var(--ink);
}
.example .prompt { color: var(--amber); }

/* Open source facts */
.open { padding-block: var(--section); }
.facts { margin: 2.5rem 0 0; display: grid; gap: 0; max-width: 56rem; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
}
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 40rem) {
  .facts > div { grid-template-columns: 11rem 1fr; }
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* Final CTA */
.cta { padding-block: var(--section); }
.cta .waitlist { margin-top: 1.5rem; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem 3rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
