/* Seen From Outside: landing page. Same palette and type families as the dashboard
   (perimeter/web/static/app.css); fonts are self-hosted, nothing is fetched elsewhere.
   Severity colours are used only by issue marks. */

@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #f3f5f3; --surface: #ffffff; --surface-alt: #eaede9; --ink: #14191b; --ink-muted: #57636a;
  --ink-faint: #67737a; --border: #d7ddd8; --border-strong: #b9c2bc; --accent: #17646d;
  --accent-ink: #ffffff; --focus: #1f8b96; --band: #101619; --band-ink: #e7edf0; --band-accent: #4fb6bf;
  --band-muted: #a0adb4; --selection: #cde4e6; --pressed: #ffffff;
  --sev-high: #b5480f; --sev-medium: #92620a; --sev-low: #3c6b2c;
  --sev-high-bg: #fcede2; --sev-medium-bg: #fbf1de; --sev-low-bg: #eaf1e6;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Public Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --radius: 10px; --shadow: 0 24px 60px -32px rgba(20, 25, 27, 0.45);
  --shadow-lift: 0 18px 40px -26px rgba(20, 25, 27, 0.5);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-pop: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 72rem; --gutter: clamp(1rem, 4vw, 3rem); color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161a; --surface: #182027; --surface-alt: #1c252c; --ink: #e7edf0; --ink-muted: #a0adb4;
    --ink-faint: #808d95; --border: #2b363e; --border-strong: #3c4a53; --accent: #4fb6bf;
    --accent-ink: #08181a; --focus: #4fb6bf; --band: #0b1013; --selection: #1f4a50; --pressed: #34424b;
    --sev-high: #e39257; --sev-medium: #d3ac53; --sev-low: #82b56c;
    --sev-high-bg: #2c2118; --sev-medium-bg: #2b2416; --sev-low-bg: #1c2818;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, 0.85); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--border-strong) var(--bg); accent-color: var(--accent); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); caret-color: var(--accent); }
::selection { background: var(--selection); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 1rem; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); max-width: 14ch; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); max-width: 22ch; }
p { margin: 0 0 1rem; max-width: 60ch; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; padding: 0.5rem 0.9rem; background: var(--surface); border-radius: 6px; z-index: 20; }
.skip:focus { top: 1rem; }
html:not(.js) .js-only { display: none; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.25rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn:active { translate: 0 1px; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-quiet:hover { background: var(--surface); border-color: var(--ink-faint); filter: none; }
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.9rem; white-space: nowrap; }
.btn-light { background: var(--band-accent); border-color: var(--band-accent); color: #08181a; font-family: var(--font-mono); font-weight: 500; }

.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.9rem var(--gutter); background: var(--bg); border-bottom: 1px solid transparent; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

main { overflow-x: clip; }
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) clamp(3.5rem, 8vw, 7rem); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lede { font-size: 1.2rem; color: var(--ink-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-meta { margin: 1.5rem 0 0; font-size: 0.88rem; color: var(--ink-faint); }

.hero-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.6rem 1.4rem; box-shadow: var(--shadow); }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 1.1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.hc-domain { font: 500 0.82rem var(--font-mono); color: var(--ink-muted); }
.hc-tag { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); border: 1px dashed var(--border-strong); border-radius: 5px; padding: 0.05rem 0.45rem; }
.hc-score { display: flex; align-items: center; gap: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.hc-number { display: flex; align-items: baseline; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.hc-value { font-size: clamp(3.25rem, 5vw, 4.25rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; min-width: 2ch; }
.hc-max { color: var(--ink-muted); font-size: 1.1rem; margin-left: 0.15rem; }
.hc-label { font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.hc-coverage { font-weight: 400; color: var(--ink-muted); font-size: 0.85rem; }
.hc-bars { list-style: none; margin: 1.1rem 0; padding: 0; display: grid; gap: 0.6rem; }
.hc-bars li { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; gap: 0.75rem; align-items: center; font-size: 0.9rem; }
.hc-bars b { text-align: right; font-variant-numeric: tabular-nums; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 0.5rem; border: 0; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-alt); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.hc-finding { border-top: 1px solid var(--border); padding-top: 1.1rem; font-size: 0.93rem; }
.hc-head { font-weight: 600; }
.hc-toggle { display: inline-flex; gap: 0.25rem; padding: 0.2rem; border-radius: 999px; background: var(--surface-alt); margin-bottom: 0.75rem; }
.hc-toggle button, .chips button { font: 600 0.82rem var(--font-body); color: var(--ink-muted); background: transparent; border: 0; border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; }
.hc-toggle button:hover, .chips button:hover { color: var(--ink); }
.hc-toggle button[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--pressed); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
html:not(.js) .hc-toggle, html:not(.js) .chips { display: none; }
.hc-platform { font: 600 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin-bottom: 0.3rem; }
pre { margin: 0; padding: 0.75rem 0.9rem; border-radius: 8px; background: var(--surface-alt); font: 0.8rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
figcaption { margin-top: 1rem; font-size: 0.8rem; color: var(--ink-faint); }

.st { display: inline-flex; gap: 0.3rem; align-items: center; padding: 0.15rem 0.5rem; border: 1px solid transparent; border-radius: 5px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.st-passed { color: var(--accent); }
.st-info { color: var(--ink-muted); border-color: var(--border-strong); }
.st-not-checked { color: var(--ink-muted); border-style: dashed; border-color: var(--border-strong); }
.st-na { color: var(--ink-faint); }
.st-issue.sev-high { color: var(--sev-high); background: var(--sev-high-bg); }
.st-issue.sev-medium { color: var(--sev-medium); background: var(--sev-medium-bg); }
.st-issue.sev-low { color: var(--sev-low); background: var(--sev-low-bg); }

.section { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.section-alt { max-width: none; background: var(--surface); border-block: 1px solid var(--border); }
.section-alt > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-inline: auto; }
.section-lede { color: var(--ink-muted); font-size: 1.1rem; }

.tiles { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.tile { --tile-bg: var(--surface); position: relative; background: var(--tile-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tile-button { display: grid; grid-template-rows: auto auto 1fr; align-content: start; gap: 0.35rem; width: 100%; padding: 1.1rem 1.1rem 1rem; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.tile-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.tile-text { color: var(--ink-muted); font-size: 0.95rem; }
.tile-hint { display: none; }
.tile-example { margin: 0; padding: 0.6rem 1.1rem 1.1rem; font-size: 0.88rem; display: grid; gap: 0.4rem; justify-items: start; }
.tile-example-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.tile-honest { --tile-bg: var(--bg); border-style: dashed; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.fix-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.fix-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.2rem; border-radius: 999px; background: var(--surface-alt); width: fit-content; margin-bottom: 0.9rem; }
.fix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.fix-list li { display: grid; gap: 0.1rem; padding: 0.7rem 0.85rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 0.93rem; }
.fix-who { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); }
.fix-empty { color: var(--ink-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }

.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; color: var(--ink-muted); }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--font-display); }
.steps b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.3rem; }

.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem clamp(2rem, 5vw, 4rem); margin-top: 2rem; }
.two-lists ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; align-content: start; }
.two-lists li { display: grid; grid-template-columns: 1.75rem 1fr; align-items: start; }
.list-yes li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.list-no li::before { content: "–"; color: var(--ink-muted); font-weight: 700; }

.cta { background: var(--band); color: var(--band-ink); padding: clamp(4.5rem, 10vw, 8rem) var(--gutter); text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.cta-inner { max-width: 40rem; margin: 0 auto; }
.cta h2 { color: #ffffff; margin-inline: auto; }
.cta p { margin-inline: auto; color: var(--band-muted); }
.cta .btn { margin-top: 0.75rem; }
.cta :focus-visible { outline-color: var(--band-accent); }
.footer { padding: 1.75rem var(--gutter); font-size: 0.85rem; color: var(--ink-muted); text-align: center; }

@media (max-width: 860px) {
  .hero, .split, .two-lists { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .nav { gap: 0.75rem; }
  .wordmark { font-size: 1.02rem; }
  .nav .btn-small { padding-inline: 0.75rem; font-size: 0.84rem; }
  .hero-card { padding-inline: 1.1rem; }
  .hc-bars li { grid-template-columns: 1fr 2.5rem; }
  .hc-bars li progress { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 359px) {
  .wordmark, .btn-small { white-space: normal; }
}
@media (pointer: coarse) {
  .hc-toggle button, .chips button { padding: 0.6rem 0.9rem; }
}

/* ---------- motion (only when the script ran; nothing moves under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.nav.is-scrolled { background: var(--surface); border-bottom-color: var(--border); box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.35); }

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .tile[data-reveal] { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), translate 0.25s ease; transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s; }

.js .hero-card { opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.8s ease, transform 0.8s var(--ease-out); }
.js .hero-card.is-assembling, .js .hero-card.is-assembled { opacity: 1; transform: none; }
.js .hc-finding { opacity: 0; transform: translateX(16px); transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s; }
.js .hero-card.is-assembled .hc-finding { opacity: 1; transform: none; }
.js .hero-card.is-assembled .hc-head .st { animation: pop 0.45s var(--ease-pop) 0.35s both; }
@keyframes pop { from { transform: scale(0.6); } to { transform: none; } }

/* Tiles: hover lifts; a click flips the tile to its example, which sits above the tile's face.
   The hint (inside the button) stays above the example so the tile can be flipped back. */
.tile { transition: translate 0.25s ease; }
.tile:hover { translate: 0 -3px; box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.tile:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
@supports selector(:has(*)) {
  .tile:focus-within { outline: none; }
  .tile:has(.tile-button:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .tile-button:focus-visible { outline: none; }
}
.js .tile { display: grid; }
.js .tile-button, .js .tile-example { grid-area: 1 / 1; }
.js .tile-name, .js .tile-text { transition: opacity 0.3s ease, transform 0.35s var(--ease-out); }
.js .tile.is-flipped .tile-name, .js .tile.is-flipped .tile-text { opacity: 0; transform: translateY(-6px); }
.js .tile-hint { display: inline-flex; align-items: center; gap: 0.4rem; align-self: end; justify-self: start; position: relative; z-index: 2; margin-top: 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.tile-hint svg { width: 0.85rem; height: 0.85rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform 0.3s var(--ease-out); }
.js .tile.is-flipped .tile-hint svg { transform: rotate(45deg); }
.hint-close, .js .tile.is-flipped .hint-open { display: none; }
.js .tile.is-flipped .hint-close { display: inline; }
.js .tile-example { position: relative; z-index: 1; background: var(--tile-bg); align-content: start; padding: 1.1rem 1.1rem 2.9rem; opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none; transition: opacity 0.3s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.35s; }
.js .tile.is-flipped .tile-example { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.js .tile.is-flipped { border-color: var(--accent); }

.steps::before { content: ""; position: absolute; top: 1.2rem; left: 1.2rem; width: calc((100% - 3rem) * 2 / 3 + 3rem); height: 2px; background: var(--accent); transform-origin: left; }
.js .steps::before { transform: scaleX(0); transition: transform 1.1s var(--ease-out) 0.2s; }
.js .steps.is-in::before { transform: none; }
.js .steps li::before { transform: scale(0.4); opacity: 0; transition: transform 0.45s var(--ease-pop), opacity 0.3s ease; }
.js .steps.is-in li::before { transform: none; opacity: 1; }
.js .steps.is-in li:nth-child(2)::before { transition-delay: 0.45s; }
.js .steps.is-in li:nth-child(3)::before { transition-delay: 0.9s; }
@media (max-width: 860px) { .steps::before { display: none; } }

.js .two-lists li::before { opacity: 0; transform: scale(0.3); transition: opacity 0.3s ease, transform 0.4s var(--ease-pop); }
.js .two-lists ul.is-in li::before { opacity: 1; transform: none; }
.js .two-lists ul.is-in li:nth-child(2)::before { transition-delay: 0.15s; }
.js .two-lists ul.is-in li:nth-child(3)::before { transition-delay: 0.3s; }

/* Translucency needs color-mix; without it the nav stays opaque and the band has no sheen. */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .nav { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .nav.is-scrolled { background: color-mix(in srgb, var(--surface) 90%, transparent); }
  .cta::before { content: ""; position: absolute; inset: 0 -100% 0 -100%; z-index: -1; background: linear-gradient(120deg, transparent 20%, color-mix(in srgb, var(--band-accent) 22%, transparent) 50%, transparent 80%); opacity: 0.6; animation: sheen 9s ease-in-out infinite alternate; }
  ::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
}
@keyframes sheen { from { transform: translateX(-25%); } to { transform: translateX(25%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal], .js .hero-card, .js .hc-finding { opacity: 1; transform: none; }
}

/* Print: everything the script would reveal or collapse is shown, with no motion or band. */
@media print {
  .js [data-reveal], .js .hero-card, .js .hc-finding, .js .tile-example, .js .tile-name, .js .tile-text,
  .js .steps::before, .js .steps li::before, .js .two-lists li::before {
    opacity: 1 !important; transform: none !important; visibility: visible !important;
  }
  .js .tile { display: block; }
  .js .tile-example { padding: 0.6rem 1.1rem 1.1rem; background: none; }
  .js .hc-panel[hidden] { display: block !important; }
  .js .fix-list li[hidden] { display: grid !important; }
  .nav { position: static; box-shadow: none; }
  .skip, .hc-toggle, .chips, .tile-hint, .fix-empty, .cta::before { display: none !important; }
  .hero-card, .fix-card, .tile { box-shadow: none; break-inside: avoid; }
  .cta { background: none; color: #000000; }
  .cta h2 { color: #000000; }
  .cta p { color: #333333; }
  .btn { background: none; color: #000000; border-color: #000000; }
}
