/* Axiom product website — design system.
   Palette/typography deliberately echo axiom-web's own dashboard (same accent blue, same
   system-font stack) for brand consistency, since that is the one existing piece of Axiom UI
   this project already ships — see axiom-web/src/main/resources/static/styles.css. */

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --panel-bg: #ffffff;
  --border: #e2e5ea;
  --text: #15181d;
  --text-muted: #5b6572;
  /* Darkened from an earlier #8a93a1, which only cleared 2.89-3.1:1 against this theme's real
     backgrounds -- confirmed failing WCAG AA's 4.5:1 for normal text by an automated axe-core
     scan, not assumed from the hex alone (the same class of bug as dark mode's --text-faint). */
  --text-faint: #636b78;
  --accent: #2756a3;
  --accent-hover: #1e4483;
  --accent-soft: #eaf0fb;
  /* Darkened slightly from an earlier #1a7f37/#9a6700: both originally cleared only 4.47/4.37:1
     against their own badge backgrounds, just under the 4.5:1 WCAG AA text threshold -- confirmed
     by an automated axe-core scan, not assumed. */
  --determined: #157030;
  --needs-investigation: #8a5c00;
  --error: #b42318;
  --code-bg: #0f1115;
  --code-text: #e6e8eb;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 17, 21, 0.04), 0 2px 8px rgba(15, 17, 21, 0.04);
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-subtle: #16191f;
    --panel-bg: #181b21;
    --border: #2a2e37;
    --text: #e6e8eb;
    --text-muted: #9aa3b2;
    /* #6b7380 (same hex as light mode's --text-muted, reused here for --text-faint) only
       clears ~3.6-3.9:1 against this theme's actual backgrounds -- confirmed failing WCAG AA's
       4.5:1 for normal text by an automated axe-core scan, not assumed from the hex alone. */
    --text-faint: #8b93a3;
    --accent: #6f9bdb;
    --accent-hover: #8bb0e6;
    --accent-soft: #1b2a42;
    --code-bg: #0a0b0e;
    --code-text: #dfe2e6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg-subtle: #16191f;
  --panel-bg: #181b21;
  --border: #2a2e37;
  --text: #e6e8eb;
  --text-muted: #9aa3b2;
  --text-faint: #8b93a3;
  --accent: #6f9bdb;
  --accent-hover: #8bb0e6;
  --accent-soft: #1b2a42;
  --code-bg: #0a0b0e;
  --code-text: #dfe2e6;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

/* No rule anywhere in this file sets outline: none, so the browser's native focus ring was
   never actually suppressed -- this rule just makes it consistent and visible against both
   themes, using the existing accent color, rather than leaving it to each browser's own
   default (which can be hard to see against a dark background). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--accent);
  /* Same fix as .btn-primary: a fixed white #fff fails contrast against dark mode's lighter
     accent blue (confirmed by an automated axe-core scan, 2.84:1 against a 4.5:1 requirement). */
  color: var(--btn-primary-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.9rem;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn:hover { text-decoration: none; }
/* --btn-primary-text defaults to white (correct against light mode's dark navy accent, #2756a3,
   ~7:1 contrast). Dark mode's accent is deliberately a *lighter* blue for its own text-on-dark
   use elsewhere, which would fail WCAG AA as a button background with white text (~2:1,
   confirmed against a real rendered screenshot, not assumed from the hex values alone) -- so
   dark mode overrides this one variable to a near-black instead, giving ~8:1. */
:root { --btn-primary-text: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --btn-primary-text: #0b1016; }
}
:root[data-theme="dark"] { --btn-primary-text: #0b1016; }

.btn-primary { background: var(--accent); color: var(--btn-primary-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }

/* ---------- Hero ---------- */

.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-subtle), var(--bg) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.8rem;
  max-width: 34rem;
}

.hero-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Report preview card ---------- */

.report-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.report-card .report-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.report-card .dot { width: 9px; height: 9px; border-radius: 50%; }
.report-card .report-body {
  padding: 1rem 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
}
.report-card .kv { color: var(--text-muted); }
.report-card .badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-needs-investigation { background: #fbf2de; color: var(--needs-investigation); }
.badge-app-bug { background: var(--accent-soft); color: var(--accent); }
.report-card hr { border: none; border-top: 1px solid var(--border); margin: 0.7rem 0; }

/* Shared by the hero's compact report-card AND demo-report.html's full-report view --
   deliberately not scoped under .report-card alone, which previously left demo-report.html's
   claim tags with no spacing before the claim text (caught by direct visual inspection of a
   real rendered screenshot, not assumed correct from the markup alone). */
.claim { margin: 0.25rem 0; }
.claim .tag {
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-right: 0.3rem;
}
.report-card .provisional-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0 0.35rem;
  margin-left: 0.4rem;
}

/* ---------- Sections ---------- */

section { padding: 4.5rem 0; }
section.alt { background: var(--bg-subtle); }
section .section-head { max-width: 42rem; margin-bottom: 2.6rem; }
section h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 0 0 0.8rem;
  letter-spacing: -0.01em;
}
section .section-head p { color: var(--text-muted); margin: 0; font-size: 1.02rem; }
.section-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}

/* ---------- Problem / workflow list ---------- */

.workflow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.workflow-steps li {
  display: flex;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.workflow-steps .num {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

/* ---------- Pipeline diagram ---------- */

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}
.pipeline-stage {
  flex: 1 1 150px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.pipeline-stage h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.pipeline-stage p { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 1.1rem;
  padding: 0 0.1rem;
}
@media (max-width: 760px) {
  .pipeline { flex-direction: column; }
  .pipeline-arrow { transform: rotate(90deg); padding: 0.2rem 0; }
}

/* ---------- Cards grid ---------- */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.card .icon {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.6rem;
}
.status-shipped { background: #e6f4ea; color: var(--determined); }
.status-roadmap { background: var(--bg-subtle); color: var(--text-faint); border: 1px dashed var(--border); }

/* ---------- Integrations ---------- */

.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}
.integration-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}
.integration-item .dot2 {
  width: 8px; height: 8px; border-radius: 50%; background: var(--determined); flex: 0 0 auto;
}

/* ---------- Comparison table ---------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.88rem;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th { background: var(--bg-subtle); font-size: 0.8rem; color: var(--text-muted); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 600; width: 32%; }

.note-box {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
}

/* ---------- Code blocks ---------- */

.code-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; }
.code-tab {
  padding: 0.35rem 0.8rem;
  border-radius: 6px 6px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-bottom: none;
  cursor: pointer;
}
.code-tab.active { background: var(--code-bg); color: var(--code-text); border-color: var(--code-bg); }

pre.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
}
pre.code-block.hidden { display: none; }
.code-wrap { position: relative; }
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255,255,255,0.08);
  color: var(--code-text);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.16); }

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  padding: 1.1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--text-faint); font-weight: 400; font-size: 1.2rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 1.1rem; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Beta section ---------- */

.beta-box {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.2rem;
  text-align: center;
}
.beta-box h2 { margin-top: 0; }
.beta-box p { color: var(--text-muted); max-width: 38rem; margin: 0 auto 1.6rem; }
.beta-ctas { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
