/* ============================================================
   TIDY BEAR — FOUNDATION  (single source of truth)
   ------------------------------------------------------------
   Design tokens, layout container, full-bleed utility, and the
   shared primitives (buttons, cards, header, typography) that
   EVERY page uses. Load this FIRST on every page (base.html does
   this automatically). Page-specific CSS layers on top.

   ⚠️  Do NOT redefine --maxw or the palette in page CSS. Change
   them here once and every page — including new Figma pages —
   stays in sync. This is what keeps pages "stretched" the same.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* palette */
  --beige:#F3ECE0;
  --seafoam:#BFE9D7;
  --mint:#9FE0C4;
  --coral:#FF8E7C;
  --teal:#2FA98F;
  --teddy:#A9744F;
  --ink:#2A2018;
  --muted:#6E5E50;
  --white:#FFFFFF;

  /* surfaces */
  --shadow:0 10px 30px rgba(42,32,24,.08);
  --radius:16px;
  --radius-sm:12px;

  /* layout — the ONE width contract for the whole site */
  --maxw:1600px;
  --gutter:24px;

  /* type */
  --font-display:'Cabinet Grotesk',system-ui,sans-serif;
  --font-body:'Satoshi',system-ui,sans-serif;

  /* motion — shared by EVERY page (homepage + onboarding). Defined here so
     onboarding, which never loads style.css, can still resolve --ease etc. */
  --ease:        cubic-bezier(.22,.61,.36,1);  /* calm ease-out — default reveals */
  --ease-crisp:  cubic-bezier(.16,1,.3,1);     /* ease-out-expo — the "crisp" snap */
  --ease-spring: cubic-bezier(.2,1.3,.4,1);    /* the ONLY overshoot — success marks */
  --speed:       .25s;                          /* back-compat */
  --dur-press:   90ms;                          /* :active feedback (<100ms) */
  --dur-quick:   160ms;                         /* hover, small state changes */
  --dur-base:    240ms;
  --dur-entrance:420ms;                         /* scroll reveals */
  --dur-progress:450ms;                         /* onboarding progress bar */
  --reveal-y:    14px;                          /* fade-up travel */
  --reveal-y-sm: 10px;
  --reveal-x:    24px;                          /* signature horizontal moves */
  --stagger:     70ms;                          /* between grid siblings (cap 6) */
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background: var(--beige);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* ---------- LAYOUT ---------- */
/* The content band. Every page's content lives in a .container so it
   tops out at --maxw and centers — this is the "stretched like the
   front page" contract. */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Break a child out to the full viewport width (for full-bleed section
   backgrounds / immersive panels) no matter how deeply it's nested. */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

.section { padding: 88px 0; }
.section--beige   { background: var(--beige); }
.section--white   { background: var(--white); }
.section--seafoam { background: var(--seafoam); }
.section--mint    { background: var(--mint); }

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  font: 700 14px/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}
.display { font: 800 clamp(34px,5vw,56px)/1.05 var(--font-display); color: var(--ink); }
.h2      { font: 800 clamp(28px,3.5vw,42px)/1.1 var(--font-display); color: var(--ink); }
.lead    { font: 400 19px/1.6 var(--font-body); color: var(--muted); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font: 700 16px var(--font-body);
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--coral); color: var(--ink); }
.btn--primary:hover { box-shadow: 0 8px 20px rgba(255,142,124,.35); }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: rgba(47,169,143,.08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- SURFACES ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.tag {
  font: 700 12px var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
}
.trust-strip { color: var(--muted); font: 500 14px var(--font-body); }
.badge {
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  display: grid; place-items: center;
  font: 800 22px var(--font-display);
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.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;
}

/* ============================================================
   SITE HEADER (shared)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--beige) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42,32,24,.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font: 800 22px/1 var(--font-display);
  letter-spacing: -.01em;
}
.wordmark .paw {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--mint);
  display: grid; place-items: center;
  font-size: 18px;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font: 700 15px var(--font-body);
}
.header-phone .ic { color: var(--teal); display: inline-flex; }
.header-phone .label { color: var(--muted); font-weight: 500; }

@media (max-width: 820px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header-phone .label { display: none; }
}

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