/* ================================================================
   STYLE.md v2 layer for the public site (home, getting started, about,
   quiz, glossary, free tools, tabletop pages). Daniel, 2026-11-25:
   "the home page ... should have the new design applied to it as well".

   Linked AFTER each page's own styles, so it only has to remap the old
   variable names onto the STYLE tokens and quiet the components (flat
   background, Geist type, no lifts/glows/left stripes). Same tokens as
   app/css/main.css and admin-portal/css/admin.css. Amber marks the next
   action, never decoration (docs/STYLE.md).
   ================================================================ */
:root {
  --bg: #0A0B0E;
  --surface: #111318;
  --surface-2: #171A20;
  --surface-3: #20242C;
  --border: #1F232B;
  --border-strong: #262B34;
  --border-control: #2A2F38;
  --text: #EDEEF0;
  --text-2: #B4B9C3;
  --text-muted: #9BA1AD;
  --text-faint: #8B919C;
  --accent: #EF9F27;
  --accent-hover: #F4B04E;
  --on-accent: #1C1C1A;
  --accent-tint-bg: #15110A;
  --accent-tint-border: #3A2E1A;
  --success: #5BC98C;
  --warning: #E8743B;
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 16px;

  /* legacy names -> tokens (index.html, marketing-shared.css, getting-started.html) */
  --bg-raise: var(--surface);
  --panel: var(--surface);
  --panel-border: var(--border);
  --dim: var(--text-muted);
  --text-dim: var(--text-faint);
  --accent-strong: var(--accent-hover);
  --accent-muted: var(--accent-tint-bg);
  --accent-glow: transparent;
  --font-ui: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sans: var(--font-ui);
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Flat background: no glow gradient, no noise layer. */
body { background: var(--bg); color: var(--text); font-family: var(--font-ui); line-height: 1.6; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Type: Geist 600, tight tracking (STYLE.md 2). Marketing hero runs larger than the app's 30px h1. */
h1 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
h2 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
h3 { font-weight: 600; letter-spacing: -0.01em; }
.hero h1 { font-size: 52px; max-width: 820px; }
.hero-sub { color: var(--text-muted); }
.lede { color: var(--text-muted); }
.hero-kicker, .section-kicker {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; color: var(--text-faint);
}
.logo { font-weight: 600; letter-spacing: -0.01em; }

/* Nav */
.nav-cta, .nav-cta-secondary { border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.nav-cta { background: var(--accent); color: var(--on-accent); }
.nav-cta:hover { background: var(--accent-hover); }
.nav-cta-secondary { border-color: var(--border-control); }
.nav-cta-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
.nav-link-plain, .nav-link-accent { font-size: 14px; font-weight: 500; }
/* GK-288: same menu on every page; the current page is highlighted, not removed. */
.nav-link-accent { color: var(--accent); text-decoration: none; }
.nav-link-accent:hover { color: var(--accent-hover); }
nav.top .nav-actions a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* Buttons: no lift, no glow (STYLE.md 9: 120-150ms colour changes only). */
.btn {
  border-radius: var(--r-md); font-weight: 600; font-size: 15px;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover, .btn-primary:active { background: var(--accent-hover); transform: none; box-shadow: none; }
.btn-secondary { border-color: var(--border-control); color: var(--text); }
.btn-secondary:hover, .btn-secondary:active { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); transform: none; }

/* Scroll reveals: fade only, no slide. */
.reveal-on-scroll, .reveal-load { transform: none; }

/* Sections and cards: --surface, 1px border, no shadows, no stripes. */
section { border-top-color: var(--border); }
.problem-card, .role-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color 0.15s ease-out;
}
.problem-card:hover, .role-card:hover { transform: none; background: var(--surface); border-color: var(--border-strong); }
.role-card { border-left: 1px solid var(--border); padding: 20px; }
.role-card .role-title { font-weight: 600; font-size: 15px; }
.role-card .role-desc { font-size: 13px; color: var(--text-muted); }
.problem-card .num, .loop-step .step-num { font-family: var(--font-mono); font-weight: 500; }
.problem-card .num { color: var(--accent); }
.problem-card p { color: var(--text-2); }
.roles-grid { gap: 16px; }

/* Remediation loop */
.loop-steps::before { background: var(--border-strong); }
.loop-step .step-num { background: var(--bg); border-color: var(--border-control); color: var(--text-2); }
.loop-step:first-child .step-num { border-color: var(--accent); color: var(--accent); }
.loop-step .step-title { font-weight: 600; }
.loop-step .step-desc { color: var(--text-muted); }

/* Sample report mock: the white page stays (it's a document), new amber. */
.aar-mock-frame { box-shadow: 0 0 0 1px var(--border-strong); border-radius: var(--r-xl); }
.aar-mock-badge { background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-weight: 500; }
.aar-mock .mock-brand { color: #B86E0B; }
.aar-mock .mock-metric-fill { background: var(--accent); }
.aar-mock .mock-section-title { font-weight: 500; }

/* Footer */
footer { border-top-color: var(--border); }
footer .foot-brand { font-weight: 600; }
footer .foot-disclaimer { color: var(--text-faint); }

/* Pilot modal */
.pilot-modal-overlay { background: rgba(5, 6, 8, 0.78); backdrop-filter: none; }
.pilot-modal { background: var(--surface); border-color: var(--border-strong); border-radius: var(--r-xl); box-shadow: none; }
.pilot-modal-close { border-radius: var(--r-sm); border-color: var(--border-control); }
.pilot-field label { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.06em; color: var(--text-faint); }
.pilot-field input, .pilot-field select { background: var(--surface-2); border-color: var(--border-control); border-radius: var(--r-sm); }
.pilot-modal-error { background: var(--warning-tint-bg, #160F0A); border-color: var(--warning); color: var(--warning); }

@media (max-width: 760px) {
  .hero h1 { font-size: 34px; }
  .role-card { border-left-width: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition: none !important; scroll-behavior: auto !important; }
}

/* getting-started.html */
.hero-title { background: none; -webkit-text-fill-color: currentColor; color: var(--text); font-weight: 600; letter-spacing: -0.03em; }
.badge { background: transparent; border-color: var(--border-control); color: var(--text-faint); font-weight: 500; letter-spacing: 0.08em; }
.btn-launch { color: var(--on-accent); font-weight: 600; transition: background-color 0.15s ease-out; }
.btn-launch:hover { transform: none; opacity: 1; background: var(--accent-hover); }

/* ---- GK-282 (Gemma site review): phone menu with real tap targets; glossary A-Z jump bar ---- */
@media (max-width: 760px) {
  nav.top .nav-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 8px; }
  nav.top .nav-actions .nav-link-plain, nav.top .nav-actions .nav-link-accent {
    display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 4px;
    border: 1px solid var(--border); border-radius: var(--r-sm, 8px); background: var(--surface, transparent); font-size: 12.5px; line-height: 1.2;
  }
  nav.top .nav-actions a[aria-current="page"] { text-decoration: none; border-color: var(--accent); color: var(--text); }
  nav.top .nav-actions .nav-cta, nav.top .nav-actions .nav-cta-secondary { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 44px; }
}
.glossary-az { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; }
.glossary-az a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; }
.glossary-az a:hover { border-color: var(--accent); color: var(--accent); }
.glossary-letter-group { scroll-margin-top: 70px; }
@media (max-width: 760px) {
  .glossary-az { position: sticky; top: 0; z-index: 5; flex-wrap: nowrap; overflow-x: auto; background: var(--bg); padding: 8px 0; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
  .glossary-az a { flex: none; min-width: 40px; height: 40px; }
}
/* GK-282: Tangra note on the homepage */
.coach-note { max-width: 760px; margin: 26px auto 0; padding: 18px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface, rgba(255,255,255,0.02)); text-align: left; }
.coach-note-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.coach-note p { color: var(--dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.coach-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(239, 159, 39, 0.18); flex: none; }
