/* renderwall — Blueprint / Engineering Stamp
   Cyanotype ground, dimension-line callouts, rubber-stamp verdicts.
   See index.html's opening comment for the full direction contract. */

@font-face {
  font-family: 'Allerta Stencil';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/allerta-stencil-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/archivo-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}

:root {
  --blue-950: #081b33;
  --blue-900: #0d2c52;
  --blue-850: #123863;
  --blue-800: #17457a;
  --line: #d8e8ff;
  --line-dim: #9fbadd;
  --line-faint: rgba(216, 232, 255, 0.22);
  --line-faint2: rgba(216, 232, 255, 0.1);
  --accept: #3fc0a2;
  --refuse: #cf5a37;
  --font-display: 'Allerta Stencil', ui-sans-serif, sans-serif;
  --font-body: 'Archivo', ui-sans-serif, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* A real fixed layer, not background-attachment:fixed (unreliable on iOS) —
   content scrolls over a grid that stays put, the cheapest true parallax
   there is, at zero JS cost. */
.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(0deg, var(--line-faint2) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--line-faint2) 0 1px, transparent 1px 48px),
    var(--blue-900);
}

body {
  margin: 0;
  color: var(--line);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--line); }
code { font-family: var(--font-mono); }

::selection { background: var(--accept); color: var(--blue-950); }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accept); outline-offset: 3px; border-radius: 2px;
}

/* Firefox */
* { scrollbar-color: var(--blue-800) var(--blue-950); scrollbar-width: thin; }
/* WebKit/Blink */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--blue-950); }
::-webkit-scrollbar-thumb { background: var(--blue-800); border: 2px solid var(--blue-950); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accept); }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* ── Title-block header ─────────────────────────────────────────────── */
.titleblock {
  border-bottom: 1px solid var(--line-faint);
  background: var(--blue-950);
  position: sticky; top: 0; z-index: 10;
}
.titleblock__in {
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem 1.5rem;
  flex-wrap: wrap;
}
.titleblock__mark {
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 1.05rem; text-decoration: none;
}
.titleblock__nav { display: flex; gap: 1.5rem; margin-right: auto; flex-wrap: wrap; }
.titleblock__nav a {
  font-family: var(--font-mono); font-size: 0.82rem; text-decoration: none;
  color: var(--line-dim);
}
.titleblock__nav a:hover { color: var(--line); }
.titleblock__meta {
  display: flex; gap: 0; margin: 0; font-family: var(--font-mono); font-size: 0.72rem;
}
.titleblock__meta > div {
  padding: 0 0.9rem; border-left: 1px solid var(--line-faint);
}
.titleblock__meta > div:first-child { border-left: none; }
.titleblock__meta dt { color: var(--line-dim); letter-spacing: 0.08em; }
.titleblock__meta dd { margin: 0; color: var(--line); }

/* ── Shared type ─────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-body); font-weight: 800; margin: 0; }
.lead { color: var(--line-dim); max-width: 44rem; font-size: 1.05rem; margin: 0.9rem 0 0; }

/* A sheet number set inline with its heading, the SAME device the drawing
   index uses for its rows — never a colored line floating above the
   heading (that pattern is banned outright, not just discouraged here). */
.sht {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--accept);
  border: 1px solid var(--line-faint); border-radius: 3px;
  width: 1.9em; height: 1.9em; margin-right: 0.5rem; vertical-align: middle;
  transform: translateY(-0.05em);
}
.band h2 { font-size: clamp(1.4rem, 3vw, 2rem); max-width: 42rem; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3.5rem; }
.hero__head {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0 0 1.3rem;
  text-shadow: 0 2px 0 rgba(0,0,0,0.28);
}
.hero__lead { font-size: 1.15rem; margin: 0 0 2.4rem; max-width: 46rem; }

.sheet {
  position: relative;
  border: 1px solid var(--line-faint);
  background: var(--blue-850);
  padding: 1.6rem 1.8rem;
  margin: 0 0 2rem;
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border-color: var(--line-faint); border-style: solid;
}
.sheet::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.sheet::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.sheet__cap {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--line-dim); text-transform: uppercase; margin: 0 0 1.3rem;
}
.sheet__row {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.1rem 0; border-top: 1px dashed var(--line-faint);
}
.sheet__row:first-of-type { border-top: none; }
.sheet__url {
  font-family: var(--font-mono); font-size: 0.86rem; margin: 0; flex: 1;
  display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: 1.1rem; column-gap: 0.9rem;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field b {
  font-weight: 400; border-bottom: 1px solid var(--line-faint); padding-bottom: 3px;
  word-break: break-all;
}
.field i {
  font-style: normal; font-size: 0.62rem; color: var(--line-dim);
  white-space: nowrap; letter-spacing: 0.02em;
}
.field--accept b { border-bottom-color: var(--accept); }
.field--refuse b { border-bottom-color: var(--refuse); }

/* A real double-ring stamp: an outline sitting outside the border, not a
   colored inset shadow standing in for depth. */
.stamp {
  font-family: var(--font-display);
  border: 3px solid currentColor; border-radius: 6px;
  outline: 1px solid currentColor; outline-offset: 3px;
  padding: 0.5rem 1.1rem; text-align: center; letter-spacing: 0.06em;
  rotate: -4deg; flex-shrink: 0; white-space: nowrap;
  font-size: 1.05rem;
}
.stamp span {
  display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: 0.6rem; letter-spacing: 0.05em; text-transform: uppercase;
  margin-top: 2px;
}
.stamp--accept { color: var(--accept); }
.stamp--refuse { color: var(--refuse); }
.stamp--sm { font-size: 0.7rem; padding: 0.3rem 0.6rem; outline-offset: 2px; rotate: -3deg; }

/* Rev A / Rev B — the page's stark, deliberately unbalanced highlight: REV A
   reads flat and washed out (the drawing not yet approved), REV B is filled
   with the accept ink (the drawing that passed review) — a real drafting
   convention (a superseded revision is struck pale; the current one is
   inked solid) doing the "before/after" work instead of a generic split. */
.band--contrast { padding-top: 2.5rem; }
.band--contrast h2 { margin-bottom: 2rem; }
.revcompare {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--line-faint);
}
.revcompare__col {
  flex: 1; min-width: 16rem; padding: 2rem 2.2rem; font-size: 1rem;
}
.revcompare__col ul { margin: 0; padding: 0; list-style: none; }
.revcompare__col li {
  position: relative; padding-left: 1.4rem; margin-bottom: 1rem; line-height: 1.5;
}
.revcompare__col li::before {
  content: "\2013"; position: absolute; left: 0; color: var(--line-dim);
}
.revcompare__col li:last-child { margin-bottom: 0; }
.revcompare__tag {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  margin: 0 0 1.2rem !important; text-transform: uppercase;
}
/* REV A: washed out, low-contrast, struck through its own tag — a
   superseded drawing, not an alarming "problem" red. */
.revcompare__col:first-child { color: var(--line-dim); filter: saturate(0.5); }
.revcompare__col:first-child .revcompare__tag { color: var(--line-dim); text-decoration: line-through; text-decoration-color: var(--refuse); }
.revcompare__col:first-child li::before { color: var(--refuse); content: "\2717"; font-family: var(--font-mono); font-size: 0.85em; }
/* REV B: the approved drawing, inked solid. */
.revcompare__col--accept {
  background: var(--accept); color: var(--blue-950); font-weight: 600;
}
.revcompare__col--accept .revcompare__tag { color: var(--blue-950); }
.revcompare__col--accept li::before { content: "\2713"; color: var(--blue-950); font-family: var(--font-mono); font-size: 0.85em; }
.revcompare__arrow {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.6rem; color: var(--line-dim);
  flex-basis: 3rem; background: var(--blue-950);
}

.cta {
  display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap;
  border-top: 1px solid var(--line-faint); padding-top: 1.8rem;
}
.cta__sig { flex: 1; min-width: 14rem; }
.cta__k { font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.4rem; color: var(--accept); }
.cta__v { margin: 0; color: var(--line-dim); font-size: 0.95rem; }
.cta__code, .install__code {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7;
  background: var(--blue-950); border: 1px solid var(--line-faint);
  padding: 1rem 1.2rem; margin: 0; overflow-x: auto; flex: 1.4; min-width: 18rem;
}

/* ── Bands ───────────────────────────────────────────────────────────── */
.band { padding: 4rem 0; }
.band--alt { background: var(--blue-800); }

/* ── The measurement ruler — a dimension line with hanging callouts,
   the hero's own field-diagram device carried to a second scale, never a
   generic bordered stat-card grid. ─────────────────────────────────────── */
.ruler {
  position: relative; display: flex; gap: 2.5rem; flex-wrap: wrap;
  margin-top: 3.5rem; padding-top: 2.6rem;
}
.ruler__axis { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-faint); }
.ruler__pt { position: relative; flex: 1; min-width: 14rem; }
.ruler__pt::before {
  content: ""; position: absolute; top: -2.6rem; left: 0; width: 1px; height: 2.6rem;
  background: var(--line-dim);
}
.ruler__pt::after {
  content: ""; position: absolute; top: -2.6rem; left: -3px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--line-dim);
}
.ruler__pt--own::before, .ruler__pt--own::after { background: var(--accept); }
.ruler__figure { font-family: var(--font-display); font-size: 3rem; margin: 0 0 0.4rem; line-height: 1; }
.ruler__figure span { font-size: 1.4rem; }
.ruler__k { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--line-dim); margin: 0 0 0.8rem; }
.ruler__v { margin: 0; font-size: 0.9rem; color: var(--line-dim); }
.ruler__v code { font-size: 0.78rem; display: inline-block; margin-top: 0.4rem; }

/* ── The drawing index — a ruled list of rows, like a real drawing set's
   table of contents, never four identical bordered boxes. ────────────── */
.index { margin-top: 2.2rem; }
.index__row {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 1.1rem 0; border-top: 1px dashed var(--line-faint);
}
.index__row:first-child { border-top: 1px solid var(--line-faint); }
.index__no { font-family: var(--font-mono); color: var(--accept); font-size: 0.85rem; flex-shrink: 0; width: 1.5rem; }
.index__name { flex: 2; font-weight: 700; }
.index__name small { font-family: var(--font-mono); font-weight: 400; color: var(--accept); display: block; margin-top: 0.2rem; font-size: 0.82rem; }
.index__name i { font-style: italic; color: var(--line-dim); font-weight: 400; font-size: 0.85rem; }
.index__id {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--line-dim);
  text-align: right; flex-shrink: 0;
}

/* Limits */
.notes { display: grid; gap: 1rem; margin-top: 2rem; }
.note { display: flex; gap: 1.2rem; align-items: flex-start; border-top: 1px dashed var(--line-faint); padding-top: 1.2rem; }
.note__body { margin: 0; color: var(--line-dim); }
.note__body b { color: var(--line); }
.note__body code { font-size: 0.85rem; }

.install__code { display: block; margin-top: 1.6rem; }
.roadmap__note { margin-top: 1.6rem; }
.foot__meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--line-dim); margin-top: 1.6rem; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line-faint); background: var(--blue-950); padding: 2.2rem 0; }
.foot__in { font-size: 0.85rem; color: var(--line-dim); }
.foot strong { color: var(--line); }

/* ── Scroll-linked reveal: a real drafting-sheet effect — a panel tilts up
   off the page as if laid on a light table, then settles flat as it
   crosses into view. Native, GPU-composited, no JS on supporting browsers. */
.reveal { will-change: transform, opacity; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: tiltIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
    .stamp {
      animation: pressDown linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
  }
  /* Fallback for browsers without scroll-timeline support (Safari, Firefox
     at time of writing): scroll.js toggles .reveal--in via
     IntersectionObserver, and this transition carries the same tilt-and-settle
     shape as a one-shot entrance instead of a scroll-linked one. */
  .no-scroll-timeline .reveal {
    opacity: 0; transform: perspective(1200px) rotateX(8deg) translateY(36px) translateZ(-40px);
    transition: transform 0.7s cubic-bezier(.2,.7,.2,1), opacity 0.7s ease-out;
  }
  .no-scroll-timeline .reveal.reveal--in { opacity: 1; transform: none; }
}

@keyframes tiltIn {
  from { opacity: 0; transform: perspective(1200px) rotateX(8deg) translateY(36px) translateZ(-40px); }
  to   { opacity: 1; transform: perspective(1200px) rotateX(0deg) translateY(0) translateZ(0); }
}
@keyframes pressDown {
  from { scale: 1.5; }
  to   { scale: 1; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .titleblock__meta { display: none; }
  .titleblock__in { flex-wrap: wrap; }
  .titleblock__nav {
    flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .titleblock__nav a { flex-shrink: 0; }
  .ruler, .index__row { grid-template-columns: 1fr; }
  .ruler { flex-direction: column; gap: 2.6rem; }
  .index__row { flex-wrap: wrap; }
  .index__id { text-align: left; width: 100%; }
  .sheet__row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .stamp { align-self: flex-start; }
  .cta { flex-direction: column; }
  .revcompare { flex-direction: column; }
  .revcompare__arrow { transform: rotate(90deg); }
  .note { flex-direction: column; gap: 0.6rem; }
}
