/* GEO Auditor — design system.
   Tokens first, then components. Light-only, mobile-first, no external requests. */

/* ---------- Font ---------- */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Surfaces & ink */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #0f1222;
  --ink-muted: #4b5265;      /* >= 4.5:1 on white and on --bg */
  --ink-faint: #6b7186;      /* large/secondary text only */
  --line: #e4e7ef;

  /* Accent */
  --accent: #3b5bfd;
  --accent-deep: #2c43d6;    /* small link text, focus rings */
  --aqua: #22d3ee;
  --grad-cta: linear-gradient(135deg, #3b5bfd 0%, #2f4ae0 100%);
  --grad-edge: linear-gradient(135deg, #3b5bfd, #22d3ee);

  /* Verdict — meaning only */
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --good-text: #15803d;
  --warn-text: #92400e;
  --bad-text: #b91c1c;

  /* Provider series */
  --p-anthropic: #d97757;
  --p-openai: #0d9488;
  --p-gemini: #3b82f6;
  --p-google-aio: #f59e0b;

  /* Scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(15 18 34 / .05), 0 1px 3px rgb(15 18 34 / .06);
  --shadow-md: 0 4px 6px rgb(15 18 34 / .04), 0 10px 24px rgb(15 18 34 / .08);
  --container: 960px;
  --narrow: 760px;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s-3); font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 var(--s-3); }

a { color: var(--accent-deep); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.muted { color: var(--ink-muted); font-size: .9rem; }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
.container--narrow { max-width: var(--narrow); }

/* ---------- Header / footer ---------- */

.site-header {
  padding: var(--s-4) 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand svg { display: block; }

.site-footer {
  margin-top: auto;
  padding: var(--s-8) 0 var(--s-6);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: .85rem;
  text-align: center;
}
.site-footer a { color: inherit; }

/* ---------- Hero (aurora) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--s-10) 0 var(--s-8);
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(38% 55% at 22% 30%, rgb(59 91 253 / .16), transparent 70%),
    radial-gradient(34% 50% at 76% 22%, rgb(34 211 238 / .17), transparent 70%),
    radial-gradient(30% 45% at 55% 68%, rgb(52 211 153 / .12), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: rgb(59 91 253 / .09);
  border: 1px solid rgb(59 91 253 / .18);
  border-radius: 999px;
  padding: .25rem .8rem;
  margin-bottom: var(--s-4);
}
.hero .sub {
  max-width: 40rem;
  margin: 0 auto var(--s-2);
  color: var(--ink-muted);
  font-size: 1.05rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-5);
  box-shadow: var(--shadow-sm);
  margin: var(--s-5) 0;
}
.card--raised { box-shadow: var(--shadow-md); }

/* ---------- Forms ---------- */

.form-card { text-align: left; }
.form-grid {
  display: grid;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1.6fr; }
}
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: var(--s-1);
}
.input {
  width: 100%;
  padding: .65rem .8rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #c6cbd9;
  border-radius: var(--r-md);
}
.input::placeholder { color: #8a90a3; }
.input:focus-visible { outline-offset: 0; border-color: var(--accent-deep); }
.hint { margin: var(--s-1) 0 0; color: var(--ink-muted); font-size: .82rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: .7rem 1.4rem;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
}
.btn--primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: 0 6px 16px rgb(59 91 253 / .28), 0 1px 3px rgb(34 211 238 / .25);
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--lg { padding: .85rem 1.8rem; font-size: 1.05rem; width: 100%; }
@media (min-width: 640px) { .btn--lg { width: auto; } }

/* ---------- Toast ---------- */

.toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin: 0 0 var(--s-5);
  color: #14532d;
  font-weight: 500;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

/* ---------- Example chips ---------- */

.chips-section { margin: var(--s-6) 0; text-align: center; }
.chips-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-3);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  padding: 0;
  margin: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  max-width: 100%;
  padding: .45rem .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip .chip-cat {
  font-weight: 400;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16em;
}

/* ---------- How it works / trust strip ---------- */

.steps {
  display: grid;
  gap: var(--s-4);
  margin: var(--s-5) 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgb(59 91 253 / .1);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: var(--s-2);
}
.step h3 { margin-bottom: var(--s-1); }
.step p { margin: 0; color: var(--ink-muted); font-size: .9rem; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3) var(--s-5);
  margin: var(--s-5) 0 var(--s-8);
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  font-size: .88rem;
  font-weight: 500;
}
.trust-strip li { display: inline-flex; align-items: center; gap: var(--s-2); }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: none;
  background: #9aa0b4;
}
.dot--anthropic  { background: var(--p-anthropic); }
.dot--openai     { background: var(--p-openai); }
.dot--gemini     { background: var(--p-gemini); }
.dot--google_aio { background: var(--p-google-aio); }

/* ---------- Report header ---------- */

.report-head { margin: var(--s-5) 0 0; }
.report-head h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin-bottom: var(--s-1); }
.report-head .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  color: var(--ink-muted);
  font-size: .88rem;
}
.status-pill {
  display: inline-block;
  padding: .1rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: #eef0f5;
  color: #3f4557;
  text-transform: capitalize;
}
.status-pill--completed { background: #dcfce7; color: #14532d; }
.status-pill--failed { background: #fee2e2; color: #7f1d1d; }

/* ---------- Score gauge ---------- */

.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  text-align: center;
  padding: var(--s-6) var(--s-5);
}
@media (min-width: 640px) {
  .score-card { flex-direction: row; text-align: left; gap: var(--s-8); padding: var(--s-6) var(--s-8); }
}
.gauge-wrap { position: relative; width: 220px; flex: none; }
.gauge { display: block; width: 100%; height: auto; }
.gauge-track, .gauge-fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}
.gauge-track { stroke: #e9ebf3; }
.gauge-fill {
  stroke-dasharray: 264;
  animation: gauge-sweep 1.1s cubic-bezier(.33, 1, .68, 1) both;
}
@keyframes gauge-sweep {
  from { stroke-dashoffset: 264; }
}
.gauge-fill--good { stroke: var(--good); }
.gauge-fill--warn { stroke: var(--warn); }
.gauge-fill--bad  { stroke: var(--bad); }
.gauge-readout {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  text-align: center;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.gauge-readout .of {
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.verdict { font-size: 1.35rem; font-weight: 700; margin-bottom: var(--s-1); }
.verdict--good { color: var(--good-text); }
.verdict--warn { color: var(--warn-text); }
.verdict--bad  { color: var(--bad-text); }
.verdict-note { color: var(--ink-muted); margin: 0; }

/* ---------- Provider surface rows ---------- */

.surface-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-1) var(--s-3);
  align-items: center;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.surface-row:first-of-type { border-top: none; padding-top: var(--s-2); }
.surface-name {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 600;
  min-width: 0;
}
.surface-name .model-id {
  font-weight: 400;
  font-size: .78rem;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.surface-facts {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  justify-self: end;
  font-size: .88rem;
  color: var(--ink-muted);
  white-space: nowrap;
}
.surface-bar { grid-column: 1 / -1; }

.badge {
  display: inline-block;
  padding: .12rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: #eef0f5;
  color: #3f4557;
}
.badge--ok   { background: #dcfce7; color: #14532d; }
.badge--miss { background: #fee2e2; color: #7f1d1d; }
.badge--warn { background: #fef3c7; color: #78350f; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: #e9ebf3;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .8s cubic-bezier(.33, 1, .68, 1);
}
.bar-fill--anthropic  { background: var(--p-anthropic); }
.bar-fill--openai     { background: var(--p-openai); }
.bar-fill--gemini     { background: var(--p-gemini); }
.bar-fill--google_aio { background: var(--p-google-aio); }

/* ---------- Data tables (competitors) ---------- */

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
tr:last-child td { border-bottom: none; }
td a { word-break: break-all; }

/* ---------- Citations ---------- */

.cite-list { list-style: none; margin: 0; padding: 0; }
.cite-list li {
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.cite-list li:last-child { border-bottom: none; }
.cite-list .cite-title { display: block; color: var(--ink-muted); font-size: .82rem; }

/* ---------- Raw answers ---------- */

details.raw {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: var(--s-3) 0;
}
details.raw summary {
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  font-weight: 500;
  color: var(--ink-muted);
}
details.raw pre {
  margin: 0;
  padding: var(--s-4);
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .8rem;
  color: var(--ink-muted);
  max-height: 24rem;
  overflow-y: auto;
}

/* ---------- Waitlist CTA card ---------- */

.cta-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
  margin: var(--s-6) 0;
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-edge) border-box;
  border-width: 2px;
}
.cta-card h2 { margin-bottom: var(--s-1); }
.cta-card > p { color: var(--ink-muted); margin-bottom: var(--s-4); }
.cta-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
@media (min-width: 640px) {
  .cta-form { flex-direction: row; align-items: flex-end; }
  .cta-form .field { flex: 1; max-width: 24rem; }
}

/* ---------- Skeleton (pending) ---------- */

.skeleton-card { padding: var(--s-6) var(--s-5); }
.skel {
  display: block;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, #edeff5 25%, #f6f7fb 45%, #edeff5 65%);
  background-size: 200% 100%;
  animation: skel-pulse 1.4s ease-in-out infinite;
}
@keyframes skel-pulse {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skel--title { height: 1.2rem; width: 45%; margin-bottom: var(--s-4); }
.skel--gauge { height: 96px; width: 180px; border-radius: 96px 96px 0 0; margin: 0 auto var(--s-4); }
.skel--row { height: .9rem; width: 100%; margin-bottom: var(--s-3); }
.skel--row:nth-child(odd) { width: 82%; }
.pending-note {
  text-align: center;
  color: var(--ink-muted);
  margin-top: var(--s-2);
}

/* ---------- Error card ---------- */

.error-card {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}
.error-card p { margin: 0; }

/* ---------- Methodology ---------- */

.methodology {
  margin-top: var(--s-8);
  color: var(--ink-muted);
  font-size: .84rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .gauge-fill { animation: none; }
  .skel { animation: none; }
  .bar-fill { transition: none; }
  *, *::before, *::after { scroll-behavior: auto; }
}
