/* Printly Preflight - public pages (Home, How it works, About, Contact).
   One stylesheet, no web fonts, no third-party requests. The pages are served
   with a Content-Security-Policy that allows only this file, /site/site.js
   and the images in /site/. Colours come from the Printly mark (navy to teal)
   and the risk colours of the app itself. */

:root {
  color-scheme: light dark;

  --paper: #f5f9f9;
  --paper-2: #edf4f5;
  --surface: #ffffff;
  --ink: #0d232d;
  --text: #2c4652;
  --muted: #5b727d;
  --line: #d6e3e6;
  --line-2: #bfd3d8;
  --plate: #eef5f6;
  --plate-line: rgba(21, 124, 146, 0.075);

  --accent: #0d7f98;
  --accent-hover: #0a6980;
  --accent-ink: #ffffff;
  --brand-grad: linear-gradient(135deg, #123f80 0%, #2479a3 52%, #46cbca 100%);

  --night: #0a1d26;
  --night-2: #0d2632;
  --night-ink: #eff7f8;
  --night-text: #b9cdd3;
  --night-muted: #86a3ab;
  --night-line: rgba(92, 196, 210, 0.085);
  --night-edge: rgba(127, 214, 226, 0.16);
  --aqua: #7fd6e2;
  --cta: #19a6bf;
  --cta-hover: #45c3d6;
  --cta-ink: #03161c;

  --red: #e2433a;
  --orange: #e98219;
  --yellow: #f2c94c;
  --blue: #347fc4;
  --amber-bg: #fff8e8;
  --amber-line: #efd9a6;

  --shadow: 0 1px 2px rgba(14, 37, 48, 0.06), 0 12px 32px -12px rgba(14, 37, 48, 0.2);
  --shadow-lift: 0 2px 6px rgba(3, 17, 23, 0.18), 0 30px 70px -24px rgba(3, 17, 23, 0.55);

  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
                  "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 68px;
  --section-pad: clamp(72px, 9vw, 128px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #09151a;
    --paper-2: #0c1b21;
    --surface: #0f1f25;
    --ink: #eaf3f5;
    --text: #c2d4da;
    --muted: #8ba3ac;
    --line: #1c333b;
    --line-2: #29454e;
    --plate: #0c1a20;
    --plate-line: rgba(92, 196, 210, 0.07);
    --accent: #3cbfd4;
    --accent-hover: #67d0e0;
    --accent-ink: #04171d;
    --night: #061319;
    --night-2: #081a22;
    --amber-bg: #221a0b;
    --amber-line: #4d3a14;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -14px rgba(0, 0, 0, 0.65);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); font-family: var(--font-display); margin: 0; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }

.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--surface); color: var(--ink); font-weight: 600;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }

/* ---------- Small shared pieces ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 18px;
}
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  margin-right: 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
  vertical-align: 0.1em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-small { min-height: 40px; padding: 9px 16px; font-size: 0.9375rem; border-radius: 10px; }
.btn-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.arrow { transition: transform 0.18s ease; }
.btn:hover .arrow, .text-link:hover .arrow { transform: translateX(3px); }

.night .btn-primary, .site-header .btn-primary { background: var(--cta); color: var(--cta-ink); }
.night .btn-primary:hover, .site-header .btn-primary:hover { background: var(--cta-hover); }
.night .btn-ghost, .site-header .btn-ghost { color: var(--night-ink); border-color: rgba(200, 232, 238, 0.3); }
.night .btn-ghost:hover, .site-header .btn-ghost:hover { color: #ffffff; border-color: var(--aqua); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cta-note { margin-top: 16px; font-size: 0.875rem; color: var(--muted); max-width: 40em; }
.cta-note .label { color: var(--accent); }
.night .cta-note { color: var(--night-muted); }
.night .cta-note .label { color: var(--aqua); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 650; text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Dark bands: the build plate, a square grid like the Printly viewer's. */
.night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night);
  color: var(--night-text);
}
.night::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--night-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 85% 90% at 70% 10%, #000 20%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 90% at 70% 10%, #000 20%, transparent 78%);
}
.night::after {
  content: "";
  position: absolute; z-index: -1;
  width: 820px; height: 820px; right: -260px; top: -380px;
  background: radial-gradient(circle, rgba(60, 187, 195, 0.17), transparent 65%);
  pointer-events: none;
}
.night h1, .night h2, .night h3 { color: var(--night-ink); }
.night .eyebrow { color: var(--aqua); }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 25, 33, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
          backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--night-edge);
  color: var(--night-text);
}
.header-row {
  display: flex; align-items: center; gap: 28px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--night-ink); flex: none; }
.mark { width: 36px; height: 32px; flex: none; overflow: visible; }
.brand-name { font-family: var(--font-display); font-size: 1.125rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name b { font-weight: 750; }
.tag {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--aqua);
  border: 1px solid rgba(127, 214, 226, 0.45); border-radius: 4px; padding: 1px 6px;
}

.site-menu { display: flex; align-items: center; gap: 28px; flex: 1; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9688rem;
  font-weight: 550;
  color: var(--night-text);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-links a:hover { color: #ffffff; background: rgba(127, 214, 226, 0.08); }
.nav-links a[aria-current="page"] { color: #ffffff; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  border-radius: 2px;
  background: var(--aqua);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(200, 232, 238, 0.25);
  background: transparent;
  color: var(--night-ink);
  cursor: pointer;
  place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.18s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.menu-open .nav-toggle-bars { background: transparent; }
.menu-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959px) {
  .header-row { flex-wrap: wrap; gap: 12px 16px; }
  .site-menu {
    flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 18px;
    padding: 8px 0 22px;
  }
  .nav-links { flex-direction: column; align-items: stretch; margin-left: 0; gap: 2px; }
  .nav-links a { padding: 12px 10px; font-size: 1.0625rem; }
  .nav-links a[aria-current="page"]::after { left: 10px; right: auto; width: 24px; bottom: 6px; }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { min-height: 48px; }
  /* With the script: the menu folds away behind the toggle. */
  .js .nav-toggle { display: grid; }
  .js .site-menu { display: none; }
  .js.menu-open .site-menu { display: flex; }
}

/* ---------- Home: first screen ---------- */
.hero { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: min(720px, calc(100svh - var(--header-h) - 120px));
}
.hero h1 {
  font-size: clamp(2.5rem, 1.35rem + 2.7vw, 3.75rem);
  line-height: 1.01;
  letter-spacing: -0.04em;
  font-weight: 750;
}
.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}
.night .lede { color: var(--night-text); }

/* The risk display: print file -> flagged area -> what to check. Each layer
   overlaps the one below only where that capture is empty (sky, bare build
   plate), so nothing of the model or its highlights is hidden. */
.hero-visual { position: relative; }
.hv-stage { position: relative; padding: 70px 0 150px 124px; }
.hv-view, .hv-file, .hv-fix { position: relative; }
.hv-view .frame {
  border-radius: 18px; padding: 7px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lift);
}
.hv-view img { width: 100%; border-radius: 12px; background: #fbfefd; }
.hv-file { position: absolute; left: 0; top: 0; width: 340px; z-index: 2; }
.hv-fix { position: absolute; right: -10px; bottom: 0; width: 290px; z-index: 3; }
.hv-fix img { border-radius: 12px; box-shadow: var(--shadow-lift); }
.hv-tag {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--aqua);
}
.hv-tag span {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--brand-grad); color: #ffffff; font-weight: 700; font-size: 0.6875rem;
}
.hv-view .hv-tag, .hv-fix .hv-tag {
  background: rgba(10, 29, 38, 0.88); padding: 4px 10px 4px 5px; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(127, 214, 226, 0.14);
}
.hv-view .hv-tag { position: absolute; left: 18px; bottom: 14px; margin: 0; z-index: 1; }
.file-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #061219;
  border: 1px solid var(--night-edge);
  box-shadow: var(--shadow-lift);
}
.file-tile strong {
  display: block;
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600;
  color: var(--night-ink);
  overflow-wrap: anywhere;
}
.file-tile span { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--night-muted); }
.file-icon {
  flex: none; width: 34px; height: 34px; padding: 5px;
  border-radius: 9px; background: var(--brand-grad); color: #ffffff;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
}
.hero-visual figcaption {
  position: absolute; left: 124px; bottom: 0;
  width: calc(100% - 124px - 300px - 24px); min-width: 180px;
  font-size: 0.8125rem; line-height: 1.5; color: var(--night-muted);
}
.hero-visual figcaption .label { color: var(--aqua); display: table; margin-bottom: 6px; }

/* ---------- Home: three steps ---------- */
.trio {
  list-style: none;
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
/* A rail through the three numbers: print file -> flagged area -> next step. */
.trio::before {
  content: "";
  position: absolute; top: 46px; left: 16%; right: 16%; height: 2px;
  background: linear-gradient(90deg, var(--line-2), var(--accent));
  transform-origin: left;
  z-index: 1;
}
.trio-step {
  position: relative;
  padding: 26px 26px 30px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.trio-num {
  position: relative; z-index: 2;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--brand-grad); color: #ffffff;
  font-family: var(--font-mono); font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(18, 63, 128, 0.6);
}
.trio-step h3 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 700; margin: 18px 0 8px; }
.trio-step p { color: var(--muted); }
.trio-more { margin-top: 36px; text-align: center; }

/* ---------- G-code excerpt (How it works, for experienced users) ---------- */
.code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: #cfe3e8;
  background: #061219;
  border: 1px solid var(--night-edge);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(127, 214, 226, 0.12);
  font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--night-muted);
}
.code-head span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-head span:last-child { flex: none; white-space: nowrap; }
.code-body { padding: 10px 0 12px; }
.cl {
  display: grid; grid-template-columns: 5.5ch minmax(0, 1fr); gap: 14px;
  padding: 0 16px;
  white-space: pre;
}
.ln { color: #4e6a73; text-align: right; user-select: none; }
.tx { overflow: hidden; text-overflow: ellipsis; }
.tx.cmt { color: #7fd6e2; }
.cl.gap .tx { color: #4e6a73; }
.cl.hot { background: rgba(226, 67, 58, 0.17); box-shadow: inset 3px 0 0 var(--red); }
.cl.hot .tx.cmt { color: #ffb0a9; }
.code-note {
  padding: 10px 16px 0;
  border-top: 1px solid rgba(127, 214, 226, 0.12);
  font-size: 0.6875rem; color: var(--night-muted);
}
details.more { margin-top: 22px; }
details.more summary {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 650; color: var(--accent);
  list-style: none;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before {
  content: ""; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.2s ease;
}
details.more[open] summary::before { transform: rotate(45deg); }
details.more .code { margin-top: 14px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(52px, 7vw, 88px); }
.page-hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.2vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  font-weight: 750;
  max-width: 14em;
}
.page-hero .lede { max-width: 38em; }
.jump-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.jump-links a {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(200, 232, 238, 0.24);
  font-size: 0.875rem; color: var(--night-text); text-decoration: none;
}
.jump-links a:hover { color: #ffffff; border-color: var(--aqua); }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section + .section { padding-top: 0; }
.section.tint { background: var(--paper-2); border-block: 1px solid var(--line); padding-top: var(--section-pad); }
.section.tint + .section { padding-top: var(--section-pad); }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 4.5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2, .band h2, .compat h2 {
  font-size: clamp(2rem, 1.25rem + 2.3vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -0.033em;
  font-weight: 750;
}
.section-head > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.125rem; }

/* Product shots sit on a light "build plate". */
.plate {
  padding: clamp(14px, 2.4vw, 30px);
  border-radius: 22px;
  border: 1px solid var(--line);
  background-color: var(--plate);
  background-image:
    linear-gradient(var(--plate-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--plate-line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
}
.plate img {
  margin-inline: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fbfefd;
}
.plate figcaption { margin-top: 14px; text-align: center; font-size: 0.875rem; color: var(--muted); }
.fit-320 { width: 100%; max-width: 320px; }
.fit-560 { width: 100%; max-width: 560px; }

/* ---------- How it works: the guided preview ----------
   Static by default (five real stills with captions). site/tour.js adds
   .tour-live only when scripts run and motion is allowed; the section then
   becomes tall and its player stays in view while the page scrolls past. */
.tour { padding: clamp(64px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }
/* The dark band clips its glow with overflow: hidden, which would stop the
   sticky player from sticking; clip does the same without that side effect. */
.tour.night { overflow: visible; }
@supports (overflow: clip) { .tour.night { overflow: clip; } }
.tour-head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 56px); }
.tour-head h2 { font-size: clamp(2rem, 1.25rem + 2.3vw, 3.15rem); line-height: 1.06; letter-spacing: -0.033em; font-weight: 750; }
.tour-head > p:not(.eyebrow) { margin-top: 18px; font-size: 1.125rem; color: var(--night-text); }
.tour-steps { list-style: none; display: grid; gap: clamp(40px, 5vw, 64px); }
.tour-step {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 4vw, 56px); align-items: center;
}
.tour-text h3 { font-size: clamp(1.375rem, 1.15rem + 0.6vw, 1.75rem); letter-spacing: -0.02em; font-weight: 700; margin: 14px 0 8px; }
.tour-text p { color: var(--night-text); }
.tour-num {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 9px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.875rem;
  background: var(--brand-grad); color: #ffffff;
}
.tour-still img, .tour-poster {
  width: 100%; border-radius: 14px; background: #fbfefd;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lift);
}
.tour-stage { display: none; }
.tour-note { margin-top: 28px; font-size: 0.875rem; color: var(--night-muted); }
.tour-live-only { display: none; }

.tour-live .tour-live-only { display: inline; }
.tour-live .tour-track { height: 560vh; }
.tour-live .tour-sticky {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
}
.tour-live .tour-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.tour-live .tour-steps { gap: 6px; }
.tour-live .tour-step { display: block; }
.tour-live .tour-still { display: none; }
.tour-live .tour-text {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 16px; align-items: start;
  padding: 14px 16px; border-radius: 14px;
  opacity: 0.4;
  transition: opacity 0.35s ease, background-color 0.35s ease;
}
.tour-live .tour-text .tour-num { grid-row: span 2; }
.tour-live .tour-text h3 { margin: 4px 0 0; font-size: 1.1875rem; }
.tour-live .tour-text p { grid-column: 2; max-height: 0; overflow: hidden; opacity: 0; font-size: 0.975rem;
  transition: max-height 0.45s var(--ease), opacity 0.35s ease, margin 0.35s ease; }
.tour-live .tour-num { background: transparent; color: var(--aqua); border: 1px solid rgba(127, 214, 226, 0.35);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease; }
.tour-live .is-done .tour-num { background: rgba(127, 214, 226, 0.12); }
.tour-live .is-active .tour-text { opacity: 1; background: rgba(127, 214, 226, 0.07); }
.tour-live .is-active .tour-text p { max-height: 12em; opacity: 1; margin-top: 6px; }
.tour-live .is-active .tour-num { background: var(--brand-grad); color: #ffffff; border-color: transparent; }
.tour-live .tour-stage { display: block; margin: 0; }
.tour-window {
  border-radius: 18px; overflow: hidden;
  background: #081a22;
  border: 1px solid rgba(127, 214, 226, 0.18);
  box-shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.tour-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(127, 214, 226, 0.12);
  font-size: 0.8125rem; color: var(--night-muted);
}
.tour-dots { display: inline-flex; gap: 6px; }
.tour-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(185, 205, 211, 0.22); }
.tour-badge {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--aqua); border: 1px solid rgba(127, 214, 226, 0.45); border-radius: 4px; padding: 1px 7px;
}
.tour-where { margin-left: auto; white-space: nowrap; }
.tour-screen { position: relative; aspect-ratio: 1200 / 750; background: #f4f9f9; }
.tour-live[data-set="m"] .tour-screen { aspect-ratio: 720 / 600; }
.tour-screen canvas, .tour-screen .tour-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 0; box-shadow: none; object-fit: cover;
}
.tour-progress { height: 3px; background: rgba(127, 214, 226, 0.12); }
.tour-progress span { display: block; height: 100%; background: linear-gradient(90deg, #2479a3, #46cbca);
  transform: scaleX(0); transform-origin: left; }

@media (max-width: 700px) {
  .tour-step { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tour-live .tour-track { height: 460vh; }
  .tour-live .tour-sticky { height: calc(100svh - var(--header-h)); }
  .tour-live .tour-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: center; }
  .tour-live .tour-stage { order: -1; }
  /* One caption at a time on a phone, in the same place. */
  .tour-live .tour-steps { display: grid; gap: 0; }
  .tour-live .tour-step { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s; }
  .tour-live .tour-step.is-active { opacity: 1; visibility: visible; }
  .tour-live .tour-text { opacity: 1; padding: 0; background: none; }
  .tour-live .tour-text p { max-height: none; opacity: 1; margin-top: 6px; }
  .tour-live .is-active .tour-text { background: none; }
  .tour-bar { padding: 8px 12px; }
  .tour-where { display: none; }
}
@media (max-height: 640px) and (min-width: 701px) {
  .tour-live .tour-text p { font-size: 0.9375rem; }
}

/* ---------- Checks ---------- */
.checks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.check {
  padding: 26px 26px 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.check h3 { font-size: 1.125rem; letter-spacing: -0.01em; font-weight: 700; margin: 18px 0 8px; }
.check p { font-size: 0.975rem; color: var(--muted); }
.check-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-grad); color: #ffffff;
}
.check-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.check-icon .dash { stroke-dasharray: 2 2.4; }

/* ---------- How it works: the example ---------- */
.steps { list-style: none; display: grid; gap: clamp(56px, 7vw, 96px); }
.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.step:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.step:nth-child(even) .step-text { order: 2; }
.step.step-wide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.step.step-wide .step-text { order: 0; max-width: 46em; }
.step h3 { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.875rem); letter-spacing: -0.02em; font-weight: 700; margin: 18px 0 12px; }
.step-text p + p { margin-top: 14px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--brand-grad); color: #ffffff;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.9375rem;
  box-shadow: 0 8px 20px -8px rgba(18, 63, 128, 0.6);
}
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 0.875rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.dot-red { background: var(--red); }
.dot-orange { background: var(--orange); }
.dot-yellow { background: var(--yellow); }
.dot-blue { background: var(--blue); }

/* The before/after: an assessment change, stated as one. */
.assessment {
  display: grid; gap: 12px;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}
.assessment-label { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); }
.assessment-note { color: var(--text); }
.assessment-note b { color: var(--ink); }
.verdict-move { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.verdict { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: 999px; font-weight: 650; font-size: 0.9375rem; border: 1px solid; }
.verdict b { font-family: var(--font-mono); font-size: 0.875rem; }
.verdict-bad { color: #a8261f; background: #fdeceb; border-color: #f3c3bf; }
.verdict-caution { color: #7a5200; background: #fff6dc; border-color: #f0d68a; }
.verdict-arrow { color: var(--muted); font-size: 1.25rem; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two-up .plate { display: grid; align-content: center; }

@media (prefers-color-scheme: dark) {
  .verdict-bad { color: #ffb4ad; background: #2b1413; border-color: #5a2a26; }
  .verdict-caution { color: #f6d68a; background: #2a2210; border-color: #58461a; }
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-top: clamp(48px, 6vw, 80px);
}
.feature-text h3 { font-size: 1.625rem; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 14px; }
.feature-text b { color: var(--ink); font-weight: 650; }

/* Compatibility: the one place for it. */
.compat {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.compat-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.compat-list div {
  display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.compat-list dt { font-weight: 650; color: var(--ink); }

/* ---------- About ---------- */
.prose { max-width: 42rem; }
.prose-block + .prose-block { margin-top: clamp(40px, 5vw, 64px); }
.prose h2 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); letter-spacing: -0.025em; font-weight: 700; margin-bottom: 14px; }
.prose p + p { margin-top: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.contact-card h2 { font-size: 1.5rem; letter-spacing: -0.02em; font-weight: 700; }
.contact-card .btn { align-self: flex-start; margin-top: auto; }
.contact-card .cta-note { margin-top: 0; }
.address {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  margin-top: 20px; padding: 22px 26px;
  border-radius: 18px; border: 1px dashed var(--line-2);
}
.address strong { font-family: var(--font-mono); font-size: 1.0625rem; color: var(--ink); overflow-wrap: anywhere; }
.tester-note { margin-top: 28px; max-width: 46em; color: var(--muted); }
.tester-note b { color: var(--ink); }

/* ---------- Closing band ---------- */
.band { padding: clamp(64px, 8vw, 104px) 0; }
.band-short {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.band h2 { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); }
.band p.band-lede { margin-top: 14px; max-width: 32em; font-size: 1.125rem; color: var(--night-text); }
.band .cta-row { margin-top: 0; }

/* ---------- Footer ---------- */
.footer { padding: 32px 0 44px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }
.beta-note { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.beta-note .label { color: var(--accent); }
.footer-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px 40px; }
.footer b { color: var(--ink); font-weight: 650; }
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-nav a { color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.footer-mail { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.footer-mail:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-visual { max-width: 720px; }
}
@media (max-width: 960px) {
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .step, .step:nth-child(even), .feature, .two-up, .band-short, .contact-grid, .compat, .trio {
    grid-template-columns: minmax(0, 1fr);
  }
  .step:nth-child(even) .step-text { order: 0; }
  .feature .plate { order: 2; }
  .trio::before { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .mark { width: 32px; height: 28px; }
  .brand-name { font-size: 1.0625rem; }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn { width: 100%; }
  .hv-stage { padding: 0; display: grid; gap: 18px; }
  .hv-file, .hv-fix { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; }
  .hv-fix { width: min(320px, 92%); margin: -22px 0 0 auto; }
  .hero-visual figcaption { position: static; width: auto; margin-top: 16px; }
  .code { font-size: 0.75rem; }
  .compat-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 400px) {
  .tag { display: none; }
}

/* ---------- Motion: restrained, and none at all when reduced ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The mark assembles bottom-up, one layer at a time, like a print. */
  .mark .layer { transform-box: fill-box; transform-origin: 50% 100%; animation: layer-in 0.5s var(--ease) both; }
  .mark .l1 { animation-delay: 0.05s; }
  .mark .l2 { animation-delay: 0.17s; }
  .mark .l3 { animation-delay: 0.29s; }
  .mark .l4 { animation-delay: 0.41s; }
  .mark .specks { animation: specks-in 0.7s var(--ease) 0.5s both; }

  /* First screen: the message, then print file -> flagged area -> next step. */
  .hero-copy > *, .page-hero .wrap > * { animation: rise 0.75s var(--ease) both; }
  .hero-copy > :nth-child(2), .page-hero .wrap > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3), .page-hero .wrap > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4), .page-hero .wrap > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(5), .page-hero .wrap > :nth-child(5) { animation-delay: 0.22s; }
  .hv-file { animation: from-left 0.8s var(--ease) 0.25s both; }
  .hv-view { animation: rise-far 0.9s var(--ease) 0.5s both; }
  .hv-fix { animation: from-right 0.8s var(--ease) 1.1s both; }

  /* Scroll reveals (site.js adds .is-visible once, on first view). */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .trio .reveal:nth-child(2) { transition-delay: 0.12s; }
  .js .trio .reveal:nth-child(3) { transition-delay: 0.24s; }
  .js .trio::before { transform: scale(0, 1); transition: transform 1.1s var(--ease) 0.2s; }
  .js .trio:has(.is-visible)::before { transform: none; }
  .js .checks .reveal:nth-child(3n+2) { transition-delay: 0.08s; }
  .js .checks .reveal:nth-child(3n) { transition-delay: 0.16s; }
  .js .contact-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
  .js .step.reveal .plate { transform: translateY(20px); transition: transform 0.9s var(--ease) 0.1s; }
  .js .step.reveal.is-visible .plate { transform: none; }
}

@keyframes layer-in { from { opacity: 0; transform: translateY(-26px) scaleY(0.7); } to { opacity: 1; transform: none; } }
@keyframes specks-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rise-far { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes from-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes from-right { from { opacity: 0; transform: translate(28px, 12px); } to { opacity: 1; transform: none; } }

@media print {
  .site-header, .nav-toggle { position: static; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
