/* ==========================================================
   INTERFORM design tokens  v0.5  (2026-12-01)
   One file. Every page imports it. Components use only these
   variables - no raw hex, no ad-hoc shadows, no extra fonts.

   Direction: "the parts manual".
   The site reads like a reference sheet for a small physical
   object: real photos, real CAD exploded views drawn in one
   ink colour, plain specs.
   References: makingsoftware.com (manual + line drawings),
   ossa.wine (full-bleed photo bands, quiet type),
   fornasetti.com (line-engraving illustration, one big
   display line, lots of air), bang-olufsen.com (product
   shelf on flat tiles, staggered photo pairs, light headings).

   Colour: "filament green", sampled from a real spool photo
   (sparkle green). Texture: FDM layer lines - the surface of
   our own prints - not generic noise.
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;700&family=Martian+Mono:wght@400;500&display=swap");

:root {
  /* ---------- colour: paper (default) ---------- */
  --paper:      #F5F6F4;  /* page. Cool white, like white PETG. Not cream. */
  --ink:        #000000;  /* text. True black. */
  --ink-soft:   #55595C;  /* secondary text, captions (6.5:1 on paper) */
  --rule:       #C9CBCC;  /* 1px dividers, input borders */
  --grid:       #E3E5E4;  /* blueprint grid inside figures ONLY */
  --tile:       #ECEDEB;  /* product tile behind cut-out shots (B&O shelf). Flat, no texture. */

  /* ---------- colour: filament green (the accent) ---------- */
  /* Sampled from the spool photo: shadow / body / highlight. */
  --green:       #21453D; /* CAD ink: drawings, links, primary button, focus (9.8:1 on paper) */
  --green-body:  #2F544C; /* hover, secondary fills */
  --green-light: #3E645D; /* highlight edge in drawings */
  --green-wash:  #DDE6E3; /* filled part in a drawing, selected state */
  --on-green:    #FFFFFF;

  /* ---------- colour: deep band (ossa-style, but ours) ---------- */
  /* Full-bleed photo/video sections. One or two per page max. */
  --deep:        #1B3A33; /* band background: darker than --green */
  --deep-text:   #A9BDB7; /* body text on band (6.3:1) */
  --deep-head:   #F5F6F4; /* headings on band (11.4:1) */
  --deep-rule:   #2F544C;

  /* ---------- colour: gold (the 10% accent) ---------- */
  /* Flat gold, never a gradient. Mostly as TEXT: one gold phrase per
     heading, labels, numbers. On green/deep use --gold. On paper/tile
     use --gold-head (big headings) or --gold-text (small text).
     Never plain --gold as text on paper (2.1:1). About 10% of a page. */
  --gold:        #D4A537; /* text/fills on green or deep: 5.4:1 on deep, 4.7:1 on green */
  --on-gold:     #000000; /* text on a gold fill: 9.2:1 */
  --gold-head:   #A87C12; /* gold HEADINGS on paper/tile only (large text): 3.5:1 */
  --gold-text:   #85640A; /* small gold text on paper/tile: 5.1:1 paper, 4.7:1 tile */

  /* aliases used by components */
  --signal:      var(--green);
  --signal-ink:  var(--on-green);
  --signal-wash: var(--green-wash);

  /* ---------- colour: states ---------- */
  --ok:     #1F7A3A;
  --error:  #B3261E;

  /* ---------- texture: layer lines ---------- */
  /* Horizontal lines at real 0.2mm-layer rhythm, barely visible.
     Paper: 2.5% ink. Deep band: 5% white. */
  --layer-pitch: 3px;
  --layer-paper: rgba(0, 0, 0, 0.025);
  --layer-deep:  rgba(255, 255, 255, 0.05);

  /* ---------- type ---------- */
  /* Two families. Grotesk for everything people read.
     Mono ONLY for real technical callouts: part names in a
     drawing, chip type, dimensions, print time. Never prices,
     never buttons, never eyebrow labels. */
  --font-text:  "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-spec:  "Martian Mono", ui-monospace, Menlo, monospace;

  /* scale: 16px base, ratio 1.25 */
  --fs-xs:   0.8125rem;  /* 13 - captions, callouts */
  --fs-s:    0.875rem;   /* 14 - small UI */
  --fs-m:    1rem;       /* 16 - body */
  --fs-l:    1.25rem;    /* 20 - lead paragraph */
  --fs-xl:   1.5625rem;  /* 25 - h3 */
  --fs-2xl:  1.953rem;   /* 31 - h2 */
  --fs-3xl:  2.441rem;   /* 39 - h1 on inner pages */
  --fs-4xl:  clamp(2.441rem, 5vw + 1rem, 4.768rem); /* 39-76 - one hero line per page */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    700;

  --lh-tight:  1.08;  /* display only */
  --lh-head:   1.2;
  --lh-body:   1.55;
  --ls-display: -0.02em;
  --ls-spec:    0.02em;

  --measure:   62ch;  /* max line length for body copy */

  /* ---------- space (4px base) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 144px;

  /* ---------- layout ---------- */
  --page-max:   1280px;
  --gutter:     clamp(16px, 4vw, 48px);

  /* ---------- lines, corners, depth ---------- */
  --line:        1px solid var(--rule);
  --line-strong: 1px solid var(--ink);
  --line-signal: 1px solid var(--signal);
  --radius-control: 4px;  /* buttons, inputs, chips */
  --radius-media:   0;    /* photos and figures: square edges */
  --shadow: none;         /* no shadows anywhere */

  /* ---------- media ratios ---------- */
  --ratio-product: 1 / 1;   /* product shot */
  --ratio-detail:  4 / 5;   /* in-hand shot */
  --ratio-band:    16 / 9;  /* deep band, video */
  --ratio-figure:  4 / 3;   /* CAD exploded view */

  /* ---------- motion ---------- */
  --ease:     cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur-med:  240ms;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--layer-paper) 0 1px,
    transparent 1px var(--layer-pitch)
  );
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-m);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
}

/* headings stay light (B&O): size does the work, not weight */
h1, h2, h3 {
  font-weight: var(--fw-regular);
  line-height: var(--lh-head);
  margin: 0;
}
.display {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-regular);
}

/* product shelf (B&O): cut-out photo on a flat tile, name + price
   under it, left-aligned. Horizontal scroll on mobile. */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: var(--s-1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.shelf__item { scroll-snap-align: start; text-decoration: none; color: var(--ink); }
.shelf__img { aspect-ratio: var(--ratio-product); background: var(--tile); object-fit: contain; width: 100%; }
.shelf__name { font-size: var(--fs-s); margin: var(--s-3) 0 0; }
.shelf__price { font-size: var(--fs-s); color: var(--ink-soft); margin: 0; }

/* staggered pair (B&O): big lifestyle photo + smaller offset photo
   with one line of copy and a plain underlined link */
.pair {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--s-6);
  align-items: start;
}
.pair > :last-child { margin-top: var(--s-9); }
@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; }
  .pair > :last-child { margin-top: 0; }
}

p { max-width: var(--measure); margin: 0 0 var(--s-4); }

a { color: var(--signal); text-underline-offset: 0.2em; }
a:hover { color: var(--green-body); }

img, video { display: block; max-width: 100%; height: auto; border-radius: var(--radius-media); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* spec text: part callouts, chip type, dimensions */
.spec {
  font-family: var(--font-spec);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-spec);
  color: var(--signal);
}

/* buttons */
.btn {
  display: inline-block;
  font: var(--fw-medium) var(--fs-m) / 1 var(--font-text);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-control);
  border: var(--line-strong);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
/* gold button: use on green/deep backgrounds only */
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn--gold:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.band-deep .btn.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.band-deep .btn.btn--gold:hover { background: transparent; border-color: var(--gold); color: var(--gold); }

/* figure: CAD drawing on a faint grid (no layer lines here) */
.figure {
  aspect-ratio: var(--ratio-figure);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
  margin: 0;
}

/* deep band: full-bleed green section with stronger layer lines */
.band-deep {
  background-color: var(--deep);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--layer-deep) 0 1px,
    transparent 1px var(--layer-pitch)
  );
  color: var(--deep-text);
}
.band-deep h2, .band-deep h3, .band-deep .display { color: var(--deep-head); }
/* gold phrase inside a heading or line */
.g { color: var(--gold-head); }
.band-deep .g { color: var(--gold); }
.band-deep a { color: var(--deep-head); }
.band-deep .btn { border-color: var(--deep-head); color: var(--deep-head); }
.band-deep .btn:hover { background: var(--deep-head); color: var(--deep); }

/* sparkle: optional, ONE place per site at most (e.g. the hero band).
   A few static specks, like the filament. Never animated. */
.band-deep--sparkle {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='23' cy='41' r='0.8' opacity='.5'/%3E%3Ccircle cx='131' cy='17' r='0.6' opacity='.35'/%3E%3Ccircle cx='197' cy='88' r='0.9' opacity='.45'/%3E%3Ccircle cx='64' cy='152' r='0.6' opacity='.3'/%3E%3Ccircle cx='172' cy='201' r='0.7' opacity='.4'/%3E%3Ccircle cx='98' cy='226' r='0.5' opacity='.3'/%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(
      to bottom,
      var(--layer-deep) 0 1px,
      transparent 1px var(--layer-pitch)
    );
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}