/* Altrace public site: home and Teams.
   Brand guide edition 01: ink ground, one brand accent, one signal colour.
   Components use the role tokens below, never raw hex. */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* Ink ramp */
  --ink-900: #06090e; /* page edge, footer */
  --ink-800: #0b1017; /* canvas */
  --ink-700: #141b26; /* surface */
  --ink-600: #1b2431; /* raised */
  --ink-500: #2a3646; /* borders */
  --ink-400: #3d4c60; /* hairlines, disabled */

  /* Roles */
  --text-primary: #f2f5f8;
  --text-secondary: #8e9cac;
  --accent-brand: #00d992; /* kickers, focus ring, button outlines, the mark. Never "pass". */
  --signal-failure: #ff5a65; /* real failure evidence only, always with a word and a shape */
  --data: #5b9bf5; /* charts and data only */

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 4px;
  --gutter: 20px;
  --measure: 68ch;
  --section-gap: 64px;

  --dur-hover: 120ms;
  --ease: cubic-bezier(.2, 0, 0, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink-800);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--ink-400); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent-brand); }

/* The focus ring is never removed. */
:focus-visible { outline: 2px solid var(--accent-brand); outline-offset: 2px; border-radius: var(--radius); }

.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 10; padding: 10px 14px; background: var(--ink-800); border: 1px solid var(--accent-brand); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 400; color: var(--text-primary); }
h1 { font-size: clamp(38px, 6.4vw + 16px, 48px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 300; max-width: 18ch; }
h2 { font-size: clamp(26px, 2.5vw + 16px, 32px); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.36; font-weight: 400; }
p { margin: 0; }
.prose { max-width: var(--measure); color: var(--text-secondary); }
.prose + .prose { margin-top: 16px; }
.small { font-size: 14px; line-height: 1.57; color: var(--text-secondary); }

.kicker, .label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker { color: var(--accent-brand); margin: 0 0 20px; }
.label { color: var(--text-secondary); }

/* Real output is quoted exactly: no ligatures turning "--json" into a dash. */
code, pre, kbd, .kicker, .label, .facts { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0, "tnum" 1; }
code, pre, kbd { font-family: var(--font-mono); font-size: 14px; }
:not(pre) > code { padding: 1px 5px; border: 1px solid var(--ink-500); border-radius: var(--radius); background: var(--ink-700); font-size: 0.875em; }

/* Header */
.site-header { border-bottom: 1px solid var(--ink-500); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px; margin-left: -6px; color: var(--text-primary); text-decoration: none; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.brand img { width: 38px; height: 24px; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-inline: 10px; color: var(--text-secondary); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-primary); }

/* Buttons: outlined, never filled. */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--ink-400); border-radius: var(--radius);
  background: transparent; color: var(--text-primary);
  font: 500 16px/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--ink-700); }
.button-primary { border-color: var(--accent-brand); }
.button .arrow { transition: transform var(--dur-hover) var(--ease); }
.button:hover .arrow { transform: translateX(2px); }

/* Hero */
.hero { padding-block: 48px var(--section-gap); }
.hero-grid { display: grid; gap: 40px; }
.hero .subhead { margin-top: 24px; max-width: 56ch; color: var(--text-secondary); font-size: 18px; line-height: 1.55; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 24px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.facts li:not(:last-child)::after { content: "·"; padding-inline: 8px; color: var(--ink-400); }
.facts-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 14px; color: var(--text-secondary); }

/* Evidence module: the agent's account, what was recorded, what was flagged. */
.evidence { margin: 0; border: 1px solid var(--ink-500); border-radius: var(--radius); background: var(--ink-700); min-width: 0; }
.evidence-part { padding: 20px; border-top: 1px solid var(--ink-500); min-width: 0; }
.evidence-part:first-child { border-top: 0; }
.evidence-part .label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.evidence-quote { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text-primary); }
.evidence-lines { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-lines .dim { color: var(--text-secondary); }
.evidence-flagged .label { color: var(--signal-failure); }
.evidence-flagged .evidence-lines { color: var(--signal-failure); }
.shape-square { display: inline-block; width: 8px; height: 8px; background: currentColor; flex: none; }
.shape-ring { display: inline-block; width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; flex: none; }
.evidence-note { margin-top: 12px; font-size: 14px; line-height: 1.57; color: var(--text-secondary); }
.evidence-raw { border-top: 1px solid var(--ink-500); }
.evidence-raw summary { display: flex; align-items: center; min-height: 44px; padding: 0 20px; cursor: pointer; font-size: 14px; color: var(--text-secondary); }
.evidence-raw summary:hover { color: var(--text-primary); }
.evidence-raw pre { margin: 0; padding: 0 20px 20px; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--text-primary); }
.evidence-caption { margin-top: 12px; font-size: 14px; line-height: 1.57; color: var(--text-secondary); }
.evidence-caption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-secondary); }

/* Sections */
.section { padding-block: var(--section-gap); border-top: 1px solid var(--ink-500); }
.section > .wrap > h2 { margin-bottom: 16px; }
.steps { display: grid; gap: 1px; margin: 32px 0 0; padding: 0; list-style: none; background: var(--ink-500); border: 1px solid var(--ink-500); border-radius: var(--radius); overflow: hidden; }
.steps li { padding: 20px; background: var(--ink-800); }
.steps .label { display: block; margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--text-secondary); max-width: var(--measure); }
.not-list { margin: 24px 0 0; padding: 0; list-style: none; max-width: var(--measure); }
.not-list li { padding-left: 20px; position: relative; color: var(--text-secondary); }
.not-list li + li { margin-top: 8px; }
.not-list li::before { content: "—"; position: absolute; left: 0; color: var(--ink-400); }
.not-list strong { color: var(--text-primary); font-weight: 500; }

.install pre { margin: 24px 0 0; padding: 16px 20px; max-width: 640px; overflow-x: auto; border: 1px solid var(--ink-500); border-radius: var(--radius); background: var(--ink-700); line-height: 1.7; color: var(--text-primary); }
.install .prompt { color: var(--text-secondary); user-select: none; }

/* Roadmap: lighter than shipped work, in slate. */
.roadmap { padding-block: 48px; border-top: 1px dashed var(--ink-400); }
.roadmap h2 { color: var(--text-secondary); font-size: 22px; line-height: 1.36; }
.roadmap .prose { margin-top: 12px; }
.status-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 5px 10px; border: 1px dashed var(--ink-400); border-radius: 999px; color: var(--text-secondary); }
.roadmap a { color: var(--text-secondary); display: inline-flex; align-items: center; min-height: 44px; }

.install-note { margin-top: 16px; }

.closing .actions { margin-top: 24px; }

/* Teams */
.teams-hero { padding-block: 48px var(--section-gap); }
.teams-hero h1 { max-width: 22ch; }
.teams-hero .prose { margin-top: 24px; }
.expect { margin-top: 16px; max-width: 56ch; font-size: 14px; line-height: 1.57; color: var(--text-secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--ink-500); background: var(--ink-900); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; color: var(--text-secondary); font-size: 14px; text-decoration: none; }
.site-footer a:first-child { margin-left: -8px; }
.site-footer a:hover { color: var(--text-primary); }
.site-footer .small { padding-block: 12px; }

/* Narrow phones: the nav moves under the logo rather than overflowing. */
@media (max-width: 419px) {
  .site-header .wrap { flex-wrap: wrap; padding-block: 4px 8px; gap: 8px 0; }
  .site-nav { width: 100%; margin-left: -8px; gap: 8px; }
  .site-nav a { padding-inline: 8px; }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-gap: 80px; }
  .hero { padding-top: 72px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .evidence-part { padding: 24px; }
  .evidence-raw summary { padding-inline: 24px; }
  .evidence-raw pre { padding: 0 24px 24px; }
}

@media (min-width: 1024px) {
  :root { --section-gap: 96px; }
  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
