/* Hallmark · macrostructure: Index-First · tone: technical-austere · anchor hue: 170 (spruce)
 * route: custom (tuned, locked by brand/tokens.css) · vibe: "calm instrument, spruce and bone, one mint signal"
 * paper: oklch(97% 0.010 95) · accent: oklch(47% 0.085 172) light / oklch(86% 0.125 166) dark
 * display: Schibsted Grotesk · body: IBM Plex Sans · data: IBM Plex Mono
 * axes: light (dark mode: dark) / grotesk-sans / chromatic-green
 * nav: N9 edge-aligned minimal · footer: Ft4 dense colophon · enrichment: split-M tile with one mint slit
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4
 */

@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/SchibstedGrotesk-var.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/IBMPlexSans-var.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --gutter: clamp(20px, 4vw, 48px);
  --measure: 1180px;
  --tile: 56px;
  --color-tile: var(--mw-spruce);
  --color-tile-ink: var(--mw-bone);
  --color-signal: var(--mw-mint);
}
@media (prefers-color-scheme: dark) {
  :root { --color-tile: var(--mw-night-2); }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
code { font-family: var(--font-mono); font-size: 0.92em; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-sm); }
::selection { background: var(--color-accent); color: var(--color-paper); }

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-4); top: var(--space-4); padding: var(--space-2) var(--space-4); background: var(--color-ink); color: var(--color-paper); font-weight: 500; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* N9 · edge-aligned: wordmark left, one contact right, nothing between */
.top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-6); }
.lockup { color: var(--color-mark); display: inline-flex; }
.lockup svg { width: auto; height: 36px; }
.contact { font-family: var(--font-mono); font-size: var(--text-sm); white-space: nowrap; }

/* Hero: tagline left, the split-M tile right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: end;
  padding-block: var(--space-16) var(--space-24);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 780;
  font-style: normal;
  font-size: clamp(2.75rem, 1.2rem + 6.2vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-8);
  max-width: 11ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}
.lede {
  font-size: var(--text-lg);
  line-height: 1.45;
  font-weight: 500;
  max-width: 34ch;
  margin: 0 0 var(--space-4);
}
.why { color: var(--color-muted); max-width: 54ch; margin: 0 0 var(--space-8); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-family: var(--font-mono); font-size: var(--text-sm); }
.facts li { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.facts li::before { content: ""; width: 6px; height: 6px; background: var(--color-accent); }

.mark-tile {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  background: var(--color-tile);
  color: var(--color-tile-ink);
  border: var(--rule-hair) solid var(--color-tile);
  display: grid;
  place-items: center;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) { .mark-tile { border-color: var(--color-rule); } }
.mark-tile svg { width: 58%; height: auto; position: relative; }
.mark-tile .slit {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(50% - 1.5px);
  width: 3px;
  background: var(--color-signal);
  transform-origin: top center;
  animation: slit 1100ms var(--ease-out) 250ms both;
}
@keyframes slit { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* The index */
.products { padding-bottom: var(--space-24); }
.group + .group { margin-top: var(--space-16); }
.group-head { margin-bottom: var(--space-6); }
.group-head h2 {
  font-family: var(--font-display);
  font-weight: 720;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
}
.group-head p { color: var(--color-muted); max-width: 62ch; margin: 0; }

.index { list-style: none; margin: 0; padding: 0; border-top: var(--rule-hair) solid var(--color-ink); }
.index li { border-bottom: var(--rule-hair) solid var(--color-rule); }
.row {
  display: grid;
  grid-template-columns: var(--tile) minmax(0, 14rem) minmax(0, 1fr) minmax(0, 15rem) 16px;
  grid-template-areas: "tile name desc host go";
  column-gap: var(--space-8);
  row-gap: var(--space-2);
  align-items: start;
  padding-block: var(--space-6);
  color: var(--color-ink);
  text-decoration: none;
}
.row:focus-visible { outline-offset: 2px; }
.tile { grid-area: tile; width: var(--tile); height: var(--tile); }
.name {
  grid-area: name;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: -0.01em;
  padding-top: 2px;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--dur-base) var(--ease-out);
}
.by, .endorse { display: block; text-decoration: none; margin-top: var(--space-1); }
.by { font-family: var(--font-body); font-weight: 400; font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0; }
.endorse { font-family: var(--font-mono); font-weight: 400; font-size: var(--text-xs); color: var(--color-muted); letter-spacing: 0; }
.desc { grid-area: desc; color: var(--color-muted); max-width: 60ch; padding-top: 3px; }
.proof { display: block; margin-top: var(--space-2); color: var(--color-ink); font-weight: 500; }
.host {
  grid-area: host;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  padding-top: 5px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.meta { display: block; color: var(--color-muted); font-size: var(--text-xs); margin-top: var(--space-1); }
.go { grid-area: go; margin-top: 8px; color: var(--color-muted); transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-out); }

.row:hover .name, .row:focus-visible .name { text-decoration-color: var(--color-accent); }
.row:hover .go, .row:focus-visible .go { color: var(--color-accent); transform: translate(2px, -2px); }
.row:active .go { transform: translate(3px, -3px); }

/* Ft4 · dense colophon */
.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4) var(--space-12);
  position: relative;
  padding-block: var(--space-8) var(--space-12);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--color-muted);
}
.colophon::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: var(--rule-hair) solid var(--color-rule); }
.colophon p { margin: 0; max-width: 78ch; }
.colophon p:last-child { white-space: nowrap; }

/* Tablet: description and host move under the name */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: var(--space-12); padding-block: var(--space-12) var(--space-16); }
  .row {
    grid-template-columns: var(--tile) minmax(0, 1fr) 16px;
    grid-template-areas: "tile name go" "tile desc go" "tile host go";
    column-gap: var(--space-6);
  }
  .name { padding-top: 0; }
  .desc, .host { padding-top: 0; }
  .go { margin-top: 4px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --tile: 44px; }
  .top { padding-block: var(--space-4); }
  .lockup svg { height: 28px; }
  .contact { font-size: var(--text-xs); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); padding-block: var(--space-8) var(--space-12); }
  .hero h1 { margin-bottom: var(--space-6); }
  .mark-tile { justify-self: stretch; max-width: none; aspect-ratio: 16 / 7; }
  .mark-tile svg { width: auto; height: 62%; }
  .row { column-gap: var(--space-4); padding-block: var(--space-4) var(--space-6); }
  .group + .group { margin-top: var(--space-12); }
  .products { padding-bottom: var(--space-16); }
}

@media (prefers-reduced-motion: reduce) {
  .mark-tile .slit { animation: none; }
  .name, .go { transition: none; }
  .row:hover .go, .row:focus-visible .go, .row:active .go { transform: none; }
}
