/* Nowhere Productions LLC: black and white, the system face (San Francisco on Apple devices), one 12-column grid. */
:root {
  --bg: #fff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --band: #f5f5f7;
  --night: #000;
  --night-ink: #fff;
  --night-muted: #a1a1a6; /* #6e6e73 is under 4.5:1 on black */
  --margin: 24px;
  --content: 1068px;
  --gap: 24px;
  --section: 144px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Five sizes: display, headline, lead, body, fine. */
  --step-fine: 0.8125rem;
  --step-body: 1.0625rem;
  --step-lead: clamp(1.3125rem, 0.9rem + 0.9vw, 1.75rem);
  --step-head: clamp(2.5rem, 2rem + 2.4vw, 4rem);
  --step-display: clamp(3rem, 11vw, 8rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.47;
  letter-spacing: -0.022em;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; }
p, dt { text-wrap: pretty; } /* no one-word last lines */
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--bg); }

.wrap { width: min(var(--content), 100% - 2 * var(--margin)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* Unset config values from site.json render as this mark until they are filled in. */
.unset { background: var(--band); color: var(--muted); padding: 0 0.3em; white-space: nowrap; }

.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  background: var(--ink); color: var(--bg); border-radius: 980px;
  font-size: var(--step-body); font-weight: 400; text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.button:hover { background: #000; }
.button:active { transform: scale(0.97); }
.button:focus-visible { outline-color: var(--ink); }

/* Top bar: thin, sticky, white */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); /* solid: without blur, see-through type under the bar reads as a smudge */
  font-size: var(--step-fine);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 22px; height: 22px; display: block; }
.bar nav { display: flex; gap: 32px; }
.bar nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; letter-spacing: -0.01em; transition: opacity 160ms; }
.bar nav a:hover { opacity: 0.6; }

/* Headings */
.hero h1, .make h2, .doc h1 {
  font-size: var(--step-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em;
}
.company h2, .contact h2, .stats dd, .address {
  font-size: var(--step-head); font-weight: 600; line-height: 1.07; letter-spacing: -0.028em;
}
.lead, .product, .statement, .ask, .records h3, .doc .intro, .doc section h2 {
  font-size: var(--step-lead); line-height: 1.21; letter-spacing: -0.02em; font-weight: 600;
  text-wrap: balance;
}

/* Hero: the page's one centred moment */
.hero { padding: 120px var(--margin) var(--section); text-align: center; }
.hero h1 .line, .doc h1 .line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .line > span, .doc h1 .line > span { display: block; }
.hero .lead { max-width: 44ch; margin: 32px auto 0; }
.hero .lead span, .doc .intro span { display: inline-block; }
.hero .act { margin-top: 40px; }

/* What we make: the one black section */
.make { background: var(--night); color: var(--night-ink); padding: var(--section) 0; }
.make ::selection { background: var(--night-ink); color: var(--night); }
.make h2 { grid-column: 1 / -1; }
.make .product { grid-column: 1 / span 6; margin-top: 80px; }
.make .about { grid-column: 1 / span 6; display: grid; gap: 1em; margin-top: 24px; max-width: 34em; }
.make .spec { grid-column: 7 / -1; grid-row: 2 / span 2; margin-top: 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px var(--gap); align-content: start; }
.spec dt { color: var(--night-muted); }
.spec dd { font-weight: 600; }
.spec dd, .record dd { min-width: 0; overflow-wrap: anywhere; }

/* The company */
.company { padding: var(--section) 0; }
.company h2 { grid-column: 1 / span 6; }
.company .statement { grid-column: 7 / -1; padding-top: 0.6em; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); margin-top: 120px; }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.stats dt { color: var(--muted); max-width: 20ch; }
/* Each table spans five columns, so both right edges land on grid lines (col 5, col 11). */
.records { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin-top: 120px; }
.records > div { grid-column: 1 / span 5; }
.records > div + div { grid-column: 7 / span 5; }
.records h3 { margin-bottom: 16px; }
.record div { display: flex; justify-content: space-between; gap: 24px; padding: 6px 0; }
.record dt { color: var(--muted); }
.record dd { text-align: right; }

/* Contact */
.contact { padding: 0 0 var(--section); }
.contact h2 { grid-column: 1 / span 6; }
.contact .ask { grid-column: 7 / -1; padding-top: 0.6em; }
.contact .address {
  grid-column: 1 / -1; margin-top: 72px;
  /* --chars comes from build.py: the address runs across the content width, no larger than the headline size */
  font-size: clamp(1.5rem, calc(min(100vw - 2 * var(--margin), var(--content)) / (var(--chars, 9) * 0.56)), 4rem);
  overflow-wrap: anywhere;
}
.contact .address a { text-decoration: none; }
.contact .address a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Footer: fine print on the one grey band */
.footer { background: var(--band); color: var(--muted); font-size: var(--step-fine); line-height: 1.33; letter-spacing: -0.01em; padding: 32px 0 40px; }
.fine { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; }
.footer nav { display: flex; gap: 24px; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .legal { grid-column: 1 / -1; }

/* Inner pages (privacy, 404) */
.doc { padding: 96px 0 var(--section); align-items: start; align-content: start; flex: 1; }
.doc h1 { grid-column: 1 / -1; text-wrap: balance; }
.doc .intro { grid-column: 1 / span 6; margin-top: 40px; }
.doc .updated { grid-column: 7 / -1; margin-top: 40px; align-self: last baseline; color: var(--muted); }
.doc section { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; margin-top: 96px; }
.doc section h2 { grid-column: 1 / span 6; }
.doc section .body { grid-column: 7 / -1; display: grid; gap: 1em; }
.doc .home { grid-column: 1 / -1; margin-top: 96px; }
/* 404: two-line statement, then the way out in one row under it */
.doc .intro:has(+ .ways) { grid-column: 1 / span 9; }
.doc .ways { grid-column: 1 / -1; margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.doc .ways a:not(.button) { display: inline-flex; min-height: 32px; align-items: center; }

/* Tablet: one column of text, the grid kept for figures */
@media (max-width: 900px) {
  :root { --section: 112px; }
  .make .product, .make .about, .make .spec { grid-column: 1 / -1; grid-row: auto; }
  .make .spec { margin-top: 64px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .company h2, .company .statement, .contact h2, .contact .ask { grid-column: 1 / -1; }
  .company .statement, .contact .ask { padding-top: 0; margin-top: 24px; max-width: 32ch; }
  .stats, .records { margin-top: 88px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .records > div { grid-column: 1 / span 6; }
  .records > div + div { grid-column: 7 / span 6; }
  .contact .address { margin-top: 56px; }
  .doc .intro { grid-column: 1 / span 9; }
  .doc .updated { align-self: start; }
  .doc .updated { grid-column: 1 / -1; margin-top: 24px; }
  .doc section h2 { grid-column: 1 / -1; }
  .doc section .body { grid-column: 1 / -1; margin-top: 16px; max-width: 36em; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --margin: 20px; --section: 88px; }
  .bar nav a.hide-sm { display: none; }
  .hero { padding-top: 72px; }
  .hero .lead { margin-top: 24px; }
  .make .product { margin-top: 48px; }
  .make .spec { grid-template-columns: 1fr 1fr; gap: 28px var(--gap); margin-top: 48px; }
  .stats { row-gap: 40px; margin-top: 64px; }
  .records { row-gap: 56px; margin-top: 72px; }
  .records > div, .records > div + div { grid-column: 1 / -1; }
  .contact .address { margin-top: 40px; font-size: clamp(1.5rem, calc((100vw - 2 * var(--margin)) / (var(--half, 9) * 0.56)), 4rem); }
  .fine { grid-template-columns: 1fr; }
  .footer nav a { display: inline-flex; min-height: 32px; align-items: center; }
  .doc { padding-top: 64px; }
  .doc .intro, .doc .intro:has(+ .ways) { grid-column: 1 / -1; }
  .doc section { margin-top: 64px; }
  .doc .ways { flex-direction: column; align-items: flex-start; }
}

/* Motion: arrival only; content stays visible without script or with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .hero h1 .line > span, .js .doc h1 .line > span { transform: translateY(105%); animation: rise-line 900ms var(--ease-expo) forwards; animation-delay: calc(100ms + var(--i, 0) * 110ms); }
  .js .hero [data-load] { opacity: 0; transform: translateY(16px); animation: rise 700ms var(--ease-out) forwards; animation-delay: var(--d, 420ms); }
  .js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-rise].in { opacity: 1; transform: none; }
}
@keyframes rise-line { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
