/* Better Doughnut — pack-first concept preview. Static, no dependencies.
   Fonts: local DM Sans via assets/fonts.css. */

:root {
  --bg: #fffef8;
  --ink: #17233d;
  --cobalt: #203dbe;
  --cobalt-deep: #172d8f;
  --line: #d9dbe3;
  --muted: #4a5470;
  --pink: #fff1f2;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
p, h1, h2, h3 { margin: 0; min-width: 0; }
h1, h2, h3 { font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
::selection { background: var(--cobalt); color: var(--bg); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--cobalt); color: var(--bg);
  font-weight: 700; text-decoration: none; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* Wordmark */
.wordmark {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  color: var(--cobalt); text-decoration: none;
}
.wordmark__better {
  font-weight: 700; font-size: 1.75rem; /* 28px */
  line-height: 0.9; letter-spacing: -0.045em; text-transform: lowercase;
}
.wordmark__doughnut {
  font-weight: 500; font-size: 0.75rem; /* 12px */
  line-height: 1; letter-spacing: 0.16em; text-transform: uppercase;
  margin-top: 0.3rem; padding-left: 0.1em;
}
.wordmark--small .wordmark__better { font-size: 1.5rem; }

/* Header: exactly 64px */
.site-header {
  height: var(--header-h);
  background: var(--bg);
}
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header__link {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0.5rem 0;
  font-size: 0.9375rem; font-weight: 700;
  text-decoration: underline; text-underline-offset: 0.2em;
  color: var(--cobalt);
}

/* Hero: full-bleed image with real HTML headline on top */
.hero {
  position: relative;
  height: clamp(440px, 48vw, 740px);
  background: var(--bg);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
}
.hero__overlay {
  position: absolute;
  z-index: 1;
  left: 5%; top: 7%;
  width: 28%;
}
.hero__title {
  font-size: clamp(2.25rem, 4.3vw, 4.125rem); /* Fits the actual clear area beside the pack. */
  line-height: 1.0;
  letter-spacing: -0.045em;
  color: var(--cobalt-deep);
}
.hero__caption {
  z-index: 1;
  position: absolute; right: 1rem; bottom: 0.75rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8125rem; /* 13px */
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 254, 248, 0.88);
  border-radius: 4px;
}

/* Promise strip */
.promise { background: var(--bg); }
.promise__inner { padding-block: 1.75rem; } /* 28px */
.promise__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.25rem 1rem;
}
.promise__note { font-size: 0.8125rem; color: var(--muted); }
.promise__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.promise__item {
  padding: 0.75rem 1rem 0.75rem 0;
  font-size: 1rem; font-weight: 700; line-height: 1.3;
}
.promise__item + .promise__item {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

/* Native details */
.details { border-top: 1px solid var(--line); }
.details__summary {
  display: flex; align-items: center;
  min-height: 2.75rem; /* 44px */
  padding: 0.5rem 0;
  font-weight: 700; font-size: 1rem;
  cursor: pointer;
  list-style: none;
}
.details__summary::-webkit-details-marker { display: none; }
.details__summary::before {
  content: "+";
  display: inline-block; width: 1.25rem;
  color: var(--cobalt); font-weight: 700;
}
.details[open] .details__summary::before { content: "–"; }
.details__body {
  padding: 0 0 1rem 1.25rem;
  font-size: 1rem; line-height: 1.55;
  max-width: 60ch;
}

/* Flavors */
.flavors {
  background: var(--pink);
  padding-block: 2.5rem;
}
.flavors__title {
  font-size: clamp(2rem, 3.5vw, 2.75rem); /* 32–44px */
  line-height: 1.05; letter-spacing: -0.03em;
}
.flavor-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.flavor-tab {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0.5rem 1rem;
  border: 1px solid var(--cobalt); border-radius: 999px;
  background: transparent; color: var(--cobalt);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 700; line-height: 1;
  cursor: pointer;
}
.flavor-tab:hover { background: rgba(32, 61, 190, 0.08); }
.flavor-tab[aria-selected="true"] { background: var(--cobalt); color: var(--bg); }
.flavors__lineup {
  width: 100%; height: auto;
  max-height: 260px;
  object-fit: contain;
  margin-top: 1.25rem;
}
.flavor-panel { margin-top: 1rem; }
.flavor-panel:focus-visible { outline-offset: 6px; }
.flavor-panel__name { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.flavor-panel__note { margin-top: 0.25rem; font-size: 1.0625rem; }

/* Story + footer */
.site-footer { background: var(--bg); padding-block: 2.5rem 2rem; }
.site-footer__title { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; } /* 22px */
.site-footer__line { margin-top: 0.5rem; font-size: 1rem; }
.details--footer { margin-top: 1rem; }
.site-footer__meta {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1.5rem;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.site-footer__legal { font-size: 0.8125rem; color: var(--muted); }

/* Motion — only when allowed */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .flavor-tab { transition: background-color 0.2s ease, color 0.2s ease; }
}

/* Mobile */
@media (max-width: 700px) {
  .hero {
    height: auto;
    aspect-ratio: 2 / 3;
    min-height: 0;
  }
  .hero__overlay {
    left: 24px; right: 24px; top: 28px;
    width: auto; max-width: none;
  }
  .hero__title { font-size: clamp(2rem, 10vw, 2.75rem); } /* Keep the headline above the mixed boxes. */
  .promise__inner { padding-block: 1.25rem; }
  .promise__list { grid-template-columns: 1fr; margin-top: 0.5rem; }
  .promise__item { padding: 0.5rem 0; }
  .promise__item + .promise__item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .flavors { padding-block: 2rem; }
  .flavors__lineup { max-height: 140px; margin-top: 1rem; }
}
@media (max-width: 320px) {
  .hero__overlay { left: 20px; right: 20px; top: 24px; }
  .hero__title { font-size: 2rem; } /* 32px */
}

/* A light scrim keeps headline contrast over the softly blurred store. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,254,248,.94), rgba(255,254,248,.80) 24%, rgba(255,254,248,0) 43%);
}
@media (max-width: 700px) {
  .hero::after { background: linear-gradient(180deg, rgba(255,254,248,.94), rgba(255,254,248,.82) 20%, rgba(255,254,248,0) 37%); }
}
