/* =====================================================================
   BASE: reset, typography, layout primitives and components.
   All values come from tokens.css. Edit this file to add components.
   ===================================================================== */

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);   /* keeps focused/anchored items out from under the sticky nav (WCAG 2.4.11) */
}
body {
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
::selection { background: color-mix(in oklch, var(--accent-fill) 28%, transparent); }

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

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font-weight: var(--fw-semibold);
}
.skip-link:focus { top: var(--space-3); }

/* Season-only content (e.g. a holiday offer) is hidden unless the seasonal
   layer is on. This rule lives here, not in holiday.css, so deleting the
   seasonal files can never make holiday content appear all year. */
html:not([data-season="holiday"]) .season-only { display: none; }

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

/* ---- Typography ------------------------------------------------------ */
h1, h2, h3, h4 { font-weight: var(--fw-semibold); line-height: var(--lh-snug); text-wrap: balance; }
p, li { text-wrap: pretty; }

.headline-hero {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-semibold);
}
.headline-display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.headline {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: var(--tracking-snug);
}
.title { font-size: var(--fs-h3); letter-spacing: var(--tracking-snug); }
.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  margin-bottom: var(--space-3);
}
.lead { font-size: var(--fs-lead); line-height: 1.38; color: var(--text-2); }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-small); }
.footnote { font-size: 0.75rem; color: var(--text-2); }
.text-strong { color: var(--text); font-weight: var(--fw-semibold); }

/* ---- Layout ---------------------------------------------------------- */
.container      { width: min(100% - 2 * var(--gutter), var(--w-content)); margin-inline: auto; }
.container-text { width: min(100% - 2 * var(--gutter), var(--w-text));    margin-inline: auto; }
.container-wide { width: min(100% - 2 * var(--gutter), var(--w-wide));    margin-inline: auto; }
.center { text-align: center; }
.center .lead, .center p { margin-inline: auto; }

.section { padding-block: var(--section-pad); background: var(--bg); color: var(--text); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }
.section > * + * { margin-top: var(--space-7); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.split {
  display: grid; gap: var(--space-7); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
}

/* ---- Navigation ------------------------------------------------------ */
/* The nav floats over the top of the first section (negative margin), so a
   dark hero runs up behind it. A light bar never sits above a black hero.
   Give .nav (and #nav-menu) .scheme-dark when the first section is dark. */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  margin-bottom: calc(-1 * var(--nav-h));
  color: var(--text);                        /* re-resolves inside .scheme-dark */
  background: var(--nav-bg-solid);
  border-bottom: 1px solid transparent;
  view-transition-name: site-nav;            /* stays put during page transitions */
}
/* Whatever section comes first gets extra top room for the floating nav */
main > .section:first-child { padding-top: calc(var(--section-pad) + var(--nav-h)); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav {
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--nav-bg-solid); } }

.nav__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--text); font-weight: var(--fw-semibold); font-size: 1.0625rem; letter-spacing: -0.01em;
}
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: var(--space-6); list-style: none; padding: 0; }
.nav__links a { color: var(--text); font-size: var(--fs-small); opacity: 0.86; padding-block: var(--space-2); }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav__links a[aria-current="page"] { font-weight: var(--fw-semibold); }
.nav__cta { font-size: var(--fs-small); }

.nav__toggle {
  display: none;
  inline-size: 44px; block-size: 44px; margin-right: -10px;
  background: none; border: 0; border-radius: var(--r-sm);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 20px; height: 20px; }

/* Mobile menu: a native popover, so it works with no JS */
.nav-menu {
  inset: var(--nav-h) 0 auto 0;
  width: 100%; max-width: none; margin: 0;
  border: 0; padding: var(--space-5) var(--gutter) var(--space-7);
  background: var(--nav-bg-solid); color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out),
              display var(--dur-2) allow-discrete, overlay var(--dur-2) allow-discrete;
  opacity: 0; transform: translateY(-8px);
}
.nav-menu:popover-open { opacity: 1; transform: none; }
@starting-style { .nav-menu:popover-open { opacity: 0; transform: translateY(-8px); } }
.nav-menu ul { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.nav-menu a { display: block; padding: var(--space-3) 0; font-size: 1.5rem; font-weight: var(--fw-semibold); color: var(--text); }

@media (max-width: 47.99rem) {
  .nav__links { display: none; }      /* the small CTA stays visible on phones, like a "Buy" button */
  .nav__toggle { display: inline-flex; }
}

/* ---- Buttons and links ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0.7em 1.4em;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 1.0625rem; font-weight: var(--fw-regular); line-height: 1.1;
  text-decoration: none;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease,
              border-color var(--dur-1) ease, transform var(--dur-1) ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-fill-hover); }
.btn--secondary { border-color: var(--accent-text); color: var(--accent-text); background: transparent; }
.btn--secondary:hover { background: var(--accent-text); color: var(--bg); }
.btn--small { min-height: 32px; padding: 0.4em 1em; font-size: var(--fs-small); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.center .btn-row { justify-content: center; }

/* "Learn more ›" text link with a chevron that nudges on hover */
.link-more { display: inline-flex; align-items: center; gap: 0.25em; font-size: 1.0625rem; }
.link-more::after {
  content: ""; width: 0.45em; height: 0.45em;
  border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
  transform: rotate(45deg); margin-left: 0.1em;
  transition: transform var(--dur-1) var(--ease-out);
}
.link-more:hover::after { transform: translateX(3px) rotate(45deg); }

/* ---- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  padding-block: calc(clamp(4.5rem, 3rem + 7vw, 9rem) + var(--nav-h)) clamp(3rem, 2rem + 5vw, 6rem);
  text-align: center;
  overflow: clip;
  background: var(--bg); color: var(--text);
}
.hero .lead { max-width: 36ch; margin: var(--space-4) auto 0; }
.hero .btn-row { justify-content: center; margin-top: var(--space-6); }
.hero__media { margin-top: clamp(3rem, 2rem + 4vw, 5rem); }

/* ---- Media ----------------------------------------------------------- */
.media {
  border-radius: var(--r-lg);
  overflow: clip;
  background: var(--surface-2);
}
.media > img, .media > video, .media > picture img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1; }
.media--bleed { border-radius: 0; }

/* Purposeful art when there is no photography yet: a soft lit stage,
   not a grey box. Replace with real imagery as soon as it exists. */
.art-stage {
  position: relative; isolation: isolate;
  background:
    radial-gradient(60% 70% at 50% 100%, color-mix(in oklch, var(--accent-fill) 35%, transparent), transparent 70%),
    radial-gradient(40% 50% at 20% 10%, color-mix(in oklch, var(--text) 8%, transparent), transparent 70%),
    var(--surface-2);
}

/* ---- Cards ----------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.section--alt .card { background: var(--surface); }
.section:not(.section--alt) .card { background: var(--bg-alt); }
.card__icon { width: 44px; height: 44px; color: var(--accent-text); }
.card .link-more { margin-top: auto; padding-top: var(--space-3); }

/* ---- Stats ----------------------------------------------------------- */
.stats { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.stat__num {
  display: block;
  font-size: var(--fs-display); font-weight: var(--fw-semibold);
  line-height: 1; letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--text-2); margin-top: var(--space-2); }

/* ---- Story (pinned scroll section): static fallback layout -----------
   Used on phones, with reduced motion, and in browsers without scroll
   timelines: picture beside the steps, never a giant full-width image. */
.story__stage { display: grid; gap: var(--space-7); align-items: center; }
.story__visual { width: min(100%, 30rem); justify-self: center; }
@media (min-width: 48rem) {
  .story__stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.story__steps { list-style: none; padding: 0; display: grid; gap: var(--space-8); }
.story__step .title { margin-bottom: var(--space-2); }
.story__visual > * + * { display: none; }   /* static layout shows the first frame only */
@media (prefers-reduced-motion: no-preference) and (min-width: 48rem) {
  @supports (animation-timeline: view()) { .story__visual > * + * { display: block; } }
}

/* ---- Quote ----------------------------------------------------------- */
.quote { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: var(--tracking-snug); font-weight: var(--fw-semibold); text-wrap: balance; }
.quote-cite { display: block; margin-top: var(--space-5); font-size: var(--fs-body); font-weight: var(--fw-regular); color: var(--text-2); font-style: normal; }

/* ---- FAQ (native disclosure) ----------------------------------------- */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) 0; font-size: 1.1875rem; font-weight: var(--fw-semibold);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--text-2); transition: transform var(--dur-2) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: var(--space-5); color: var(--text-2); max-width: 60ch; }

/* ---- Forms ----------------------------------------------------------- */
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--fs-small); font-weight: var(--fw-semibold); }
.field input, .field textarea, .field select {
  min-height: 48px; padding: 0.75em 1em;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
}
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; }

/* ---- Footer ---------------------------------------------------------- */
.footer {
  padding-block: var(--space-8) var(--space-7);
  background: var(--bg-alt); color: var(--text-2);
  font-size: 0.8125rem;
}
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer__grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.footer h2 { font-size: 0.8125rem; color: var(--text); margin-bottom: var(--space-3); }
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.footer__legal { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }
