/* Z30 Labs site.
 *
 * Every value comes from Z30-LABS-BRAND-SPEC.md. This is the Labs surface, so
 * section 8 applies: dark, editorial, five sections and no more. The product
 * at app.z30labs.com is the other surface and is denser.
 *
 * Tokens are copied from the app's web/src/styles.css rather than shared
 * through a package, and that is deliberate: two files that change once a year
 * do not justify a build step, a version pin and a release process between two
 * repositories. If a token changes here it must change there, and the reverse.
 *
 * Fonts are served from this origin. vercel.json and _headers both set
 * font-src 'self', so a font CDN would be blocked with no visible error and
 * the page would fall back to system faces without saying so. */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-tight-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-tight-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Single theme, deliberately. Section 8: the Labs site is dark. It is a
   credibility surface read once, not a tool lived in, so there is nothing for
   a toggle to earn here. Every colour is still painted explicitly, so the page
   holds on any host background. */
:root {
  --z-red: #e8112d;

  --surface-0: #0b0b0d;
  --surface-1: #141417;
  --surface-2: #1c1c20;
  --text-hi: #f2f1ec;
  --text-mid: #a3a29b;
  --text-lo: #6e6d67;
  --rule: #2a2a2f;

  --d-base: #3b7dd8;
  --d-pos: #1d9e75;
  --d-warn: #d99311;
  --d-neg: #c0392b;
  --d-muted: #8b8a84;

  --font-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Spec section 5: every numeral in mono, tabular. */
.num, code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.label {
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1.2; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-lo);
  margin: 0;
}

/* Spec section 6: 1280 max, 64px page margin, left aligned, ragged right. */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 64px; } }

a { color: inherit; text-decoration-color: var(--text-lo); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--z-red); }
:focus-visible { outline: 2px solid var(--z-red); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; background: var(--surface-2); color: var(--text-hi); padding: 10px 14px; border-radius: 4px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; }

/* -- nav: lockup left, four text links right, no CTA button ---------------- */

nav.top { border-bottom: 0.5px solid var(--rule); }
nav.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 20px; padding-bottom: 20px;
}
nav.top img { display: block; width: 132px; height: auto; }
nav.top ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.top a {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-mid); text-decoration: none;
  transition: color 120ms ease;
}
nav.top a:hover { color: var(--text-hi); }
/* The one nav item that leaves the site, separated by a rule so it reads as a
   destination rather than a fifth section. Section 8 asks for four text links
   and no CTA button: this is a fifth link and stays a link, because a visitor
   who wants the product should not have to scroll to Products to find it. */
nav.top li.away { border-left: 0.5px solid var(--rule); padding-left: 28px; }
nav.top li.away a { color: var(--text-hi); }

@media (max-width: 640px) {
  nav.top ul { gap: 16px; }
  nav.top a { font-size: 10px; letter-spacing: 0.08em; }
  /* At this width the rule crowds the row and stops reading as a divider. */
  nav.top li.away { border-left: 0; padding-left: 0; }
}

/* -- sections -------------------------------------------------------------- */
/* Spec section 6: 96px vertical rhythm on mobile, 128px on desktop. */

section { padding: 96px 0 0; }
@media (min-width: 900px) { section { padding: 128px 0 0; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 132px minmax(0, 1fr); gap: 32px; align-items: start; }
}
.split > .label { padding-top: 8px; }

h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95; letter-spacing: -0.03em; font-weight: 600;
  margin: 0 0 24px; max-width: 17ch;
}
h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 16px; max-width: 22ch; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; margin: 0 0 8px; }
p { margin: 0 0 16px; max-width: 64ch; color: var(--text-mid); }
p.lead { color: var(--text-hi); font-size: 18px; max-width: 58ch; }
p.small { font-size: 14px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text-hi); font-weight: 500; }

/* -- hero ------------------------------------------------------------------ */

header.hero { padding: 56px 0 0; }
@media (min-width: 900px) { header.hero { padding: 88px 0 0; } }

/* Capped rather than full bleed. A real pitch is about 1.5:1, so at full page
   width the figure came out over a thousand pixels tall and pushed everything
   else below the fold. Section 6 asks for left aligned and ragged right, which
   a full-bleed figure is not. */
.artefact { margin: 48px 0 0; border-top: 0.5px solid var(--rule); padding-top: 20px; max-width: 880px; }
.artefact-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
#pitch { display: block; width: 100%; height: auto; background: var(--surface-1); border: 0.5px solid var(--rule); }
.artefact figcaption { margin-top: 12px; }
.artefact figcaption p { max-width: 72ch; font-size: 14px; }

/* -- what we do: three prose blocks, not feature cards --------------------- */

.practices { display: grid; gap: 48px; }
@media (min-width: 760px) { .practices { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.practice { border-top: 0.5px solid var(--rule); padding-top: 16px; }
.practice .label { margin-bottom: 12px; }
.practice p { font-size: 15px; }

/* -- products -------------------------------------------------------------- */

.products { display: grid; gap: 0.5px; background: var(--rule); border: 0.5px solid var(--rule); }
@media (min-width: 760px) { .products { grid-template-columns: repeat(2, 1fr); } }
.product { background: var(--surface-0); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.product p { font-size: 15px; margin: 0; flex: 1; }
.product .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-lo); }
.product .go {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--text-hi);
  display: inline-flex; align-items: center; gap: 8px;
}
/* The 14 degree shear, used as the brand's structural signature rather than
   as decoration. Spec section 3. */
.product .go::after {
  content: ''; width: 0; height: 0;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 6px solid var(--z-red);
  transform: skewX(-14deg);
  transition: transform 120ms ease;
}
.product .go:hover::after { transform: skewX(-14deg) translateX(3px); }
.product.soon h3 { color: var(--text-mid); }

/* -- research: a paper index ----------------------------------------------- */

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 620px; }
thead th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-lo);
  text-align: left; padding: 0 24px 10px 0;
  border-bottom: 0.5px solid var(--rule); white-space: nowrap;
}
tbody td { padding: 16px 24px 16px 0; border-bottom: 0.5px solid var(--rule); color: var(--text-mid); vertical-align: top; }
tbody tr:hover td { background: var(--surface-1); }
td.when { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-lo); white-space: nowrap; }
td.what { color: var(--text-hi); }
td.what span { display: block; color: var(--text-mid); font-size: 14px; margin-top: 4px; max-width: 54ch; }

.status {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; border: 0.5px solid currentColor; border-radius: 4px;
  white-space: nowrap;
}
.status.measured { color: var(--d-pos); }
.status.pending { color: var(--d-warn); }

/* -- contact and footer ---------------------------------------------------- */

.contact a { font-size: 20px; }

footer { margin-top: 128px; border-top: 0.5px solid var(--rule); }
footer .wrap { padding-top: 24px; padding-bottom: 48px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer p { margin: 0; font-size: 13px; color: var(--text-lo); }
