@font-face {
  font-family: "Tenor Sans";
  src: url("/fonts/TenorSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #050505;
  --ground-2: #0d0d0d;
  --paper: #f2f1ed;
  --grey-1: #b9b8b3;   /* body secondary, 10:1 on ground */
  --grey-2: #8c8b87;   /* captions, 6:1 on ground */
  --rule: #2a2a28;
  --rule-strong: #4a4a47;
  /* Structural colour: reserved for measured and shipped. */
  --film: linear-gradient(90deg, #6fe7ff 0%, #9c8cff 38%, #f39cff 62%, #ffd37a 100%);
  --display: "Tenor Sans", "Optima", "Candara", serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--paper);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--paper);
  scrollbar-color: var(--rule-strong) var(--ground);
}
::selection { background: #e9e6ff; color: #050505; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border: 3px solid var(--ground); border-radius: 10px; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 1.5px solid var(--paper); outline-offset: 3px; border-radius: 2px; }
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1.02; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; line-height: 1.2; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--pad);
  background: linear-gradient(var(--ground) 72%, rgba(5,5,5,0));
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s;
}
/* Hidden over the hero; site.js adds .shown once the hero scrolls away. Without JS the bar stays put. */
.js .bar:not(.shown) {
  opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s 0.22s;
}
@media (prefers-reduced-motion: reduce) { .js .bar:not(.shown) { transform: none; } }
.mark { font: 1.15rem/1 var(--display); letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; }
.bar nav { display: flex; gap: clamp(14px, 2.4vw, 32px); align-items: center; font-size: 0.9rem; }
.bar nav a { text-decoration: none; color: var(--grey-1); transition: color 0.2s; }
.bar nav a:hover { color: var(--paper); }
.bar nav .bar-cta { color: var(--paper); border-bottom: 1px solid var(--paper); padding-bottom: 2px; }
@media (max-width: 640px) { .bar nav a:not(.bar-cta) { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: clamp(680px, 100svh, 1100px);
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  align-items: center;
  padding: 96px var(--pad) 96px;
  overflow: hidden;
  isolation: isolate;
}
.specimen {
  position: absolute; z-index: -1;
  top: 0; bottom: 0; right: 0; width: 64%;
  background:
    radial-gradient(circle at 60% 45%, #3a3a38 0, #141413 55%, var(--ground) 80%);
}
.specimen::after { /* fade the micrograph into the copy column */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ground) 0%, rgba(5,5,5,0.55) 14%, rgba(5,5,5,0) 34%),
              linear-gradient(0deg, var(--ground) 0%, rgba(5,5,5,0) 18%);
  pointer-events: none;
}
#micrograph { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
#micrograph.on { opacity: 1; }

.hero-copy { max-width: 600px; }
.hero h1 {
  font-size: clamp(4.4rem, 10.5vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 28px -0.04em;
}
.lede { font-size: clamp(1.1rem, 1.5vw, 1.32rem); line-height: 1.5; color: var(--grey-1); max-width: 34ch; margin: 0 0 36px; text-wrap: balance; }


/* ---------- form ---------- */
.beta {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  max-width: 560px;
}
.field { display: grid; gap: 6px; min-width: 0; }
.beta input, .beta select { width: 100%; min-width: 0; }
.field label { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--grey-1); }
.field label span { color: var(--grey-2); }
.beta input, .beta select, .beta button {
  font: inherit; font-size: 1rem;
  height: 52px; border-radius: 3px;
  color: var(--paper);
  background: rgba(13,13,13,0.86);
  border: 1px solid var(--rule-strong);
  padding: 0 14px;
  transition: border-color 0.2s, background-color 0.2s;
}
.beta input::placeholder { color: var(--grey-2); }
.beta input:hover, .beta select:hover { border-color: var(--grey-2); }
.beta input:focus-visible, .beta select:focus-visible { outline: none; border-color: var(--paper); }
.beta select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23b9b8b3' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
.beta select option { background: #111; color: var(--paper); }
.beta button {
  grid-column: 1 / -1;
  background: var(--paper); color: var(--ground); border-color: var(--paper);
  font-weight: 600; letter-spacing: 0.01em; cursor: pointer;
}
.beta button:hover { background: #ffffff; }
.beta button:active { transform: translateY(1px); }
.beta button:disabled { cursor: progress; background: var(--grey-1); border-color: var(--grey-1); }
.beta .status { grid-column: 1 / -1; margin: 4px 0 0; font-size: 0.86rem; color: var(--grey-2); min-height: 1.4em; }
.beta[data-state="error"] .status { color: #ffb4a8; }
.beta[data-state="error"] input[aria-invalid="true"] { border-color: #ff8f7d; }
.beta[data-state="done"] .field, .beta[data-state="done"] button { display: none; }
.beta[data-state="done"] .status { font: 1.25rem/1.4 var(--display); color: var(--paper); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- sections ---------- */
main > section:not(.hero) { padding: clamp(96px, 13vw, 180px) var(--pad) clamp(64px, 8vw, 110px); }

.today { border-top: 1px solid var(--rule); }
.today h2 { margin-bottom: clamp(40px, 6vw, 72px); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); max-width: 1240px; }
.columns h3 { padding-bottom: 14px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 4px; }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--grey-1); max-width: 60ch; }

/* speed */
.speed { background: var(--ground-2); border-top: 1px solid var(--rule); }
.speed-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: end; max-width: 1240px; margin-bottom: clamp(48px, 7vw, 88px); }
.speed-head p { margin: 0; color: var(--grey-1); max-width: 62ch; }

.chart { max-width: 1240px; }
.chart-key, .row { display: grid; grid-template-columns: minmax(180px, 3fr) minmax(0, 7fr) 76px; gap: 0 24px; align-items: center; }
.chart-key { font: 12.5px/1.4 var(--mono); color: var(--grey-2); padding-bottom: 12px; border-bottom: 1px solid var(--rule-strong); letter-spacing: 0.03em; }
.chart-key .key-bars { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.chart-key .k { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.chart-key i { display: inline-block; width: 18px; height: 6px; }
.chart-key .k-ish { background: var(--rule-strong); }
.chart-key .k-gvm { background: var(--film); }
.chart-key .key-x { text-align: right; }
.group { font: 0.95rem/1 var(--display); color: var(--grey-1); letter-spacing: 0.04em; padding: 30px 0 10px; }
.row { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.row .what { font-size: 0.98rem; display: grid; }
.row .what small { font: 12.5px/1.5 var(--mono); color: var(--grey-2); }
.row .bars { position: relative; height: 22px; display: grid; align-content: center; gap: 4px; }
.row .bars i { display: block; height: 6px; border-radius: 1px; }
.row .bars .ish { width: 100%; background: var(--rule-strong); }
.row .bars .gvm {
  width: calc(var(--r) * 100%);
  min-width: 3px;
  background: var(--film);
  background-size: calc(100% / var(--r)) 100%;  /* one continuous film across all bars */
  transform-origin: left center;
  transition: transform 1.1s var(--ease);
}
.js .chart:not(.seen) .row .bars .gvm { transform: scaleX(0); }
.row .x { text-align: right; font: 1.35rem/1 var(--display); }
.footnote { margin: 40px 0 0; font-size: 0.86rem; color: var(--grey-2); max-width: 78ch; }

/* roadmap */
.next { border-top: 1px solid var(--rule); }
.next h2 { margin-bottom: clamp(40px, 6vw, 72px); }
.phases { list-style: none; margin: 0; padding: 0; max-width: 1240px; }
.phases li {
  display: grid; grid-template-columns: 64px 150px minmax(0, 1fr);
  gap: 0 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.phases li:first-child { border-top: 1px solid var(--rule-strong); }
.phases .n { font: 2.4rem/1 var(--display); color: var(--grey-2); }
.phases .state { font-size: 0.92rem; color: var(--grey-2); }
.phases h3 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); }
.phases p { margin: 6px 0 0; color: var(--grey-1); max-width: 62ch; }
.phases .is-done .n { color: var(--paper); }
.phases .is-done { position: relative; }
.phases .is-done::after { /* the film marks what shipped */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--film);
}
.phases .is-done .state { color: var(--paper); }
.phases .is-now .n, .phases .is-now .state { color: var(--paper); }
.phases .is-now .state::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px;
  border: 1px solid var(--paper); border-radius: 50%; vertical-align: 1px;
}
.phases .is-big h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

/* close */
.join {
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px); align-items: end;
  max-width: calc(1240px + 2 * var(--pad));
}
.join h2 { font-size: clamp(3rem, 7vw, 6rem); line-height: 0.92; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--pad) 40px; border-top: 1px solid var(--rule);
  font-size: 0.85rem; color: var(--grey-2);
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: auto;
    padding-top: calc(clamp(280px, 46svh, 440px) - 40px);
    padding-bottom: 72px;
  }
  .specimen { width: 100%; bottom: auto; height: clamp(280px, 46svh, 440px); }
  .specimen::after { background: linear-gradient(0deg, var(--ground) 0%, rgba(5,5,5,0) 45%); }
  .hero h1 { margin-bottom: 18px; }
  .lede { margin-bottom: 26px; }
  .columns, .speed-head, .join { grid-template-columns: 1fr; }
  .chart-key, .row { grid-template-columns: minmax(0, 1fr) 64px; }
  .chart-key .key-bars { grid-column: 1 / -1; grid-row: 2; padding-top: 6px; }
  .chart-key .key-x { grid-row: 1; grid-column: 2; }
  .row .bars { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; }
  .row .x { grid-row: 1; grid-column: 2; }
  .phases li { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "n body" "n state"; }
  .phases .n { font-size: 1.8rem; grid-area: n; }
  .phases li > div { grid-area: body; }
  .phases .state { grid-area: state; margin-top: 8px; }
}
@media (max-width: 480px) {
  .beta { grid-template-columns: 1fr; }
}

/* Features: rows line up across both columns */
@media (min-width: 861px) {
  .columns { grid-template-rows: auto repeat(6, auto); row-gap: 0; }
  .columns > div { display: grid; grid-row: span 7; grid-template-rows: subgrid; }
  .columns .spec-list { display: contents; }
  .columns .spec-list li { display: flex; align-items: center; }
}

/* screenshots */
.shots { border-top: 1px solid var(--rule); }
.shots h2 { margin-bottom: clamp(40px, 6vw, 72px); }
.shots-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 280px));
  gap: clamp(20px, 4vw, 56px); max-width: 1240px;
}
.shots figure { margin: 0; }
.shots img {
  display: block; width: 100%; height: auto;
  border-radius: 15.5% / 7.1%; /* the iPhone display corner, so sheets inside the shot line up */
  border: 1px solid var(--rule-strong);
  background: var(--ground-2);
}
.shots figcaption { margin-top: 14px; font-size: 0.92rem; color: var(--grey-1); }
@media (max-width: 860px) {
  .shots-row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px;
    scroll-padding: 0 var(--pad); scrollbar-width: none;
  }
  .shots-row::-webkit-scrollbar { display: none; }
  .shots-row li { flex: 0 0 72%; scroll-snap-align: start; }
}
