/* ReguVision
   Concept: an inspection register seen through a camera. Cool paper and slate ink,
   one safety-yellow signal used only for "zones" (outlines, corner brackets, the logo),
   red and green reserved for breach / compliant states. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-var-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-display: swap; }

:root {
  --paper: #f3f5f1;
  --paper-2: #e8ece5;
  --card: #ffffff;
  --ink: #0f1b24;
  --ink-2: #33424c;
  --muted: #5a6870;
  --rule: #c9d0c7;
  --signal: #f2b200;
  --signal-ink: #6b4e00;
  --breach: #b8322a;
  --ok: #2a7a4b;
  --frame: #142029;
  --frame-2: #1d2b35;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e161c; --paper-2: #142029; --card: #17242e;
    --ink: #e6ebe4; --ink-2: #c3ccc6; --muted: #93a19d; --rule: #2a3843;
    --signal: #f5bd1f; --signal-ink: #f5bd1f; --breach: #e2675e; --ok: #5bbd85;
    --frame: #0a1116; --frame-2: #111c24;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 760; font-stretch: 112%; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 720; font-stretch: 108%; }
h3 { font-size: 1.25rem; font-weight: 680; font-stretch: 100%; line-height: 1.2; }
p { margin: 0; max-width: 65ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 28px; height: 25px; }
.brand-name { font-family: var(--display); font-weight: 760; font-stretch: 118%; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand-name span { font-weight: 400; }
.nav { display: flex; gap: clamp(12px, 2vw, 28px); align-items: center; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); }
.nav a.btn, .nav a.btn:hover { color: var(--paper); text-decoration: none; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 650;
  font-stretch: 108%; font-size: 1rem; padding: 13px 20px; text-decoration: none; border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper); border-radius: 2px; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy h1 em { font-style: normal; box-shadow: inset 0 -0.18em 0 var(--signal); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-note { font-size: 0.92rem; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* camera frame with bracket corners */
.cam { position: relative; background: var(--frame); border-radius: 4px; padding: 10px; color: #dfe6e2; min-width: 0; }
.cam svg.scene { width: 100%; height: auto; border-radius: 2px; }
.cam .corner { position: absolute; width: 22px; height: 22px; border: 3px solid var(--signal); }
.cam .tl { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.cam .tr { top: -7px; right: -7px; border-left: 0; border-bottom: 0; }
.cam .bl { bottom: -7px; left: -7px; border-right: 0; border-top: 0; }
.cam .br { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
.scene text { font-family: var(--mono); }

/* alert card */
.alert {
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-left: 5px solid var(--breach);
  border-radius: 3px; padding: 16px 18px; display: grid; gap: 10px; box-shadow: 0 18px 40px -24px rgba(10, 20, 28, .45);
}
.alert-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ref { font-family: var(--mono); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; }
.chip { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; border: 1px solid currentColor; }
.chip.breach { color: var(--breach); }
.chip.ok { color: var(--ok); }
.alert h3 { font-size: 1.08rem; }
.alert blockquote { margin: 0; font-size: 0.97rem; color: var(--ink-2); border: 0; padding: 0; }
.alert dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 0.86rem; }
.alert dt { color: var(--muted); font-family: var(--mono); font-size: 0.76rem; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
.alert dd { margin: 0; min-width: 0; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-actions span { font-size: 0.82rem; font-family: var(--display); font-weight: 600; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.hero .alert { margin: -48px 18px 0 auto; position: relative; max-width: 420px; }
@media (max-width: 520px) { .hero .alert { margin: 12px 0 0; } }
.illus-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

/* ---------- sections ---------- */
section { padding-block: clamp(56px, 8vw, 104px); }
section.band { background: var(--paper-2); border-block: 1px solid var(--rule); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps > li { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(16px, 3vw, 40px); padding-block: 26px; border-top: 1px solid var(--rule); align-items: start; }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps h3 { font-size: 1.35rem; }
.steps p { color: var(--ink-2); }
.steps .detail { font-size: 0.95rem; color: var(--muted); display: grid; gap: 8px; min-width: 0; }
.steps .detail ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 860px) { .steps > li { grid-template-columns: 1fr; gap: 10px; } }

/* breach costs */
.costs h3 { margin-bottom: 14px; }
.costs ul { list-style: none; margin: 0; padding: 0; display: grid; }
.costs li { padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.97rem; }
.costs li strong { color: var(--ink); }

/* worked example */
.example { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.ex-step { display: grid; gap: 16px; min-width: 0; align-content: start; }
.ex-step > h3 { font-size: 1.15rem; }
.ex-step .alert { margin: 0; }
.ex-close { margin-top: clamp(32px, 5vw, 56px); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 2px solid var(--ink); }
.timeline li { display: grid; gap: 6px; padding: 14px 16px 14px 0; align-content: start; min-width: 0; }
.timeline li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.timeline time { font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.timeline span { font-size: 0.95rem; color: var(--ink-2); }
.ex-result { font-size: 1.05rem; }
.ex-result strong { color: var(--ok); }
@media (max-width: 900px) {
  .example { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline li, .timeline li + li { padding: 12px 0; border-left: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 56px 1fr; gap: 12px; }
}

/* coverage table */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.97rem; }
th, td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-weight: 600; font-size: 0.76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td:first-child { font-weight: 600; }
.lvl { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--mono); font-size: 0.8rem; }
.lvl::before { content: ""; width: 10px; height: 10px; border: 2px solid currentColor; }
.lvl.good { color: var(--ok); } .lvl.good::before { background: currentColor; }
.lvl.depends { color: var(--signal-ink); } .lvl.depends::before { background: linear-gradient(135deg, currentColor 50%, transparent 50%); }
.lvl.no { color: var(--muted); }

/* integrations */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.int-grid > div { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px; display: grid; gap: 4px; min-width: 0; }
.int-grid strong { font-family: var(--display); font-stretch: 110%; font-size: 1.08rem; }
.int-grid span { font-size: 0.85rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.fine { font-size: 0.82rem; color: var(--muted); margin-top: 16px; }

/* principles list */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.principles li { padding: 18px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px; min-width: 0; }
.principles strong { font-family: var(--display); font-stretch: 106%; font-size: 1.05rem; }
.principles span { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* pilot */
.pilot { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.pilot-box { border: 2px solid var(--ink); padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; background: var(--card); position: relative; }
.pilot-box::before { content: ""; position: absolute; top: -2px; right: -2px; width: 0; height: 0; border-left: 28px solid transparent; border-top: 28px solid var(--signal); }
.pilot-box ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
@media (max-width: 860px) { .pilot { grid-template-columns: 1fr; } }

/* faq */
.faq { display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 650; font-stretch: 104%; font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* cta */
.cta { background: var(--frame); color: #e6ebe4; }
.cta .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; }
.cta h2 { color: #fff; }
.cta p { color: #c3ccc6; }
.cta .btn { background: var(--signal); border-color: var(--signal); color: #111; }
.cta .mail { font-family: var(--mono); font-size: 1rem; color: #fff; user-select: all; }
@media (max-width: 820px) { .cta .wrap { grid-template-columns: 1fr; } }

/* footer */
.site-foot { padding-block: 36px 48px; font-size: 0.9rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

/* prose pages */
.prose { max-width: 760px; display: grid; gap: 16px; }
.prose h2 { font-size: 1.6rem; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
