/* ============================================================================
   BASE - reset, design tokens, typography
   Single source of truth for color, type, spacing, motion.
   Change a brand value here and it updates everywhere.
   ============================================================================ */

:root {
  /* ---- Color: Lake Erie harbor ---- */
  /* Warm cream paper backgrounds, deep harbor ink, a bright cyan pop,
     a gold pulled from a baked bagel crust. Food stays appetizing,
     the brand reads fresh and coastal. */
  --cream:        #FAF4E9;   /* page background, warm paper */
  --cream-2:      #F3EAD8;   /* alternating band */
  --card:         #FFFCF5;   /* raised surfaces */
  --foam:         #E7F1F4;   /* cool light-blue band */
  --ink:          #0C2A40;   /* primary text, deep harbor navy */
  --ink-soft:     #234A62;   /* secondary headings */
  --muted:        #4A6577;   /* muted body, passes AA on cream */
  --harbor:       #0E5C86;   /* primary brand blue, button surfaces */
  --harbor-deep:  #093f5c;   /* pressed / deep blue */
  --cyan:         #16A9D6;   /* bright accent pop */
  --cyan-deep:    #096180;   /* cyan that needs text contrast (AA on cream/foam) */
  --gold:         #DFA13A;   /* warm crust accent, used sparingly */
  --gold-deep:    #B97E1E;
  --line:         rgba(12, 42, 64, 0.12);
  --line-strong:  rgba(12, 42, 64, 0.22);
  --white:        #ffffff;
  --shadow-color: 12, 42, 64;

  /* ---- Typography ---- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --text-xs:   0.78rem;
  --text-sm:   0.9rem;
  --text-base: 1.0625rem;
  --text-lg:   1.2rem;
  --text-xl:   1.45rem;
  --text-2xl:  1.85rem;
  --text-3xl:  2.35rem;
  --text-4xl:  3rem;
  --text-5xl:  clamp(2.6rem, 6vw, 4.5rem);
  --text-hero: clamp(3rem, 9vw, 7rem);

  --leading-tight: 1.05;
  --leading-snug:  1.25;
  --leading-body:  1.7;

  /* ---- Spacing ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-section: clamp(4.5rem, 9vw, 8.5rem);

  /* ---- Layout ---- */
  --container: 1240px;
  --container-narrow: 760px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 640ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.2, 1);

  /* ---- Elevation ---- */
  --shadow-sm: 0 2px 8px rgba(var(--shadow-color), 0.08);
  --shadow-md: 0 14px 38px -12px rgba(var(--shadow-color), 0.28);
  --shadow-lg: 0 40px 80px -28px rgba(var(--shadow-color), 0.42);

  --header-h: 76px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ---- Typography defaults ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  color: var(--ink);
  font-optical-sizing: auto;
  text-wrap: balance;
}

h1 { font-size: var(--text-hero); font-weight: 600; }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-2xl); }

p { text-wrap: pretty; }

strong { font-weight: 700; }

::selection { background: var(--cyan); color: var(--white); }

/* ---- Accessibility helpers ---- */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  top: -120%;
  left: var(--space-4);
  z-index: 2000;
  background: var(--harbor);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Reduced motion ---- */
@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;
    scroll-behavior: auto !important;
  }
}
