/* Copied verbatim from av-landing-phase0/apps/site/src/styles (tokens.css + global.css). Re-copy rather than edit. */
/* AgentValet brand tokens.
   Light is the default. Dark is opt-in through the header toggle, which sets
   data-theme="dark" on <html> and remembers the choice in this browser.

   Colour carries meaning here:
     accent (valet blue)       links, primary buttons, focus, the brand mark
     allow / hold / deny       ONLY where a policy decision is shown
     everything else           ink and cool neutrals
   Every text pairing is checked in docs/site-rebuild/contrast.mjs (AA or better). */

:root {
  color-scheme: light;

  --paper: #F5F7FA;
  --card: #FFFFFF;
  --well: #EDF0F5;
  --line: #DCE1E8;
  --line-strong: #8A94A6;
  --ink: #0B1220;
  --text: #2B3444;
  --muted: #5B6678;

  /* Accent = the logo's blue (#1d4ed8 to #3b82f6), so there is one blue on the page. */
  --accent: #1D4ED8;
  --accent-hover: #1E40AF;
  --accent-soft: #E8EEFD;
  --on-accent: #FFFFFF;

  /* Dark feature panels (closing call to action, phone frame). Fixed navy in
     light mode; a raised navy in dark mode, never an inverted white slab. */
  --panel-bg: #0B1220;
  --panel-ink: #F5F7FA;
  --panel-muted: #C5CEDB;
  --panel-line: rgba(245, 247, 250, .28);
  --device: #0B1220;

  /* Backdrop texture and the one tinted band. Low contrast on purpose. */
  --grid-dot: rgba(29, 78, 216, .16);
  --wash: rgba(29, 78, 216, .14);
  --band: #EAF0FD;

  --allow: #0E7A4E;  --allow-bg: #E3F4EB;
  --hold:  #8F5500;  --hold-bg:  #FBEFD9;
  --deny:  #B42318;  --deny-bg:  #FCE8E6;

  /* Code and terminals stay dark in both themes. */
  --code-bg: #0B1220;
  --code-line: #1E2A40;
  --code-text: #D6DDE8;
  --code-dim: #98A4B7;
  --code-str: #5CD69B;
  --code-key: #93C5FD;
  --code-warn: #F0B64A;
  --code-bad: #FF8176;

  --font: "Schibsted Grotesk Variable", "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-base: 1.0625rem; /* 17 */
  --fs-md: 1.25rem;     /* 20 */
  --fs-lg: 1.5rem;      /* 24 */
  --fs-xl: clamp(2rem, 1.35rem + 2.2vw, 3rem);
  --fs-2xl: clamp(2.5rem, 1.5rem + 3.6vw, 4.4rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --sh-card: 0 1px 2px rgba(11, 18, 32, .05), 0 12px 32px -16px rgba(11, 18, 32, .16);
  --sh-lift: 0 2px 6px rgba(11, 18, 32, .06), 0 30px 60px -28px rgba(11, 18, 32, .28);
  --sh-accent: 0 10px 24px -12px rgba(29, 78, 216, .55);

  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1180px;
  --measure: 62ch;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper: #0B1220;
  --card: #111A2B;
  --well: #18233A;
  --line: #243049;
  --line-strong: #5A6882;
  --ink: #EEF2F8;
  --text: #C5CEDB;
  --muted: #98A4B7;

  --accent: #60A5FA;
  --accent-hover: #93C5FD;
  --accent-soft: #14254A;
  --on-accent: #0B1220;

  --panel-bg: #16213A;
  --panel-ink: #EEF2F8;
  --panel-muted: #B4BFD0;
  --panel-line: rgba(238, 242, 248, .22);
  --device: #2A3650;

  --grid-dot: rgba(147, 197, 253, .14);
  --wash: rgba(96, 165, 250, .16);
  --band: #0F1C38;

  --allow: #5CD69B;  --allow-bg: #12301F;
  --hold:  #F0B64A;  --hold-bg:  #33260C;
  --deny:  #FF8176;  --deny-bg:  #3A1614;

  --code-bg: #070C17;
  --code-line: #1A2438;

  --sh-card: 0 0 0 1px rgba(255, 255, 255, .02);
  --sh-lift: 0 30px 60px -30px rgba(0, 0, 0, .7);
  --sh-accent: none;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd, pre, samp { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 750; letter-spacing: -0.028em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); font-weight: 760; letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); letter-spacing: -0.015em; line-height: 1.25; }
p { text-wrap: pretty; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

.section { padding-block: var(--s-9); }
.section + .section { border-top: 1px solid var(--line); }

/* Section rhythm: every second top-level section sits on the white card
   tone, so the page reads as blocks rather than one long sheet. */
main > .section:nth-of-type(even) { background: var(--card); }
.section.band { background: var(--band); }

/* Backdrop: a faint dot grid that fades out, plus a soft brand-blue wash.
   Used on the home hero and every inner page header. */
.backdrop { position: relative; isolation: isolate; }
.backdrop::before, .backdrop::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.backdrop::before {
  background-image: radial-gradient(var(--grid-dot) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 70% 30%, #000 20%, transparent 75%);
}
.backdrop::after { background: radial-gradient(ellipse 50% 60% at 78% 30%, var(--wash), transparent 72%), radial-gradient(ellipse 35% 45% at 5% 0%, var(--wash), transparent 70%); }
.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.section-head p { margin-top: var(--s-4); font-size: var(--fs-md); color: var(--muted); line-height: 1.5; max-width: 40rem; }
@media (max-width: 720px) { .section { padding-block: var(--s-8); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  font-weight: 650; font-size: var(--fs-sm); letter-spacing: -0.005em; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--line-strong); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; }

/* Decision pills: the only place allow / hold / deny colours appear. */
.decision { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-xs); padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.decision::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.decision.allow { color: var(--allow); background: var(--allow-bg); }
.decision.hold { color: var(--hold); background: var(--hold-bg); }
.decision.deny { color: var(--deny); background: var(--deny-bg); }

[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; left: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

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

/* Long-form text: legal pages, blog posts, docs-style sections. */
.prose { max-width: 70ch; color: var(--text); font-size: var(--fs-base); line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin-top: 2.2em; }
.prose h3 { font-size: var(--fs-md); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose strong { color: var(--ink); }
.prose code { font-size: .875em; background: var(--well); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.prose pre { background: var(--code-bg); color: var(--code-text); border-radius: var(--r-md); padding: 16px; overflow-x: auto; font-size: .8125rem; line-height: 1.7; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 700; background: var(--well); }
.prose img { border-radius: var(--r-md); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }

/* Long button labels may wrap on small phones instead of widening the page. */
@media (max-width: 480px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; max-width: 100%; }
}
