/* ═══════════════════════════════════════════════════════════════════
   base.css — design tokens, reset, typography, buttons, utilities.
   Same token values as the portals (tas-agent-web / tas-admin-web):
   graphite neutrals + one sky-blue accent, dark values on html.dark.
   Colours are "R G B" triplets so they can take an alpha:
   rgb(var(--accent) / 0.2).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;

  --canvas:          250 250 250;  /* #fafafa */
  --surface:         255 255 255;
  --surface-muted:   245 245 245;
  --line:            229 229 229;
  --line-strong:     212 212 212;
  --fg:               23  23  23;
  --fg-muted:         82  82  82;
  --fg-subtle:       115 115 115;

  --accent:           14 165 233;  /* sky-500: focus rings, selected states */
  --accent-soft:     224 242 254;
  --accent-soft-fg:    3 105 161;
  /* Filled buttons sit a step deeper than the accent (sky-600, nudged
     ~5% darker) so white button text clears WCAG AA at 4.55:1. */
  --accent-solid:      2 124 188;
  --accent-solid-hover: 3 105 161; /* sky-700 */
  --on-accent:       255 255 255;
  --accent-text:       2 132 199;  /* accent-coloured display text */

  --grid-line:        23  23  23;
  --shadow-ambient: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.10);
  --shadow-pop:     0 2px 6px rgb(0 0 0 / 0.05), 0 16px 36px -12px rgb(0 0 0 / 0.18);

  --font-sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;

  --gutter:    clamp(16px, 4vw, 32px);
  --container: 1200px;
  --section-y: clamp(64px, 8vw, 112px);
  --header-h:  64px;
}

html.dark {
  color-scheme: dark;

  --canvas:           10  10  10;  /* #0a0a0a */
  --surface:          23  23  23;  /* #171717 */
  --surface-muted:    38  38  38;
  --line:             38  38  38;
  --line-strong:      64  64  64;
  --fg:              250 250 250;
  --fg-muted:        163 163 163;
  --fg-subtle:       140 140 140;

  --accent:           56 189 248;  /* sky-400 */
  --accent-soft:       8  47  73;
  --accent-soft-fg:  125 211 252;
  --accent-solid:     56 189 248;
  --accent-solid-hover: 125 211 252;
  --on-accent:        10  10  10;
  --accent-text:      56 189 248;

  --grid-line:       250 250 250;
  --shadow-ambient: none;
  --shadow-pop:     0 16px 40px -12px rgb(0 0 0 / 0.7);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: rgb(var(--canvas));
  color: rgb(var(--fg));
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* Line icons: one stroke style everywhere. */
svg[viewBox="0 0 24 24"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Focus ─────────────────────────────────────────────────────────── */
/* Ring in the deeper accent so it clears 3:1 on the light canvas. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgb(var(--accent-solid));
  outline-offset: 2px;
}

/* ── Typography ────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.375rem, 1.6rem + 3vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display em {
  font-style: italic;
  color: rgb(var(--accent-text));
}

.title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.45rem + 1.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(var(--fg-muted));
}

.lede {
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.65;
  color: rgb(var(--fg-muted));
  text-wrap: pretty;
}

/* ── Layout ────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 48px; padding: 0 22px; }

.btn-primary {
  background: rgb(var(--accent-solid));
  color: rgb(var(--on-accent));
}
.btn-primary:hover { background: rgb(var(--accent-solid-hover)); }

.btn-secondary {
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  border-color: rgb(var(--line-strong));
}
.btn-secondary:hover {
  background: rgb(var(--surface-muted));
  border-color: rgb(var(--fg-subtle) / 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .btn:active { transform: translateY(0.5px); }
}

/* Small uppercase tags, as on the portals' badges. */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgb(var(--surface-muted));
  color: rgb(var(--fg-muted));
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-accent {
  background: rgb(var(--accent-soft));
  color: rgb(var(--accent-soft-fg));
}

/* ── Utilities ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Theme-specific artwork (logo variants). */
html.dark .only-light,
html:not(.dark) .only-dark { display: none !important; }

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid rgb(var(--line-strong));
  border-radius: var(--radius-sm);
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }
