/* =========================================================
   O'Driscoll's Recovery — base.css
   Tokens, reset, typography primitives, utilities
   ========================================================= */

:root {
  /* ---- Brand palette (from supplied artwork) ---- */
  --amber: #e5a022;
  --amber-bright: #f0a51a;
  --amber-deep: #b87715;
  --silver: #e7e9ec;
  --silver-dim: #b9bec5;
  --ink: #0a0a0b;
  --ink-2: #101113;
  --ink-3: #17181b;
  --warm-grey: #8d8a83;

  /* ---- Semantic tokens (dark = default) ---- */
  --bg: #08080a;
  --bg-alt: #0e0f11;
  --surface: #141518;
  --surface-2: #1b1c20;
  --border: #2a2c31;
  --border-strong: #3a3d44;
  --text: #f2f3f5;
  --text-muted: #b0b3b9;
  --text-faint: #83868c;
  --accent: #f0a51a;
  --accent-hover: #ffbb3d;
  --accent-ink: #100c02;
  --scrim: rgba(4, 4, 5, 0.72);
  --plate: rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.7);

  /* ---- Type ---- */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  --text-xl: clamp(1.5rem, 1.4vw + 1.1rem, 2.125rem);
  --text-2xl: clamp(2.125rem, 3vw + 1.2rem, 3.25rem);
  --text-hero: clamp(2.6rem, 6.2vw + 0.6rem, 5.25rem);

  /* ---- Space ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(3.5rem, 7vw, 7rem);
  --gutter: clamp(1.125rem, 4vw, 3rem);
  --maxw: 78rem;
  --radius: 4px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Restrained light mode: same brand, inverted surfaces ---- */
[data-theme="light"] {
  --bg: #f4f3f0;
  --bg-alt: #eceae5;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --border: #d8d5cd;
  --border-strong: #b6b2a8;
  --text: #14151a;
  --text-muted: #4c4e55;
  --text-faint: #5d5f66;
  --accent: #8a5a05;          /* AA-contrast amber for text/links on light */
  --accent-hover: #6d4703;
  --accent-ink: #ffffff;
  --scrim: rgba(8, 8, 10, 0.55);
  --plate: rgba(10, 10, 12, 0.035);
  --shadow-lg: 0 20px 46px -22px rgba(30, 26, 18, 0.35);
  --shadow-md: 0 8px 22px -14px rgba(30, 26, 18, 0.3);
}

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

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

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Inline icon sprite: hidden container + default icon size (context rules win) */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

button, input, textarea, select { font: inherit; color: inherit; }

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

hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* =================== Focus + skip link =================== */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: var(--accent-ink); }

/* =================== Layout utilities =================== */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

.h2 { font-size: var(--text-2xl); }
.h3 { font-size: var(--text-xl); }

.lede {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 58ch;
}

.muted { color: var(--text-muted); }

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* =================== Buttons =================== */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn--primary {
  --btn-bg: var(--amber-bright);
  --btn-fg: #120d02;
  --btn-bd: var(--amber-bright);
  box-shadow: 0 10px 30px -14px rgba(240, 165, 26, 0.7);
}
.btn--primary:hover {
  --btn-bg: #ffbb3d;
  --btn-bd: #ffbb3d;
  color: #120d02;
}

.btn--ghost {
  --btn-bg: rgba(255, 255, 255, 0.04);
  --btn-fg: var(--text);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { --btn-bd: var(--amber-bright); color: var(--text); }
[data-theme="light"] .btn--ghost { --btn-bg: rgba(10, 10, 12, 0.03); }

.btn--sm { min-height: 44px; padding: 0.55rem 1rem; font-size: 1rem; }

/* =================== Motion =================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .parallax { transform: none !important; }
}

/* =================== Screen-reader only =================== */
.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;
}
