/* ==========================================================================
   dispatch-tokens.css
   Reset, custom properties, typography scale, base elements, a11y states.
   ========================================================================== */

@font-face {
  font-family: "Boldonse";
  src: local("Boldonse");
  font-display: swap;
}

:root {
  --paper: #f5f1e8;
  --paper-raised: #fbf8f1;
  --ink: #181b20;
  --ink-soft: #454b56;
  --cobalt: #2447ff;
  --cobalt-ink: #12227a;
  --signal: #c73a24;
  --mist: #dce5ee;
  --soft: #ebe6dc;
  --line: #24272d;
  --line-soft: rgba(24, 27, 32, 0.18);
  --success-bg: #e3ecdd;

  --font-display: "Boldonse", "Rockwell", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step-0: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --step-1: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --step-2: clamp(1.3rem, 1.2rem + 0.6vw, 1.65rem);
  --step-3: clamp(1.7rem, 1.5rem + 1.1vw, 2.4rem);
  --step-4: clamp(2.2rem, 1.8rem + 2vw, 3.6rem);
  --step-5: clamp(2.8rem, 2.1rem + 3.4vw, 5.2rem);

  --rail: 0.4rem;
  --radius-tag: 999px;
  --radius-card: 0.25rem;
  --edge: 1px solid var(--line);
  --edge-soft: 1px dashed var(--line-soft);

  --max-w: 78rem;
  --pad-inline: clamp(1.1rem, 4vw, 3.2rem);

  --motion-fast: 140ms;
  --motion-med: 260ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: var(--step-5);
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-2);
}

h4 {
  font-size: var(--step-1);
}

p {
  margin: 0;
  max-width: 38rem;
}

a {
  color: var(--cobalt-ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cobalt);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: var(--step-0);
}

label {
  font-weight: 600;
}

hr {
  border: none;
  border-top: var(--edge-soft);
  margin: 0;
}

/* ---- Accessibility & focus states ---- */

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-card);
  font-weight: 700;
  transition: top var(--motion-fast) var(--ease);
}

.skip-link:focus-visible {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 2px;
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* ---- Shared utility primitives used across every module ---- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt-ink);
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--signal);
  border-radius: 50%;
  flex-shrink: 0;
}

.ticket {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border: var(--edge);
  border-radius: var(--radius-tag);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--paper-raised);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-card);
  border: var(--edge);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.btn-primary {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--cobalt-ink);
  border-color: var(--cobalt-ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn-signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--paper);
}

.btn-signal:hover {
  background: #a12c1a;
  border-color: #a12c1a;
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    transform: none;
  }
}
