/* ═══════════════════════════════════════════════════════════════════════════
   base — tokens, reset, typography, buttons, utilities
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Neutral charcoal ground. One accent. Copper is reserved for the fixture
     artwork and never appears in the UI chrome. */
  --void:        #0c0e0e;
  --slate:       #0e1111;
  --panel:       #121515;
  --panel-lift:  #151919;
  --panel-hi:    #191d1d;
  --line:        rgba(255, 255, 255, 0.08);
  --line-soft:   rgba(255, 255, 255, 0.05);
  --line-hair:   rgba(255, 255, 255, 0.04);

  --copper:      #b87333;
  --copper-lit:  #e9bd8b;
  --copper-pale: #fdeacd;
  --copper-mid:  #a25f27;
  --copper-deep: #5f3414;
  --copper-void: #33190a;
  --patina:      #3f7a63;

  --water:        #19c37d;
  --water-bright: #6ee7b0;
  --water-pale:   #d7f7e8;
  --water-deep:   #0e8a58;
  --water-dim:    rgba(25, 195, 125, 0.32);
  --water-wash:   rgba(25, 195, 125, 0.07);

  --burn:      #f0855f;
  --drip:      #19c37d;
  --liquidity: #4fc3f7;
  --build:     #d9b07a;

  --text:      #e8ecea;
  --text-soft: #b4bdb9;
  --muted:     #808b87;
  --faint:     #5b6461;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shell:  1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font-display: 'Inter', 'Liberation Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Bitstream Charter', Charter, 'Iowan Old Style', Georgia, 'Liberation Serif', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', 'Liberation Mono', Menlo, monospace;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fluid: cubic-bezier(0.4, 0.05, 0.2, 1);
  --ease-snap:  cubic-bezier(0.16, 1.1, 0.3, 1);

  /* Flat surfaces. A hairline border does the work a shadow used to. */
  --plate-bg: var(--panel);
  --plate-edge: 1px solid var(--line);
  --plate-shadow: none;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  font-feature-settings: 'cv11', 'ss01', 'tnum' 0;
}

img, svg, canvas { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
code, pre, .mono { font-family: var(--font-mono); font-size: 0.88em; }

code {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.08em 0.38em;
}

:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(25, 195, 125, 0.28); color: #eafff5; }

/* ── layout ─────────────────────────────────────────────────────────────── */

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.shell--narrow { max-width: 860px; }

.section { padding-block: clamp(3rem, 6vw, 5.5rem); position: relative; }
.section + .section { border-top: 1px solid var(--line-soft); }

.section__head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head--compact { margin-bottom: clamp(1.4rem, 3vw, 2rem); }

.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--water);
  margin-bottom: 1rem;
}

.pipe-tick { width: 8px; height: 8px; border-radius: 2px; background: var(--water); }

.section__title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); margin-bottom: 1rem; letter-spacing: -0.028em; }
.section__head--compact .section__title { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem); }

.section__lede { color: var(--text-soft); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem); max-width: 64ch; }

/* The accent voice: an italic serif against the sans. Plain accent colour,
   no gradient, no glow. */
.ink {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  color: var(--water-bright);
  padding-right: 0.04em;
}

.ink-water { color: var(--water-bright); }

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.btn--primary { background: var(--water); border-color: var(--water); color: #06170f; font-weight: 600; }
.btn--primary:hover { background: var(--water-bright); border-color: var(--water-bright); }
.btn--ghost { background: rgba(255, 255, 255, 0.03); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn__drip { display: none; }

/* ── small shared bits ───────────────────────────────────────────────── */

.mono { font-family: var(--font-mono); font-size: 0.86em; }
.hash { word-break: break-all; color: #8ab4f8; }

.pill {
  display: inline-block;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.pill--ok   { border-color: rgba(25, 195, 125, 0.35); color: var(--water-bright); background: var(--water-wash); }
.pill--warn { border-color: rgba(217, 176, 122, 0.4); color: var(--build); background: rgba(217, 176, 122, 0.08); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 9600;
  background: var(--water); color: #06170f;
  padding: 0.7rem 1.1rem; border-radius: 0 0 10px 10px; font-weight: 700;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 0; }

/* Reveal: a short fade-up, nothing more. */
[data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Decorative chrome from earlier passes, retired. */
.grain, .vignette, .screw, .panel__led, .fixture__led, .console__leds, .ledger__headDots,
.section__head::before, .ticker, .joint, .nav__rail, .hero__plan, .hero__glow,
.scene__caustics, .flow__particles { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   quieter pass — plain sans, sentence-case labels, no italics, no nameplate
   ═══════════════════════════════════════════════════════════════════════════ */

.ink { font-family: inherit; font-style: normal; font-weight: 600; font-size: 1em; letter-spacing: inherit; color: var(--water-bright); padding: 0; }
.section__kicker { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--water); gap: 0.45rem; }
.pipe-tick { width: 6px; height: 6px; border-radius: 50%; }
.section__title { font-weight: 600; letter-spacing: -0.025em; }
.section__lede { color: var(--text-soft); }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
