/* Hyde Park Pharmacy — Weight-loss design system "Clinical Editorial" (v1, 2026-06-26).
   ONE shared token + component layer (replaces per-page inline CSS). design-pro INNOVATIVE.
   Brand-locked: teal / dark-teal / cream / terracotta + Proxima Nova. WCAG-AA, reduced-motion aware.
   Scoped under .ds so it never fights the shared header/footer. */
:root {
  --teal: #0f5257; --dark-teal: #0A2E36; --ink: #14202a; --cream: #FAF7F2; --surface: #fff;
  --terracotta: #c47556; --terracotta-2: #a8542f; --terracotta-lt: #e9a986; --terracotta-ink: #a8542f;
  --muted: #5b6470; --line: #ece7dd;
  --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-card: 20px; --r-widget: 16px; --r-ctl: 12px;
  --e1: 0 2px 8px rgba(10,46,54,.05); --e2: 0 8px 28px rgba(10,46,54,.09); --e3: 0 20px 56px rgba(10,46,54,.16);
  --ease: cubic-bezier(.22,1,.36,1);
}

/* ---- Base (scoped) ---- */
.ds { font-family: 'Proxima Nova', -apple-system, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.6; }
.ds *, .ds *::before, .ds *::after { box-sizing: border-box; }
.ds-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.ds h1, .ds h2, .ds h3 { font-family: 'Proxima Nova', sans-serif; color: var(--dark-teal); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
.ds h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.015em; }
.ds h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.ds p { margin: 0; }

/* ---- Buttons ---- */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 15px 28px;
  border-radius: var(--r-ctl); font-weight: 700; font-size: 16px; text-decoration: none; border: none; cursor: pointer;
  background: linear-gradient(135deg, #0A2E36 0%, #0f5257 100%); color: #fff; box-shadow: 0 8px 22px rgba(15,82,87,.28);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease); touch-action: manipulation; }
.ds-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15,82,87,.34); filter: brightness(1.04); color: #fff; }
.ds-btn.t { background: var(--terracotta); box-shadow: 0 8px 22px rgba(168,84,47,.4); }
.ds-btn.t:hover { background: var(--terracotta-2); }
.ds-btn.ghost { background: transparent; color: var(--dark-teal); border: 1.5px solid var(--line); box-shadow: none; }
.ds-btn.ghost:hover { border-color: var(--teal); color: var(--teal); background: rgba(15,82,87,.04); }

/* ---- Eyebrow / section label (signature terracotta keyline) ---- */
.ds-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--terracotta-ink); margin-bottom: 14px; }
.ds-eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--terracotta); }

/* ---- Hero (full-bleed atmospheric overlay) ---- */
.ds-hero { position: relative; background: #0A2E36; color: var(--cream); overflow: hidden; min-height: 460px; display: flex; align-items: center; }
.ds-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(10,46,54,.96) 0%, rgba(10,46,54,.82) 38%, rgba(10,46,54,.48) 60%, rgba(10,46,54,.2) 100%); }
.ds-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-image: radial-gradient(rgba(233,169,134,.16) 1.2px, transparent 1.3px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(120deg, transparent 40%, #000 100%); mask-image: linear-gradient(120deg, transparent 40%, #000 100%); opacity: .5; }
.ds-hero .ds-wrap { position: relative; z-index: 3; padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px);
  display: block; }
.ds-hero .ds-hero-copy { max-width: 620px; }
.ds-hero-media { position: absolute; inset: 0; z-index: 0; }
.ds-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; display: block; }
.ds-hero-media::before { display: none; }
@media (max-width: 860px) {
  .ds-hero { min-height: 400px; }
  .ds-hero-media img { object-position: 55% 14%; }
}
.ds-hero .pill { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff;
  padding: 6px 15px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 20px; }
.ds-hero h1 { color: #fff; font-size: clamp(34px, 6vw, 60px); line-height: 1.03; max-width: 14ch; }
.ds-hero h1 em { font-style: normal; color: var(--terracotta-lt); }
.ds-hero .lead { color: rgba(250,247,242,.9); font-size: clamp(16px, 2vw, 19px); line-height: 1.55; max-width: 52ch; margin: 18px 0 28px; }
.ds-hero .ds-btn.t { box-shadow: 0 10px 30px rgba(168,84,47,.45); }
.ds-hero .sub { color: rgba(250,247,242,.7); font-size: 13px; margin-top: 14px; }
/* proof row */
.ds-proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }
.ds-proof span { display: inline-flex; align-items: center; gap: 8px; color: rgba(250,247,242,.86); font-size: 13.5px; font-weight: 500; }
.ds-proof svg { width: 17px; height: 17px; color: var(--terracotta-lt); flex-shrink: 0; }

/* ---- Evidence stat band ---- */
.ds-stat { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ds-stat .ds-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 40px; padding: clamp(28px,4vw,40px) 24px; }
.ds-stat .big { font-size: clamp(44px, 7vw, 68px); font-weight: 800; letter-spacing: -.03em; color: var(--terracotta-ink); line-height: 1; }
.ds-stat .cap { font-size: 15px; color: var(--ink); max-width: 30ch; line-height: 1.4; }
.ds-stat .cap b { color: var(--dark-teal); }
.ds-stat .src { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---- Sections ---- */
.ds-section { padding: clamp(44px, 6vw, 72px) 0; }
.ds-section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ds-section .head { max-width: 60ch; margin-bottom: 32px; }
.ds-section .head p { color: var(--muted); font-size: 16px; margin-top: 10px; }

/* ---- Cards ---- */
.ds-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ds-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px 24px; box-shadow: var(--e1);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); display: flex; flex-direction: column; }
.ds-card:hover { transform: translateY(-4px); box-shadow: var(--e2); }
.ds-card .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.ds-card h3 { margin-bottom: 6px; }
.ds-card .meta { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.ds-card .price { font-size: 15px; color: var(--dark-teal); font-weight: 700; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.ds-card .price small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
/* A trailing CTA in a card pins to the bottom so buttons line up across cards of unequal text length. */
.ds-card > .ds-btn:last-child { margin-top: auto; }

/* ---- Numbered steps ---- */
.ds-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.ds-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-widget); padding: 24px 22px; box-shadow: var(--e1); }
.ds-step .n { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #0A2E36, #0f5257); color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 14px; box-shadow: 0 6px 16px rgba(15,82,87,.28); }
.ds-step h3 { font-size: 17px; margin-bottom: 6px; }
.ds-step p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---- FAQ ---- */
.ds-faq { border: 1px solid var(--line); border-radius: var(--r-widget); background: var(--surface); margin-bottom: 12px; box-shadow: var(--e1); overflow: hidden; }
.ds-faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; color: var(--dark-teal); font-size: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary::after { content: "+"; color: var(--terracotta-ink); font-size: 22px; font-weight: 400; line-height: 1; transition: transform .2s var(--ease); }
.ds-faq[open] summary::after { transform: rotate(45deg); }
.ds-faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.ds-faq .a { padding: 0 22px 18px; color: var(--ink); font-size: 15px; line-height: 1.6; }

/* ---- Closing CTA band ---- */
.ds-cta { background: radial-gradient(120% 160% at 15% 0%, #0f5257 0%, #0A2E36 60%); color: var(--cream); border-radius: var(--r-card); padding: clamp(36px,5vw,56px); text-align: center; box-shadow: var(--e3); }
.ds-cta h2 { color: #fff; max-width: 22ch; margin: 0 auto 12px; }
.ds-cta p { color: rgba(250,247,242,.85); max-width: 52ch; margin: 0 auto 26px; font-size: 16px; }

/* ---- Compliance note ---- */
.ds-note { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---- Responsive ---- */
@media (max-width: 900px) { .ds-cards { grid-template-columns: 1fr 1fr; } .ds-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .ds-wrap { padding: 0 18px; }
  .ds-cards, .ds-steps { grid-template-columns: 1fr; }
  .ds-hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .ds-stat .ds-wrap { gap: 14px; }
  .ds-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-card, .ds-btn { transition: none; }
  .ds-card:hover, .ds-btn:hover { transform: none; }
  .ds-faq summary::after { transition: none; }
}

/* ============ LEGACY-BODY HARMONISATION (2026-06-26) ============
   The selector + Mounjaro pages keep their bespoke interactive widgets (dose card,
   price tables) but their section chrome now adopts the design system so the whole
   weight-loss section reads as ONE product. body-scoped to win over the per-page inline CSS. */
body .cards .card, body section.content .step, body section.content .pricing {
  border-radius: 18px; border-color: #ece7dd; box-shadow: var(--e1);
}
body .cards .card { transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
body .cards .card:hover { transform: translateY(-4px); box-shadow: var(--e2); }
/* Terracotta keyline on legacy section labels — echoes the .ds-eyebrow accent. */
body .section-label .sl-line { position: relative; }
body .section-label .sl-line::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 3px; border-radius: 2px; background: var(--terracotta);
}
body .section-label h2, body section.content > h2 { letter-spacing: -0.015em; color: var(--dark-teal); }
@media (prefers-reduced-motion: reduce) { body .cards .card:hover { transform: none; } }

/* ============ SCROLL-DRIVEN REVEAL (2026-06-26) ============
   CSS scroll-timeline: Chrome 115+. Graceful no-op on older browsers.
   Elements animate as they scroll into view — no JS needed. */
@keyframes wlRevealUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes wlRevealScale {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes wlRevealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Section headings */
    .ds-section .head {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 28%;
    }
    /* Cards stagger */
    .ds-card {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 32%;
    }
    /* Numbered steps */
    .ds-step {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 28%;
    }
    /* Stat big number — scale in */
    .ds-stat .big {
      animation: wlRevealScale linear both;
      animation-timeline: view(); animation-range: entry 0% entry 24%;
    }
    /* Stat caption */
    .ds-stat .cap {
      animation: wlRevealFade linear both;
      animation-timeline: view(); animation-range: entry 5% entry 30%;
    }
    /* CTA band */
    .ds-cta {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 22%;
    }
    /* Proof row items */
    .ds-proof span {
      animation: wlRevealFade linear both;
      animation-timeline: view(); animation-range: entry 0% entry 20%;
    }

    /* ---- Legacy-body sections (selector + Mounjaro pages use these classes) ---- */
    body .section-block .section-label,
    body .section-block > .section-note,
    body #wlPredictor, body #costCalc, body .cost-calc, body .wlp,
    body .note {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 26%;
    }
    /* Steps — staggered */
    body .steps .step {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 30%;
    }
    body .steps .step:nth-child(2) { animation-range: entry 4% entry 34%; }
    body .steps .step:nth-child(3) { animation-range: entry 8% entry 38%; }
    /* Treatment cards — staggered */
    body .cards .card {
      animation: wlRevealUp linear both;
      animation-timeline: view(); animation-range: entry 0% entry 32%;
    }
    body .cards .card:nth-child(2) { animation-range: entry 5% entry 37%; }
    body .cards .card:nth-child(3) { animation-range: entry 10% entry 42%; }
    body .cards .card:nth-child(4) { animation-range: entry 14% entry 46%; }
  }
}

/* ============ HERO ENTRANCE + LIFE (on-load, 2026-06-26) ============ */
@keyframes wlHeroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes wlHeroZoom { from { transform: scale(1.045); } to { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  /* Slow, subtle Ken-Burns on the hero image — adds life without distraction */
  .ds-hero-media img { animation: wlHeroZoom 16s var(--ease) forwards; will-change: transform; }

  /* Staggered entrance for the hero copy */
  .ds-hero .ds-hero-copy > * { animation: wlHeroUp 0.6s var(--ease) both; }
  .ds-hero .ds-hero-copy > .pill      { animation-delay: 0.05s; }
  .ds-hero .ds-hero-copy > h1         { animation-delay: 0.13s; }
  .ds-hero .ds-hero-copy > .lead      { animation-delay: 0.22s; }
  .ds-hero .ds-hero-copy > .ds-btn    { animation-delay: 0.31s; }
  .ds-hero .ds-hero-copy > .sub       { animation-delay: 0.38s; }
  .ds-hero .ds-hero-copy > .ds-proof  { animation-delay: 0.45s; }
}

/* Primary CTA — gentle one-shot shine sweep on first hover (tasteful, not infinite) */
.ds-btn.t { position: relative; overflow: hidden; }
.ds-btn.t::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .ds-btn.t:hover::after { animation: wlShine 0.7s var(--ease); }
}
@keyframes wlShine { from { left: -60%; } to { left: 130%; } }

/* Desktop scale-up: match the rest of the site (shop pages use body zoom 1.18);
   keeps wide-screen pages from feeling zoomed-out. Desktop only — mobile untouched
   (mobile-bot verified at true scale). */
@media (min-width: 901px) { body { zoom: 1.10; } }
