/* ==========================================================================
   TripNord — base.css (design v2)
   Editorial Nordic: warm paper canvas, polar-night blocks, Bricolage display.
   Fixed brand marks: blue wordmark #0A6AC9 · red icon/mascot #BA0C2F ·
   cream #E6E4D8 · yellow #FFC300. The AI planner has its own language:
   the aurora gradient (--ai-*), used ONLY where AI acts.
   ========================================================================== */

:root {
  /* Brand anchors (from the fixed logo/icon/mascot assets) */
  --blue: #0A6AC9;
  --blue-deep: #08549E;
  --red: #BA0C2F;
  --red-deep: #9A0A27;
  --red-100: #F8E2E7;
  --yellow: #FFC300;
  --yellow-100: #FFEFC2;
  --cream: #E6E4D8;
  --charcoal: #494949;

  /* Canvas — warm paper, not hospital white */
  --paper: #FBF9F2;
  --paper-deep: #F2EEE1;
  --card: #FFFFFF;
  --line: #E7E2D4;
  --line-soft: #EFEBDE;

  /* Polar night */
  --night: #071722;
  --night-2: #0C2740;
  --night-3: #143A5C;
  --night-line: #1F4568;

  /* Ink & text */
  --ink: #0D1B26;
  --text: #33424E;
  --text-soft: #62707B;
  --text-inverse: #F2F0E6;
  --text-inverse-soft: #9FB6C8;

  /* AI language — aurora iridescence. ONLY for AI surfaces/actions. */
  --ai-a: #41E296;
  --ai-b: #2EC4B6;
  --ai-c: #5B8DEF;
  --ai-d: #9D7BFF;
  --ai-gradient: linear-gradient(115deg, var(--ai-a) 0%, var(--ai-b) 32%, var(--ai-c) 66%, var(--ai-d) 100%);
  --ai-glow: 0 10px 34px -8px rgba(91, 141, 239, 0.55), 0 4px 18px -6px rgba(65, 226, 150, 0.35);

  /* Aurora accents for night scenery */
  --aurora-teal: #2EC4B6;
  --aurora-green: #3DDC97;
  --aurora-violet: #8B79E0;
  --ice: #9AD7F5;

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-h3: clamp(1.35rem, 1.18rem + 0.9vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  --fs-h1: clamp(2.6rem, 1.9rem + 3.6vw, 4.6rem);
  --fs-hero: clamp(2.9rem, 2rem + 4.6vw, 5.4rem);

  /* 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: 5.5rem; --sp-10: 7rem;

  /* Radius */
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 34px; --r-full: 999px;

  /* Elevation — warm, navy-tinted */
  --shadow-sm: 0 1px 2px rgba(20, 40, 60, 0.05), 0 4px 14px rgba(20, 40, 60, 0.06);
  --shadow-md: 0 2px 6px rgba(20, 40, 60, 0.05), 0 16px 40px -8px rgba(20, 40, 60, 0.16);
  --shadow-lg: 0 8px 24px -6px rgba(20, 40, 60, 0.14), 0 32px 72px -12px rgba(20, 40, 60, 0.24);
  --shadow-red: 0 10px 28px -6px rgba(186, 12, 47, 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --t-fast: 170ms var(--ease-out);
  --t-med: 300ms var(--ease-out);

  --z-header: 100;
  --z-drawer: 200;
  --z-toast: 300;

  --container: 75rem;
  --container-wide: 84rem;
  --header-h: 4.75rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; } /* width/height attrs reserve space; CSS controls final size */
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul[class], ol[class], nav ul { list-style: none; padding: 0; margin: 0; }
.checklist { list-style: none; padding: 0; display: grid; gap: 0.65rem; }
.checklist li { display: flex; gap: 0.65rem; align-items: center; }
.checklist .ic { color: var(--aurora-green); flex: none; }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  color: var(--ink);
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.15; }
h4 { font-size: var(--fs-md); font-weight: 700; line-height: 1.25; }
p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 2rem; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--red));
}
.on-dark .eyebrow { color: var(--yellow); }
.on-dark .eyebrow::before { background: linear-gradient(90deg, var(--aurora-green), var(--yellow)); }

.lede { font-size: var(--fs-md); line-height: 1.65; color: var(--text-soft); max-width: 44rem; }
.on-dark .lede { color: var(--text-inverse-soft); }

/* Gradient words — reserved for AI/Lief phrasing */
.ai-text {
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2.5rem, var(--container-wide)); margin-inline: auto; }

.section { padding-block: clamp(3.75rem, 3rem + 3.5vw, 7rem); }
.section-tight { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head { display: grid; gap: 1rem; max-width: 48rem; margin-bottom: clamp(2.2rem, 1.6rem + 2.4vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.on-dark { background: var(--night); color: var(--text-inverse); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-cream { background: var(--paper-deep); }
.on-blue-tint { background: #EBF2F8; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 64rem) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem;
  transform: translateY(-200%);
  z-index: calc(var(--z-header) + 1);
  background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; border-radius: var(--r-sm);
  transition: transform var(--t-fast);
}
.skip-link:focus { transform: none; }
.text-center { text-align: center; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 200ms; }
.reveal[data-delay="3"] { transition-delay: 300ms; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
