/* ── SCS marketing site · "Assurance Instrument" refresh ───────────────────
   Tokens live in tokens.css (copied from the design system, unmodified).
   This file only composes them into marketing-page layout and components. */

/* ── site-level type + ground ─────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-size: 15px;
  overflow-x: clip;
  background: var(--ink-0);
  /* faint contour underlay so the ground is never a flat fill */
  background-image:
    radial-gradient(70% 40% at 100% 0%, color-mix(in oklch, var(--blue) 10%, transparent), transparent 70%),
    radial-gradient(50% 35% at 0% 100%, color-mix(in oklch, var(--green) 8%, transparent), transparent 70%);
  background-attachment: fixed;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Muted text: --fg-3 only clears AA on panels (white / brand navy); on the page ground use --fg-2. */
.eyebrow { color: var(--fg-2); }
.panel .eyebrow { color: var(--fg-3); }
.eyebrow.accent { color: var(--green-lift); }
[data-theme="light"] .eyebrow.accent { color: var(--fg-2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .eyebrow.accent { color: var(--fg-2); } }

/* ── instrument bar (site nav) ────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklch, var(--ink-0) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--fg); white-space: nowrap; }
.wordmark i { width: 10px; height: 22px; border-radius: 3px; background: var(--attest); flex: none; }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bar nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
.bar nav a:not(.btn) { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-2); color: var(--fg-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.bar nav a:not(.btn):hover { color: var(--fg); background: var(--ink-2); }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--ink-1); color: var(--fg-2); }
.iconbtn:hover { color: var(--fg); background: var(--ink-2); }
.iconbtn svg { width: 16px; height: 16px; }
.themebtn .sun, .themebtn .moon { display: none; }
:root[data-theme="light"] .themebtn .moon { display: block; }
:root:not([data-theme="light"]) .themebtn .sun { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .themebtn .sun { display: none; }
  :root:not([data-theme="dark"]) .themebtn .moon { display: block; }
}

/* ── hero on the signal field ─────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { /* Tier 3 fallback: pure CSS field, visible whenever the canvas is hidden or not yet drawn */
  content: ''; position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 50% at 20% 30%, color-mix(in oklch, var(--blue) 35%, transparent), transparent 70%),
    radial-gradient(50% 60% at 80% 75%, color-mix(in oklch, var(--green) 30%, transparent), transparent 70%),
    repeating-linear-gradient(115deg, color-mix(in oklch, var(--blue-lift) 12%, transparent) 0 1px, transparent 1px 42px),
    var(--ink-0);
}
.hero::after { /* keep the copy column legible over the field */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--ink-0) 30%, transparent), transparent 30%, transparent 70%, var(--ink-0)),
    linear-gradient(90deg, color-mix(in oklch, var(--ink-0) 55%, transparent), transparent 60%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 48px; align-items: center; padding-block: 72px 64px; min-height: min(calc(100dvh - 64px), 820px); }
.pitch h1 { font-size: clamp(40px, 5.4vw, 74px); font-weight: 500; line-height: .98; letter-spacing: -0.035em; font-variation-settings: 'opsz' 96; max-width: 14ch; }
.pitch h1 .attest-text { font-weight: 600; }
.pitch .lead { margin-top: 22px; max-width: 54ch; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.55; color: var(--fg-2); }
.pitch .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.pitch .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pitch .eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 1px; background: var(--attest); }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn.primary.lg { font-weight: 600; }

/* evidence package panel — the summary before the detail */
.evidence { display: grid; }
.evidence ol { list-style: none; margin: 0; padding: 6px 0; }
.evidence li { display: grid; grid-template-columns: 4px 1fr auto; gap: 0 16px; align-items: start; padding: 14px 18px 14px 16px; border-bottom: 1px solid color-mix(in oklch, var(--line) 55%, transparent); }
.evidence li:last-child { border-bottom: 0; }
.evidence li .stripe { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.evidence li:nth-child(1) { --c: var(--blue-lift); }
.evidence li:nth-child(2) { --c: color-mix(in oklch, var(--blue-lift) 50%, var(--green-lift)); }
.evidence li:nth-child(3) { --c: var(--green-lift); }
.evidence li h2 { font-family: var(--font-ui); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.evidence li p { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--fg-3); }
.evidence .stage { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; height: 24px; min-width: 106px; padding: 0 9px 0 6px; border-radius: 999px; border: 1px solid color-mix(in oklch, var(--c) 45%, transparent); font: 500 11px/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.evidence .stage b { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--c); color: var(--fg-on-accent); font-weight: 600; font-size: 9px; letter-spacing: 0; }
.evidence footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font: 12px var(--font-data); color: var(--fg-3); }
.evidence footer .rail { flex: 1; align-self: center; height: 3px; border-radius: 2px; background: var(--attest); max-width: 160px; opacity: .9; }

/* ── sections ─────────────────────────────────────────────────────────── */
.section { padding-block: 72px; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, 1fr); gap: 24px 48px; align-items: end; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.06; letter-spacing: -0.025em; font-variation-settings: 'opsz' 72; margin-top: 12px; }
.section-head p { color: var(--fg-2); font-size: 16px; line-height: 1.55; max-width: 56ch; }

/* summary strip: every section opens with a compact map of what follows */
.summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.summary .chip { height: 28px; padding: 0 12px 0 10px; font-size: 12.5px; }
.summary .chip b { font: 500 11px var(--font-data); color: var(--fg-3); letter-spacing: .06em; }

/* ── capabilities carousel ────────────────────────────────────────────── */
.cap-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--ink-1); }
.cap-tabs button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-2); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.cap-tabs button b { font: 500 11px var(--font-data); color: var(--fg-3); letter-spacing: .06em; }
.cap-tabs button:hover { background: var(--ink-2); color: var(--fg); }
.cap-tabs button[aria-selected="true"] { background: var(--ink-2); color: var(--fg); box-shadow: var(--shadow-1); }
.cap-tabs button[aria-selected="true"] b { color: var(--fg-on-accent); background: var(--attest); padding: 2px 5px; border-radius: 4px; }
.cap-frame { position: relative; margin-top: 16px; }
.cap-display { position: relative; overflow: hidden; }
.cap-slide { display: none; }
.cap-slide.active { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); animation: capFade .4s var(--ease-out); }
/* opacity-only: a transform here keeps the slide in a composited layer on WebKit, which
   rasterises the SVG infographics at 1x and leaves them soft on Retina displays. */
@keyframes capFade { from { opacity: 0; } }
.cap-media { position: relative; background: var(--ink-0); border-right: 1px solid var(--line); display: grid; place-items: center; padding: 18px; min-height: 280px; }
.cap-media::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(115deg, color-mix(in oklch, var(--blue-lift) 10%, transparent) 0 1px, transparent 1px 38px); }
.cap-media img { position: relative; width: 100%; height: auto; max-height: 460px; object-fit: contain; border-radius: var(--r-1); box-shadow: var(--shadow-1); }
.cap-media img.doc { background: var(--ink-1); }
.cap-body { display: grid; align-content: space-between; gap: 18px; padding: 24px; }
.cap-body .eyebrow { display: flex; align-items: center; gap: 10px; }
.cap-body .eyebrow b { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--attest); color: var(--fg-on-accent); font-weight: 600; letter-spacing: 0; }
.cap-body h3 { margin-top: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: 'opsz' 48; }
.cap-body p { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--fg-2); }
.cap-body .dots { display: flex; gap: 6px; }
.cap-body .dots i { width: 22px; height: 4px; border-radius: 2px; background: color-mix(in oklch, var(--line) 80%, transparent); }
.cap-body .dots i.on { background: var(--attest); }
.cap-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font: 12.5px var(--font-data); color: var(--fg-2); }
.cap-controls .grp { display: flex; gap: 8px; }
.cap-arrow { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--ink-1); color: var(--fg); }
.cap-arrow:hover { background: var(--ink-2); border-color: var(--line-strong); }
.cap-arrow svg { width: 18px; height: 18px; }
.cap-pause[aria-pressed="true"] .ico-pause, .cap-pause:not([aria-pressed="true"]) .ico-play { display: none; }
.cap-counter b { color: var(--fg); font-weight: 500; }

/* ── workflow ─────────────────────────────────────────────────────────── */
.workflow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.workflow::before { /* the attestation rail the four steps sit on */
  content: ''; position: absolute; left: 4%; right: 4%; top: 30px; height: 2px; border-radius: 1px; background: var(--attest); opacity: .6; z-index: 0; }
.step { position: relative; z-index: 1; display: grid; gap: 10px; align-content: start; padding: 18px; }
.step .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; margin-top: -1px; background: var(--c); color: var(--fg-on-accent); font: 600 11px var(--font-data); box-shadow: 0 0 0 4px var(--ink-1); }
.step:nth-child(1) { --c: var(--blue-lift); }
.step:nth-child(2) { --c: color-mix(in oklch, var(--blue-lift) 66%, var(--green-lift)); }
.step:nth-child(3) { --c: color-mix(in oklch, var(--blue-lift) 33%, var(--green-lift)); }
.step:nth-child(4) { --c: var(--green-lift); }
.step .eyebrow { margin-top: 6px; }
.step h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; font-variation-settings: 'opsz' 32; }
.step p { font-size: 14px; line-height: 1.5; color: var(--fg-3); }
.step .out { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.step .out::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* ── contact ──────────────────────────────────────────────────────────── */
.contact { border-bottom: 0; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 40px 64px; align-items: start; }
.contact .pitch2 h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; font-variation-settings: 'opsz' 48; margin-top: 12px; max-width: 24ch; }
.contact .pitch2 .lead { margin-top: 18px; color: var(--fg-2); font-size: 15.5px; line-height: 1.55; max-width: 50ch; }
.contact .pitch2 .facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 520px; }
.contact .pitch2 .facts li { display: grid; grid-template-columns: 8ch 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font: 12.5px/1.45 var(--font-data); color: var(--fg-2); }
.contact .pitch2 .facts .k { font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; color: var(--fg-2); }
.contact .pitch2 .facts .k.scan { color: var(--blue-lift); } .contact .pitch2 .facts .k.sbom { color: var(--green-lift); }
[data-theme="light"] .contact .pitch2 .facts .k.sbom { color: var(--fg-2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .contact .pitch2 .facts .k.sbom { color: var(--fg-2); } }

.contact-card > header h2 { font-size: 16px; }
.contact-form { display: grid; gap: 14px; padding: 18px; }
.field { display: grid; gap: 6px; }
.field label { font: 500 11px/1 var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.field label .req { color: var(--green-lift); }
.field input, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-2); border: 1px solid var(--line);
  background: var(--ink-0); color: var(--fg); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 25%, transparent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--bad); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: grid; gap: 12px; }
.form-foot .btn { justify-content: center; }
.form-status { display: flex; align-items: flex-start; gap: 8px; min-height: 1.4em; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.form-status:not(:empty)::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--fg-3); }
.form-status.success::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ok) 22%, transparent); }
.form-status.error { color: var(--bad); }
.form-status.error::before { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in oklch, var(--bad) 22%, transparent); }
.cf-turnstile { min-height: 65px; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding-block: 20px; font-size: 12.5px; color: var(--fg-2); }

/* ── scroll-driven entrance · visible at rest, decorated by scroll ───── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* .cap-frame is deliberately excluded: the scroll-driven transform pins its SVG slides to a
       1x composited layer on WebKit, which blurs them on Retina displays. */
    .step, .contact-card { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
  }
}
@keyframes reveal { from { opacity: .3; translate: 0 14px; } }

/* ── light theme: on-accent text needs a touch more depth for AA contrast ──
   White on the raw #018A42 end measures 4.45:1; a 10% ink overlay lifts it past 5:1.
   Applies to primary buttons and every small on-accent glyph (tab index, step nodes, stage numbers). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn.primary,
  :root:not([data-theme="dark"]) .cap-body .eyebrow b,
  :root:not([data-theme="dark"]) .cap-tabs button[aria-selected="true"] b { background: linear-gradient(oklch(0% 0 0 / .1), oklch(0% 0 0 / .1)), var(--attest); }
  :root:not([data-theme="dark"]) .step .n,
  :root:not([data-theme="dark"]) .evidence .stage b { background: linear-gradient(oklch(0% 0 0 / .1), oklch(0% 0 0 / .1)), var(--c); }
}
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .cap-body .eyebrow b,
:root[data-theme="light"] .cap-tabs button[aria-selected="true"] b { background: linear-gradient(oklch(0% 0 0 / .1), oklch(0% 0 0 / .1)), var(--attest); }
:root[data-theme="light"] .step .n,
:root[data-theme="light"] .evidence .stage b { background: linear-gradient(oklch(0% 0 0 / .1), oklch(0% 0 0 / .1)), var(--c); }

/* ── fallback: browsers without relative color syntax (Chrome <119, Safari <16.4, Firefox <128) ──
   There --blue-lift / --green-lift fail to resolve and take --attest down with them. Pin the
   lifts to the base accent colors, switch on-accent text to white for contrast, and mute the
   accent eyebrows so nothing depends on the unavailable lifted hues. */
@supports not (color: oklch(from red l c h)) {
  :root { --blue-lift: var(--blue); --green-lift: var(--green); --fg-on-accent: #FFFFFF; --focus: var(--blue); }
  .btn.primary { background: linear-gradient(oklch(0% 0 0 / .1), oklch(0% 0 0 / .1)), var(--attest); }
  .eyebrow.accent, .field label .req { color: var(--fg-2); }
}

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-block: 56px 48px; }
  .section-head { grid-template-columns: 1fr; }
  .cap-slide.active { grid-template-columns: 1fr; }
  .cap-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow::before { display: none; }
  .contact .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 32px, 1180px); }
  .bar .wrap { min-height: 60px; }
  .bar nav a:not(.btn):not(.iconbtn) { display: none; }
  .wordmark { font-size: 14px; }
  .hero .wrap { padding-block: 44px 40px; }
  .pitch h1 { font-size: clamp(34px, 10vw, 48px); max-width: none; }
  .pitch .actions .btn { flex: 1 1 100%; justify-content: center; }
  .section { padding-block: 52px; }
  .evidence li { grid-template-columns: 4px 1fr; }
  .evidence li .stage { grid-column: 2; justify-self: start; margin-top: 10px; }
  .cap-tabs button { flex: 1 1 calc(50% - 6px); }
  .cap-media { padding: 12px; min-height: 0; }
  .cap-body { padding: 18px; }
  .workflow { grid-template-columns: 1fr; }
  .contact .pitch2 .facts li { grid-template-columns: 1fr; gap: 4px; }
  .contact-form { padding: 14px; }
}
@media (max-width: 420px) {
  .cap-counter .auto { display: none; }
}
@media (max-width: 520px) {
  .bar .wrap { flex-wrap: wrap; row-gap: 6px; padding-block: 10px; }
  .bar nav { width: 100%; margin-left: 0; justify-content: flex-end; }
}
