/* ============================================================
   WOODLEY COLLISION — GLOBAL STYLESHEET
   Loads on every page. Contains:
   1. Design tokens (:root)         4. Container & layout helpers
   2. Reset / base                  5. Buttons (shared component)
   3. Typography                    6. Utilities
   ============================================================ */

/* ----- Fonts ----- */

/* ============================================================
   1. DESIGN TOKENS  (mirrors Figma variables)
   ============================================================ */
:root {
  /* --- Brand / color --- */
  --color-red: #e11a17;            /* Woodley red (logo) — confirm exact hex from logo file */
  --color-red-dark: #b91411;
  --black: #000000;                /* Figma: Gray-900 */
  --white: #ffffff;
  --gray-900: #000000;
  --gray-300: #aaaaaa;             /* muted body text */
  --gray-200: #c6c6c6;             /* borders / light text on dark */
  --gray-100: #e9e9e9;
  --gray-50:  #f1f1f1;             /* hairline borders */
  --surface:  #ffffff;
  --surface-muted: #fafafa;        /* header bg (94% opacity applied where used) */

  /* --- Typography --- */
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale — clamp(min, preferred, max). Scales smoothly on resize.
     Base design frame = 1440px. */
  --fs-body-s:  0.875rem;                              /* 14px — menu descriptions */
  --fs-body:    1rem;                                  /* 16px — nav / base */
  --fs-h3:      clamp(1.125rem, 0.95rem + 0.8vw, 1.25rem);   /* ~18–20px */
  --fs-h2:      clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);     /* ~28–44px */
  --fs-h1:      clamp(2.5rem, 1.4rem + 4.6vw, 4rem);         /* ~40–64px */

  --lh-tight: 1.2;
  --lh-snug:  1.375;   /* 24/16 ≈ nav */
  --lh-body:  1.571;   /* 22/14 menu copy */

  /* --- Spacing scale (from Figma: 0/2/4/8/12/16/20/24/36/40/56/100/120) --- */
  --sp-2: 0.125rem;
  --sp-4: 0.25rem;
  --sp-8: 0.5rem;
  --sp-12: 0.75rem;
  --sp-16: 1rem;
  --sp-20: 1.25rem;
  --sp-24: 1.5rem;
  --sp-28: 1.75rem;
  --sp-32: 2rem;
  --sp-36: 2.25rem;
  --sp-40: 2.5rem;
  --sp-48: 3rem;
  --sp-56: 3.5rem;

  /* --- Radius --- */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-pill: 36px;
  --radius-round: 999px;

  /* --- Layout ---
     Figma frame = 1440, content = 1240, side gutters = 100px each.
     The CONTENT should max at 1240px; gutters sit OUTSIDE it.
     So a section's inner maxes at (1240 + 2*gutter) and pads by gutter,
     leaving content at exactly 1240px on wide screens. */
  --container-max: 1240px;                                   /* content width */
  --gutter: clamp(1.25rem, 0.4rem + 4vw, 6.25rem);          /* 20px → 100px side gutter */
  --container-outer: calc(var(--container-max) + 2 * var(--gutter));
  --header-pad-x: var(--gutter);   /* alias kept for existing rules */
  --header-h: 78px;                /* header height incl. py-12 + 54px buttons */

  /* --- Effects --- */
  --shadow-menu: 0 4px 12px 0 rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
  --blur-header: 8px;

  /* --- Motion --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.25s;
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, svg { display: block; max-width: 100%; }
/* Icons control their own fill/stroke via attributes; don't force-fill SVGs.
   (Line icons use fill="none" stroke="currentColor"; solid icons set their own fill.) */

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol { list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-weight: 600; line-height: var(--lh-tight); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* ============================================================
   4. CONTAINER / LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--header-pad-x);
}

/* ============================================================
   5. BUTTONS  (shared across site)
   .btn base + modifiers. Pill-shaped, Poppins Medium 16.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  height: 54px;
  padding-inline: var(--sp-16);
  border-radius: var(--radius-pill);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: var(--lh-snug);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
/* Unified hover motion: pill buttons lift slightly with a soft shadow.
   Ghost (text-link) buttons only shift color — no lift. */
.btn:not(.btn--ghost):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.btn:not(.btn--ghost):active { transform: translateY(0); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10); }
.btn--ghost:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .btn:not(.btn--ghost):hover { transform: none; }
}

/* Icon bubble that sits inside buttons (the round phone/arrow chip) */
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  flex-shrink: 0;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn__icon svg { width: 14px; height: 14px; stroke-width: 2; }

/* --- Primary: solid black, white icon bubble --- */
.btn--primary {
  background: var(--gray-900);
  color: var(--white);
}
.btn--primary .btn__icon { background: var(--white); color: var(--gray-900); }
.btn--primary:hover {
  background: var(--color-red);
  box-shadow: 0 8px 20px rgba(225, 26, 23, 0.30);
}
.btn--primary:hover .btn__icon { color: var(--color-red); }

/* --- Outline: bordered, black icon bubble --- */
.btn--outline {
  background: transparent;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  justify-content: space-between;
  min-width: 128px;
}
.btn--outline .btn__icon { background: var(--gray-900); color: var(--white); }
.btn--outline:hover { border-color: var(--color-red); color: var(--color-red); }
.btn--outline:hover .btn__icon { background: var(--color-red); }

/* --- Ghost: borderless text link with a small inline chevron --- */
.btn--ghost {
  background: transparent;
  color: var(--gray-900);
  border: none;
  padding: 0;
  height: auto;
  gap: var(--sp-4);
  min-width: 0;
}
.btn--ghost .btn__icon {
  width: 18px;
  height: 18px;
  background: transparent;
  color: var(--gray-900);
}
.btn--ghost .btn__icon svg { width: 18px; height: 18px; }
.btn--ghost:hover { color: var(--color-red); }
.btn--ghost:hover .btn__icon { color: var(--color-red); }

/* ============================================================
   6. BUSINESS-HOURS LIST  (footer + contact blocks)
   Day label + time, one row per merged range.
   ============================================================ */
.hours-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  max-width: 320px;
}
.hours-list__row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-8);
}
.hours-list__days {
  flex-shrink: 0;
  font-weight: 400;
  opacity: 0.75;
}
.hours-list__days::after {
  content: ":";
}
.hours-list__time {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   7. UTILITIES
   ============================================================ */
.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;
}
.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
[hidden] { display: none !important; }

/* WP utility: visually hidden, available to screen readers (pagination headings etc.) */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Safety net: never allow the page itself to scroll sideways.
   `clip` (unlike `hidden`) does not create a scroll container, so
   position: sticky keeps working. Older engines fall back to hidden. */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
}
