/* tokens.css — design tokens + reset layer for the gateway redesign.
   Load BEFORE site.css. Critical subset may be inlined on homepage. */

:root {
  /* Calm lavender palette (not purple-overload) */
  --lavender-50:  #F5F1F7;
  --lavender-100: #E8DEED;
  --lavender-200: #D6C3DF;
  --lavender-300: #C4AED0;
  --lavender-400: #AB92BE;
  --lavender-500: #9B7DB8;
  --lavender-600: #836A9E;
  --lavender-700: #6B5B8A;
  --lavender-900: #3E3355;

  /* Supporting hues */
  --sage-300: #B7C4AB;
  --sage-500: #7A8C6B;
  --sage-700: #5C6E4F;
  --gold-400: #D4B46B;
  --gold-500: #C4A34A;
  --gold-700: #8E7428;

  /* Neutrals */
  --ink:        #1F1D1A;
  --ink-muted:  #4A4643;
  --ink-soft:   #7A746F;
  --cream:      #F7F4EF;
  --cream-2:    #EFEAE2;
  --surface:    #FFFFFF;
  --surface-alt:#F7F4EF;
  --border:     #E4DED5;
  --border-strong: #C9C1B5;

  /* Brand aliases (preserve site.css compat) */
  --primary:       var(--lavender-700);
  --primary-dark:  var(--lavender-900);
  --primary-light: var(--lavender-300);
  --accent:        var(--lavender-500);
  --accent-light:  var(--lavender-300);
  --gold:          var(--gold-500);
  --text:          var(--ink);
  --text-light:    var(--ink-soft);

  /* Type scale — fluid */
  --fs-xs:  clamp(0.78rem, 0.75rem + 0.1vw, 0.82rem);
  --fs-sm:  clamp(0.88rem, 0.85rem + 0.2vw, 0.95rem);
  --fs-base:clamp(1rem,    0.96rem + 0.2vw, 1.06rem);
  --fs-md:  clamp(1.125rem,1.05rem + 0.3vw, 1.22rem);
  --fs-lg:  clamp(1.25rem, 1.18rem + 0.4vw, 1.4rem);
  --fs-xl:  clamp(1.5rem,  1.4rem  + 0.6vw, 1.75rem);
  --fs-2xl: clamp(2rem,    1.8rem  + 1vw,   2.5rem);
  --fs-3xl: clamp(2.5rem,  2.2rem  + 1.6vw, 3.4rem);
  --fs-4xl: clamp(3rem,    2.6rem  + 2vw,   4rem);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-xl: var(--space-8);
  --space-2xl: var(--space-9);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows (two levels only) */
  --shadow-1: 0 1px 2px rgba(31,29,26,.05), 0 1px 3px rgba(31,29,26,.08);
  --shadow-2: 0 10px 24px -12px rgba(31,29,26,.18), 0 4px 10px -4px rgba(31,29,26,.08);

  /* Focus */
  --focus-ring: 0 0 0 3px rgba(155,125,184,.4);
  --focus-ring-solid: 0 0 0 2px var(--lavender-500);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;

  /* Layout */
  --container-max: 1180px;
  --header-h: 72px;
  --header-h-slim: 56px;
}

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

/* Universal focus treatment */
:where(a, button, [role="button"], input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* Icon defaults */
.icon {
  display: inline-block;
  vertical-align: -0.2em;
  flex-shrink: 0;
}
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* Typography helpers */
.serif { font-family: 'Playfair Display', Georgia, serif; }
.sans  { font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--lavender-700);
}

/* Buttons (gateway redesign primitives) */
.btn-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  min-height: 44px;
}
.btn-g:hover { transform: translateY(-1px); }
.btn-g:active { transform: translateY(0); }

.btn-g-primary { background: var(--lavender-700); color: #fff; }
.btn-g-primary:hover { background: var(--lavender-900); }

.btn-g-secondary {
  background: transparent;
  color: var(--lavender-700);
  border-color: var(--lavender-300);
}
.btn-g-secondary:hover { background: var(--lavender-50); border-color: var(--lavender-500); }

.btn-g-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-g-ghost:hover { background: var(--surface-alt); border-color: var(--border-strong); }

.btn-g-sm { padding: 8px 14px; font-size: var(--fs-sm); min-height: 36px; }
.btn-g-lg { padding: 14px 26px; font-size: var(--fs-md); }

/* Chip primitives (emoji-free) */
.chip-g {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
}
.chip-g-strong { background: var(--lavender-100); color: var(--lavender-700); border-color: var(--lavender-200); }

/* Card primitives */
.card-g {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card-g:hover { box-shadow: var(--shadow-2); border-color: var(--lavender-200); }

/* High-contrast override support (existing footer toggle) */
.high-contrast {
  --ink: #000;
  --ink-muted: #111;
  --ink-soft: #222;
  --border: #000;
  --lavender-700: #4A3A70;
  --lavender-500: #6C4E9E;
}
.large-text { font-size: 112.5%; }

/* Print */
@media print {
  .no-print, header.site-header, footer.site-footer, .floating-passport, .announcement-bar { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
