/* VRtcl. One stylesheet for every page.
   Ground is the brand navy pushed darker. Linework is pale blue, like a plotted drawing.
   The one warm colour is the sprinkler pipe red, and it is only used for the sprinkler system. */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0b1d33;
  --ground-2: #0f2740;
  --brand: #143352;          /* VRTCL Navy, from the brand kit */
  --line: #2b4b6e;
  --line-soft: #1b3756;
  --draft: #bcd4ec;
  --ink: #eaf1f8;
  --ink-soft: #a6bdd4;
  --ink-faint: #7792ae;
  --pipe: #ff5b3a;
  --focus: #7fb5f0;
  --bar: 56px;
  --pad: clamp(16px, 4vw, 56px);
  --font: 'Hanken Grotesk', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.55 var(--font); font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--ground); padding: 8px 12px; border-radius: 3px; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- top bar */
.bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); background: var(--ground); border-bottom: 1px solid var(--line-soft);
}
.bar .brand { display: flex; align-items: center; height: 100%; }
.bar .brand img { height: 40px; width: auto; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 36px); font-size: 0.9375rem; }
.bar nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 0; border-bottom: 1px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); border-bottom-color: var(--draft); }

/* ---------------------------------------------------------------- buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: 3px;
  background: var(--ink); color: var(--ground); border: 1px solid var(--ink);
}
.btn:hover { background: var(--draft); border-color: var(--draft); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--draft); background: transparent; }
.textlink { color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--ink-faint); }
.textlink:hover { text-decoration-color: var(--ink); }

/* ---------------------------------------------------------------- the drafting ground behind big views */
.sheet {
  position: relative; overflow: hidden; background: var(--ground);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M48 0H0V48' fill='none' stroke='%2318324f' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 48px 48px;
}
.sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.note {
  position: absolute; right: var(--pad); bottom: 14px; z-index: 3;
  font-size: 0.8125rem; color: var(--ink-faint); text-align: right; pointer-events: none;
}

/* ---------------------------------------------------------------- home: hero */
.hero { min-height: calc(100svh - var(--bar) - 168px); min-height: calc(100vh - var(--bar) - 168px); }
@supports (height: 100svh) { .hero { min-height: calc(100svh - var(--bar) - 168px); } }
.hero .art { position: absolute; inset: 0; z-index: 1; }
.hero .copy { position: relative; z-index: 2; padding: clamp(40px, 9vh, 104px) var(--pad) 72px; max-width: 46rem; }
.hero h1 {
  font-weight: 600; font-size: clamp(2.5rem, 5.6vw, 5.25rem); line-height: 1.02; letter-spacing: -0.032em;
}
.hero h1 span { display: block; }
.hero .lede { margin-top: 26px; max-width: 31rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }

/* ---------------------------------------------------------------- home: trade pack picker (start screen) */
.packs { border-top: 1px solid var(--line); background: var(--ground); position: relative; z-index: 4; }
.packs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px var(--pad) 0; }
.packs-head h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.packs-head p { font-size: 0.875rem; color: var(--ink-faint); }
.packs ul { display: grid; grid-template-columns: 1.35fr repeat(4, 1fr); margin: 14px var(--pad) 0; border-top: 1px solid var(--line-soft); }
.pack {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  width: 100%; height: 100%; min-height: 118px; padding: 16px 18px 18px;
  border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.15s;
}
.packs li:first-child .pack { border-left-color: transparent; padding-left: 0; }
.pack:hover { background: var(--ground-2); }
.pack .name { display: block; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.pack .sub { display: block; margin-top: 4px; font-size: 0.9375rem; color: var(--ink-soft); }
.pack .state { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-faint); }
.pack .state i { width: 8px; height: 8px; border: 1px solid var(--ink-faint); border-radius: 50%; flex: none; }
.pack.live { border-top: 0; }
.pack.live .state { color: var(--ink); }
.pack.live .state i { background: var(--pipe); border-color: var(--pipe); }
.pack:not(.live) .name { color: var(--ink-soft); }
.packs-foot { height: var(--pad); min-height: 18px; }

/* ---------------------------------------------------------------- home: one core */
.core { border-top: 1px solid var(--line); padding: clamp(56px, 10vw, 120px) var(--pad); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); }
.core h2 { font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 3.1rem); line-height: 1.06; letter-spacing: -0.028em; max-width: 12ch; }
.core dl { border-top: 1px solid var(--line); }
.core dl > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.core dt { color: var(--ink-faint); font-size: 0.9375rem; padding-top: 2px; }
.core dd { max-width: 34rem; }

/* ---------------------------------------------------------------- title block footer (it is the footer of every page) */
.titleblock { border-top: 1px solid var(--line); margin: 0 var(--pad) var(--pad); border: 1px solid var(--line); display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr); }
.titleblock > * { padding: 14px 18px 16px; border-left: 1px solid var(--line); min-width: 0; }
.titleblock > :first-child { border-left: 0; display: flex; align-items: center; justify-content: center; }
.titleblock img { height: 74px; width: auto; }
.titleblock small { display: block; font-size: 0.8125rem; color: var(--ink-faint); margin-bottom: 4px; }
.titleblock p { font-size: 0.9375rem; line-height: 1.4; }
.titleblock a { text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the picker dialog */
dialog.ask {
  padding: 0; border: 1px solid var(--line); background: var(--ground); color: var(--ink);
  width: min(520px, calc(100vw - 32px)); border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
dialog.ask::backdrop { background: rgba(5, 14, 26, 0.72); }
.ask header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; background: var(--brand); border-bottom: 1px solid var(--line); }
.ask header h2 { font-size: 1rem; font-weight: 600; }
.ask header button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 3px; color: var(--draft); }
.ask header button:hover { background: rgba(255, 255, 255, 0.1); }
.ask .body { padding: 22px 18px 20px; }
.ask .body > p { color: var(--ink-soft); margin-bottom: 16px; }
.ask .who { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 14px; }
.ask .ways { display: grid; gap: 10px; }
.ask .way { display: block; text-decoration: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: 3px; }
.ask .way:hover { border-color: var(--draft); background: var(--ground-2); }
.ask .way b { display: block; font-size: 1.125rem; font-weight: 600; }
.ask .way span { display: block; color: var(--ink-soft); margin-top: 2px; font-size: 0.9375rem; }

/* ---------------------------------------------------------------- fire protection: the scroll scene */
.scene-track { position: relative; }
.js-scene .scene-track { height: 760vh; }
.js-scene.reduced .scene-track { height: auto; }
.scene-stick { position: relative; min-height: 70vh; }
.js-scene .scene-stick { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); min-height: 0; }
@supports (height: 100svh) { .js-scene .scene-stick { height: calc(100svh - var(--bar)); } }

.stages { position: absolute; z-index: 3; left: var(--pad); top: 50%; transform: translateY(-50%); width: min(27rem, 34vw); display: grid; }
.stages { text-shadow: 0 0 10px var(--ground), 0 0 3px var(--ground); }
.stage { grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; transition: opacity 0.28s, visibility 0.28s; padding-left: 20px; border-left: 2px solid var(--line); }
.stage.on { opacity: 1; visibility: visible; }
.stage h1, .stage h2 { font-weight: 600; line-height: 1.06; letter-spacing: -0.028em; }
.stage h1 { font-size: clamp(2.2rem, 4vw, 3.9rem); }
.stage h2 { font-size: clamp(1.7rem, 2.7vw, 2.45rem); }
.stage p { margin-top: 16px; color: var(--ink-soft); font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.5; }
.stage p.fine { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-faint); }
.stage p strong { color: var(--ink); font-weight: 600; }
.stage .actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.stage.on { border-left-color: var(--draft); }
.stage.on.pipe { border-left-color: var(--pipe); }

.leader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.leader path { fill: none; stroke: var(--draft); stroke-width: 1; }
.leader circle { fill: var(--ground); stroke: var(--draft); stroke-width: 1.5; }
.leader.pipe path, .leader.pipe circle { stroke: var(--pipe); }

.layers { position: absolute; z-index: 3; right: var(--pad); top: 50%; transform: translateY(-50%); width: 11.5rem; }
.layers h2 { font-size: 0.8125rem; font-weight: 500; color: var(--ink-faint); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.layers button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 0; font-size: 0.9375rem; line-height: 1.25; color: var(--ink-faint); transition: color 0.2s; }
.layers button i { width: 11px; height: 11px; flex: none; border: 1.5px solid var(--draft); background: transparent; transition: background-color 0.2s, opacity 0.2s; opacity: 0.55; }
.layers button.pipe i { border-color: var(--pipe); }
.layers button:hover { color: var(--ink); }
.layers.all button { color: var(--ink-soft); }
.layers.all button i { opacity: 1; }
.layers button.on { color: var(--ink); }
.layers button.on i { background: var(--draft); opacity: 1; }
.layers button.on.pipe i { background: var(--pipe); }

.rail { position: absolute; z-index: 3; left: var(--pad); bottom: 22px; display: flex; align-items: center; gap: 14px; font-size: 0.875rem; color: var(--ink-faint); }
.rail ol { display: flex; gap: 6px; }
.rail li button { display: block; width: 26px; height: 22px; position: relative; }
.rail li button::after { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); transition: background-color 0.2s; }
.rail li button:hover::after { background: var(--ink-faint); }
.rail li button.done::after { background: var(--ink-faint); }
.rail li button.on::after { background: var(--ink); }
.rail.gone { opacity: 0; pointer-events: none; }
.rail { transition: opacity 0.25s; }
.rail .count { min-width: 5.5rem; }
.cue { position: absolute; z-index: 3; left: var(--pad); bottom: 22px; display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; color: var(--ink-soft); transition: opacity 0.25s; }
.cue::before { content: ''; width: 1px; height: 38px; background: var(--draft); }
.cue.gone { opacity: 0; pointer-events: none; }
.stepper { grid-area: 2 / 1; display: none; gap: 10px; margin-top: 22px; padding-left: 22px; }
.reduced .stepper { display: flex; }
.reduced .cue { display: none; }

/* before JS, or if the model cannot draw: the steps read as plain sections */
html:not(.js-scene) .scene-stick { min-height: 0; }
html:not(.js-scene) .stages { position: static; transform: none; width: auto; padding: 48px var(--pad) 0; display: block; }
html:not(.js-scene) .stage { opacity: 1; visibility: visible; margin-bottom: 40px; max-width: 36rem; }
html:not(.js-scene) .scene canvas, html:not(.js-scene) .leader, html:not(.js-scene) .layers, html:not(.js-scene) .rail, html:not(.js-scene) .cue, html:not(.js-scene) .note { display: none; }

/* ---------------------------------------------------------------- fire protection: after the scene */
.notes { border-top: 1px solid var(--line); padding: clamp(48px, 8vw, 104px) var(--pad); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); }
.notes h2 { font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -0.026em; max-width: 13ch; }
.notes dl { border-top: 1px solid var(--line); }
.notes dl > div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.notes dt { color: var(--ink-faint); font-size: 0.9375rem; padding-top: 2px; }
.notes dd { max-width: 34rem; }
.talk { border-top: 1px solid var(--line); padding: clamp(56px, 9vw, 120px) var(--pad); background: var(--brand); }
.talk h2 { font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 4.1rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 14ch; }
.talk p { margin-top: 20px; max-width: 32rem; color: var(--draft); font-size: 1.125rem; }
.talk .actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.talk .btn { background: var(--ink); }
.titleblock-wrap { padding-top: var(--pad); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 980px) {
  .packs ul { grid-template-columns: repeat(2, 1fr); }
  .packs li:first-child { grid-column: 1 / -1; }
  .packs li:first-child .pack { padding-left: 0; }
  .packs li:nth-child(2) .pack, .packs li:nth-child(4) .pack { border-left-color: transparent; padding-left: 0; }
  .core, .notes { grid-template-columns: 1fr; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > :nth-child(3) { border-left: 0; }
  .titleblock > :nth-child(n+3) { border-top: 1px solid var(--line); }
  .titleblock > :first-child { grid-column: 1 / -1; justify-content: flex-start; border-bottom: 0; }
  .titleblock > :nth-child(2) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  :root { --bar: 52px; }
  .hero { min-height: 0; }
  .hero .copy { padding-top: 36px; padding-bottom: 20px; }
  .hero { display: flex; flex-direction: column; }
  .hero .art { position: relative; inset: auto; height: 340px; flex: none; }
  .hero .note { bottom: 10px; }
  .layers { display: none; }
  .leader { display: none; }
  .stages { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; background: var(--ground); border-top: 1px solid var(--line); padding: 16px 16px 50px; }
  .stage { align-self: start; padding-left: 14px; }
  .stage h1 { font-size: 2rem; }
  .stage h2 { font-size: 1.5rem; }
  .stage p { margin-top: 10px; font-size: 0.96875rem; }
  .stage p.fine { margin-top: 8px; font-size: 0.875rem; }
  .stage .actions { margin-top: 14px; }
  .rail { left: 16px; right: 16px; bottom: 12px; justify-content: space-between; z-index: 4; }
  .rail li button { width: 20px; }
  .cue { left: 16px; bottom: calc(var(--panel-h, 250px) + 12px); }
  .scene .note { right: 16px; bottom: auto; top: 8px; }
  .stepper { padding-left: 14px; margin-top: 12px; }
  .reduced .stage .actions { margin-top: 10px; }
  .stage .btn { min-height: 42px; padding: 0 16px; }
}
@media (max-width: 560px) {
  .pack { min-height: 100px; padding: 14px 14px 16px; }
  .core dl > div, .notes dl > div { grid-template-columns: 1fr; gap: 4px; }
  .titleblock { margin-left: 16px; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage, .layers button, .layers button i, .rail li button::after, .cue, .pack { transition: none; }
}
