/* Self-hosted fonts (SIL OFL 1.1, see assets/fonts/OFL-*.txt). Latin subsets, variable weight. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/InterTight-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Doto";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/Doto-latin.woff2") format("woff2");
}

:root {
  --bg: #000;
  --surface: #0a0a0a;
  --line: #1f1f1f;
  --ink: #fff;
  --ink-2: #8a8a8a;
  --ink-3: #7a7a7a;
  --sans: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --dot: "Doto", var(--mono);
  --pad: clamp(20px, 4vw, 56px);
  --max: 1280px;
  /* Side inset that keeps full-width bars on the same edges as the centred content column. */
  --edge: max(var(--pad), calc((100% - var(--max)) / 2));
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: transparent; /* the page colour comes from html, so the dot grid below shows */
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A fixed grid of small dots behind everything; it stays put while the page scrolls. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.13) 1px, transparent 1.2px);
  background-size: 48px 48px;
  background-position: center 24px;
}

a { color: inherit; text-decoration: none; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100;
}
.skip:focus { left: 8px; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}

.dot-label {
  font-family: var(--dot);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.dim { color: var(--ink-3); }
.dimmer { color: var(--ink-3); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  padding: 0 var(--edge);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}
/* Set by main.js while the page is scrolled to the top: the bar is bare until content passes under it. */
.nav.nav--top {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 18px; letter-spacing: -0.015em;
}
.brand img { display: block; }

.nav nav { display: flex; gap: 28px; }
.nav nav a {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav nav a:hover, .nav nav a:focus-visible { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 82svh; /* leaves the next section visible at the bottom of the first screen */
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--pad) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero--error { min-height: 100svh; }

.hero-dither {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(56px, 10vh, 112px);
}

.hero h1 {
  margin: 20px 0 0;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-inner > h1:first-child { margin-top: 0; }

.lede {
  max-width: 30em;
  margin: 28px 0 0;
  font-size: clamp(19px, 1.9vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: #b4b4b4;
}

.hero-meta {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: var(--max); width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.hero-meta div { padding: 18px 0; }
.hero-meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-meta dt {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-3);
}
.hero-meta dd {
  margin: 4px 0 0;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}

.actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px 12px;
  margin-top: 40px;
}
.btn, .link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border: 1px solid #3a3a3a;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary:hover, .btn--primary:focus-visible { background: #cfcfcf; border-color: #cfcfcf; }
.link {
  background: none; border: 0; cursor: pointer; font-family: var(--mono);
}
.link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; }


/* ---------- sections ---------- */
.section {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(56px, 6vw, 88px) var(--pad) clamp(72px, 9vw, 128px);
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 24px;
  align-items: baseline;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* panels */
.panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.panel {
  display: flex; flex-direction: column;
  min-height: 300px;
  padding: 24px;
  background: var(--surface);
  transition: background 0.25s;
}
.panel + .panel { border-left: 1px solid var(--line); }
.panel:hover { background: #111; }
.panel h3 {
  margin: 56px 0 12px;
  font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15;
}
.panel p:not(.mono) { margin: 0; color: var(--ink-2); font-size: 15px; }
.panel .idx { color: var(--ink-3); }
.panel .state {
  margin-top: auto; padding-top: 32px;
  display: flex; align-items: center; gap: 8px;
}
.panel .state::before {
  content: ""; width: 6px; height: 6px; border: 1px solid var(--ink-2); border-radius: 50%;
}

/* spec list */
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec .k { color: var(--ink); font-size: 13px; }
.spec .v { font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -0.02em; color: var(--ink-2); }

/* research placeholder */
.soon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 24px;
  align-items: baseline;
}
.soon h2, .soon-text { margin: 0; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -0.02em; }
.soon h2 { font-weight: 500; }
.soon-text { color: var(--ink-2); }

/* footer */
.footer {
  display: flex; align-items: center; justify-content: flex-start; gap: 24px;
  flex-wrap: wrap;
  padding: 28px var(--edge);
  border-top: 1px solid var(--line);
}

.socials { display: flex; align-items: center; gap: 4px; }
.footer > .dimmer { margin-left: auto; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  color: var(--ink); background: none; border: 0; cursor: pointer;
  opacity: 0.7;
}
.social svg { display: block; }

/* ---------- motion ---------- */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* B: hero entrance — headline lines rise from a mask, the rest fades up after. */
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;   /* keep descenders (y, g) inside the mask */
  margin-bottom: -0.12em;
}
.hero h1 .line > span {
  display: block;
  animation: rise 1.1s var(--ease-out) both;
}
.hero h1 .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero h1 .line:nth-child(2) > span { animation-delay: 0.27s; }
.hero .dot-label.reveal { animation: fade-up 0.9s var(--ease-out) 0.05s both; }
.hero .lede.reveal      { animation: fade-up 0.9s var(--ease-out) 0.55s both; }
.hero .actions.reveal   { animation: fade-up 0.9s var(--ease-out) 0.68s both; }
.hero-dither            { animation: fade-in 1.8s var(--ease-soft) both; }

@keyframes rise    { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* E: interaction polish */
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.btn:focus-visible { outline-offset: 2px; }

.nav nav a { position: relative; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav nav a:hover::after, .nav nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.btn { transition: background 0.25s var(--ease-soft), color 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft), transform 0.15s var(--ease-soft); }
.btn span, .link span { display: inline-block; transition: transform 0.35s var(--ease-out); }
.btn:active, .link:active { transform: scale(0.98); }

.link { position: relative; }
.link::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 9px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.social { transition: opacity 0.25s var(--ease-soft), transform 0.35s var(--ease-out); }
.social:hover, .social:focus-visible { opacity: 1; }

@media (hover: hover) {
  .btn:hover span { transform: translate(2px, -2px); }
  .link:hover span { transform: translateX(4px); }
  .social:hover { transform: translateY(-2px); }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel:nth-child(3) { border-left: 0; }
  .panel:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* Portrait tablets: the light sits above the text, so the text can take more of the width. */
@media (max-width: 1024px) and (orientation: portrait) {
  .hero h1 { font-size: clamp(40px, 9vw, 84px); }
  .lede { font-size: clamp(19px, 3vw, 26px); }
}

@media (max-width: 900px) {
  .soon { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .nav nav { gap: 18px; }
  .nav nav a:nth-child(2) { display: none; }
  .section-head, .spec li, .soon { grid-template-columns: 1fr; gap: 8px; }
  .panels { grid-template-columns: 1fr; }
  .panel + .panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel { min-height: 220px; }
}

@media (max-width: 480px) {
  /* Two equal buttons on one row, the email link on its own row flush with the left edge. */
  .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .btn { justify-content: center; padding: 0 12px; }
  .link { grid-column: 1 / -1; justify-self: start; padding: 0; }
  .link::after { left: 0; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
