/* ---------- BASE — tokens, reset, elementals (spec v2) ---------- */

:root {
  /* Canvas + ink */
  --canvas:       #FDF8F2;   /* warm cream */
  --surface:      #FFFFFF;
  --whisper:      #F0EDE8;   /* alt section bg */
  --ink:          #1A2744;   /* deep navy — primary text */
  --ink-soft:     #445170;
  --driftwood:    #8E8A82;   /* metadata / placeholder */

  /* Accents */
  --marigold:     #F5B731;   /* CTAs, hover accents */
  --marigold-dark:#DEA328;
  --marigold-soft:#FCE8B6;

  --coral:        #E8655A;   /* secondary, featured */
  --coral-dark:   #D04D43;
  --coral-soft:   #FCEAE4;   /* blush — hover tint, notices */

  --sage:         #B8CEB7;   /* cards bg, subtle dividers */
  --sage-deep:    #8FAE8E;
  --sage-soft:    #E2EBE1;

  --teal:         #1B4D5C;   /* footer, dark variant */
  --teal-dark:    #123844;

  --spring:       #4CAF82;   /* verified dog-friendly badges */

  --rule:         #E7E1D8;
  --rule-strong:  #D6CDBF;

  /* Signature gradient */
  --gradient-signature: linear-gradient(135deg, #F5B731 0%, #E8655A 50%, #D94F78 100%);

  /* Font stacks */
  --font-display: 'Playfair Display', Georgia, ui-serif, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Type scale (spec §3) */
  --text-xs:      clamp(0.75rem, 0.7rem + 0.25vw, 0.813rem);
  --text-sm:      clamp(0.813rem, 0.75rem + 0.3vw, 0.875rem);
  --text-base:    clamp(0.938rem, 0.875rem + 0.3vw, 1.063rem);
  --text-lg:      clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --text-xl:      clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl:     clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl:     clamp(1.875rem, 1.5rem + 1.875vw, 2.75rem);
  --text-4xl:     clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-hero:    clamp(2.75rem, 2rem + 3.75vw, 5rem);

  /* Line heights + tracking */
  --lh-hero:      1.05;
  --lh-h1:        1.1;
  --lh-h2:        1.2;
  --lh-body:      1.65;

  /* Spacing (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5rem;
  --space-11: 6rem;
  --space-12: 8rem;

  /* Section vertical rhythm */
  --sec-v: var(--space-9);
  /* Shapes */
  --r-sm:   6px;
  --r:      12px;
  --r-card: 16px;
  --r-hero: 24px;
  --r-pill: 999px;

  /* Soft, colored shadows */
  --sh-sm:  0 2px 12px rgba(26, 39, 68, 0.06);
  --sh:     0 8px 28px rgba(26, 39, 68, 0.09), 0 2px 6px rgba(26, 39, 68, 0.04);
  --sh-lg:  0 18px 48px rgba(26, 39, 68, 0.15), 0 6px 14px rgba(26, 39, 68, 0.06);
  --sh-card-hover: 0 14px 38px rgba(26, 39, 68, 0.14);

  /* Container widths */
  --container-sm: 640px;
  --container-md: 960px;
  --container-lg: 1200px;
  --container-xl: 1440px;

  --gutter: 20px;

  /* Motion tokens */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring-pop:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:  150ms;
  --duration-base:  200ms;
  --duration-slow:  350ms;
  --duration-enter: 400ms;
}

@media (min-width: 640px)  { :root { --gutter: 32px; --sec-v: var(--space-10); } }
@media (min-width: 1024px) { :root { --gutter: 48px; --sec-v: var(--space-11); } }

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(232, 101, 90, 0.14);
}

@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-h2);
  color: var(--ink);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-4xl); font-weight: 700; line-height: var(--lh-h1); letter-spacing: -0.015em; }
h2 { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.012em; }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 700; font-family: var(--font-body); letter-spacing: -0.005em; }

p { margin: 0 0 1em; max-width: 68ch; }

a {
  color: var(--coral);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color var(--duration-base) var(--ease-out);
}
a:hover { color: var(--coral-dark); text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 3px; }

strong, b { font-weight: 600; color: var(--ink); }
em, i { font-style: italic; }
small { font-size: var(--text-sm); color: var(--driftwood); }

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2.5rem 0;
}

::selection { background: var(--marigold); color: var(--ink); }

/* 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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  font-weight: 600;
  z-index: 1000;
  border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 8px; top: 8px; border-radius: var(--r); }

/* Eyebrow — refined (replaces handwritten) */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--space-3);
}

/* Signature brush underline for key words */
.brush-underline {
  position: relative;
  display: inline-block;
}
.brush-underline::after {
  content: '';
  position: absolute;
  left: -4%; right: -4%; bottom: -0.12em;
  height: 0.22em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 16' preserveAspectRatio='none'><path d='M2 10 C 60 2, 140 14, 218 6' stroke='%23F5B731' stroke-width='6' stroke-linecap='round' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: -1;
}
