/* Moving Shadow Labs: site styles. The rules behind these choices are in docs/DESIGN.md.

   Layout: long, low horizontal bands, each the same shape: a label in the
   margin, the statement, then the evidence. Few forms, repeated. */
:root {
  --night: #050607;      /* ground: Prince of Darkness */
  --panel: #0D1012;      /* raised surfaces */
  --line: #1D2326;       /* the long horizontals */
  --text: #DCE4E6;       /* body */
  --muted: #8E9A9F;      /* secondary */
  --ice: #99FFFF;        /* glacier blue: the accent */
  --gold: #F3A617;       /* the panther's eyes: used once */
  /* Optima (licensed) everywhere, including --mono: a deliberate choice. */
  --display: Optima, "Optima nova", "Linotype Optima", Candara, "Segoe UI", sans-serif;
  --body: Optima, "Optima nova", "Linotype Optima", Candara, "Segoe UI", sans-serif;
  --mono: Optima, "Optima nova", "Linotype Optima", Candara, "Segoe UI", sans-serif;
  color-scheme: dark;
}
/* Optima. Until the licensed webfont is bought, only the copy installed on the
   visitor's device is used (Apple devices have it); everyone else falls back to
   Candara or Segoe UI. When the licensed .woff2 files arrive, put them in
   public/assets/fonts/ and add a root-absolute url() for each after local().
   The exact lines are in docs/MAINTENANCE.md (Fonts). */
@font-face { font-family: "Optima"; src: local("Optima Regular"), local("Optima-Regular"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Optima"; src: local("Optima Italic"), local("Optima-Italic"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Optima"; src: local("Optima Bold"), local("Optima-Bold"); font-weight: 500 700; font-style: normal; font-display: swap; }
.ice { color: var(--ice); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--night); color: var(--text);
  font: 400 17px/1.6 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1120px; margin: 0 auto; }
a { color: var(--ice); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.label { font: 500 12px/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Skip link: off-screen until focused with the keyboard. */
.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 14px 18px; background: var(--ice); color: #031314; font: 600 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 16px; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.mark img { width: 36px; height: 36px; }
.mark span { font: 500 13px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
nav a:hover { color: var(--ice); }

.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 56px; align-items: center; padding-block: 72px 64px; }
.hero h1, .lost h1 { font: 400 clamp(42px, 6.4vw, 78px)/1.02 var(--display); margin: 14px 0 22px; text-wrap: balance; color: #FFFFFF; }
.hero h1 em, .lost h1 em { color: var(--ice); }
.hero p, .lost p { margin: 0 0 30px; max-width: 32em; }
.hero img { width: 100%; height: auto; max-width: 520px; justify-self: end; mix-blend-mode: lighten; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; background: var(--ice); color: #031314; font: 600 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: #CCFFFF; }
.btn.ghost { background: transparent; color: var(--ice); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ice); }

/* The 404 page: the hero's statement, without the image. */
.lost { padding-block: 96px 120px; }

/* The band: the one repeated form. Label in the margin, content beside it. */
.band { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding-block: 56px; border-top: 1px solid var(--line); }
.band > .label { padding-top: 10px; }
.band .body { min-width: 0; display: flex; flex-direction: column; gap: 26px; }
h2 { font: 400 clamp(28px, 3.6vw, 40px)/1.12 var(--display); color: #FFFFFF; margin: 0; text-wrap: balance; max-width: 22em; }
h3 { font: 600 16px/1.35 var(--body); color: #FFFFFF; margin: 0 0 6px; }
p { margin: 0; }
.prose { max-width: 38em; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; }
.cols > div { min-width: 0; }
.k { font: 500 12px/1.6 var(--mono); color: var(--muted); margin-top: 8px; letter-spacing: 0.03em; }

.runs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.runs li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; min-width: 0; }
.runs li:nth-child(odd) { padding-right: 24px; }
.runs .who { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ice); flex: 0 0 74px; }
.runs .who.p { color: var(--muted); }

.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fig { padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fig + .fig { padding-left: 20px; border-left: 1px solid var(--line); }
.fig b { font: 400 clamp(30px, 3.4vw, 40px)/1 var(--display); color: #FFFFFF; font-variant-numeric: tabular-nums; }
.fig span { font: 400 13px/1.45 var(--mono); color: var(--muted); }

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-variant-numeric: tabular-nums; }
.rung { display: grid; grid-template-columns: 96px minmax(0, 1fr) 150px; gap: 16px; align-items: center; font: 400 13px/1.3 var(--mono); color: var(--muted); }
.rung b { font: 500 15px/1 var(--mono); color: var(--text); }
.rung .bar { height: 10px; }
.rung .bar i { display: block; height: 100%; background: var(--line); }
.rung:last-child .bar i { background: var(--gold); }
/* Bar widths: a certificate lifetime in days as a share of 398 days.
   Classes, not style="" attributes, so the CSP needs no 'unsafe-inline'. */
.rung .bar .d398 { width: 100%; }
.rung .bar .d200 { width: 50.3%; }
.rung .bar .d100 { width: 25.1%; }
.rung .bar .d47 { width: 11.8%; }

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tier { padding: 22px 22px 22px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tier + .tier { padding-left: 22px; border-left: 1px solid var(--line); }
.tier .name { font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ice); }
.tier p { font-size: 15px; }

.quiet { font: italic 400 22px/1.3 var(--display); color: var(--muted); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts > div { padding: 18px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts > div:nth-child(odd) { padding-right: 28px; }
.facts > div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.facts dt { font: 600 16px/1.35 var(--body); color: #FFFFFF; margin: 0 0 6px; }
.facts dd { margin: 0; font-size: 15px; }
@media (max-width: 860px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div:nth-child(odd) { padding-right: 0; }
  .facts > div:nth-child(even) { padding-left: 0; border-left: 0; }
}

.addr { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.addr code { font: 500 clamp(18px, 2.4vw, 22px)/1.2 var(--mono); color: #FFFFFF; user-select: all; overflow-wrap: anywhere; }
#copied { font: 400 13px/1 var(--mono); color: var(--muted); }

footer { border-top: 1px solid var(--line); padding-block: 28px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font: 400 12px/1.6 var(--mono); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 44px; }
  .hero img { justify-self: start; max-width: 240px; order: -1; }
  .lost { padding-block: 56px 72px; }
  .band { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 44px; }
  .cols, .runs { grid-template-columns: minmax(0, 1fr); }
  .runs li:nth-child(odd) { padding-right: 0; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig:nth-child(3) { padding-left: 0; border-left: 0; }
  .fig:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier + .tier { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .rung { grid-template-columns: 72px minmax(0, 1fr); }
  .rung .when { grid-column: 1 / -1; }
}
