/* ==========================================================================
   QUAL Nutrition
   Brand: black, warm ivory, white, muted gray, charcoal.
   Packaging-derived warmth: cream + cocoa (sampled from the wrapper artwork).
   ========================================================================== */

:root {
  /* Brand */
  --black: #0B0B0B;
  --ivory: #F5F3EE;
  --white: #FFFFFF;
  --stone: #A6A39E;      /* muted gray: use on dark backgrounds (8:1), not for text on ivory */
  --charcoal: #292929;

  /* Derived from the packaging */
  --cream: #E4D4C6;
  --cocoa: #3B2419;
  --cocoa-deep: #17100C;

  /* Text-safe muted tone on ivory (about 6:1) */
  --ink-soft: #5E5B56;
  --line: rgba(41, 41, 41, 0.18);
  --line-dark: rgba(166, 163, 158, 0.32);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1280px;
  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: var(--black); color: var(--ivory);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 3px; }
.section--dark :focus-visible,
.section--waitlist :focus-visible,
.site-footer :focus-visible { outline-color: var(--cream); }

/* ---------- Type ---------- */
.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: 0;
}
.h2 { font-size: clamp(2rem, 4.6vw, 3.9rem); text-wrap: balance; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.75rem;
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem; line-height: 1;
  font-stretch: 112%; font-variation-settings: "wdth" 112;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--black); background: transparent;
  border: 1.5px solid var(--black); border-radius: 0;
  cursor: pointer; text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--black); color: var(--ivory); }
.btn--solid:hover { background: var(--cocoa); border-color: var(--cocoa); }
.btn--ghost:hover { background: var(--black); color: var(--ivory); }
.btn--sm { min-height: 42px; padding: 0 1.1rem; font-size: .72rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.section--dark .btn--solid,
.section--waitlist .btn--solid { background: var(--ivory); color: var(--black); border-color: var(--ivory); }
.section--dark .btn--solid:hover,
.section--waitlist .btn--solid:hover { background: var(--cream); border-color: var(--cream); }

.text-link {
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem; font-stretch: 112%;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: underline;
  text-underline-offset: .4em; text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-thickness: 2px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ivory) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }

.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  letter-spacing: .06em; text-decoration: none; color: var(--black);
}
.site-nav { display: none; gap: 2rem; margin-left: auto; margin-right: 1rem; }
.site-nav a { font-size: .9375rem; text-decoration: none; color: var(--charcoal); }
.site-nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
@media (min-width: 820px) { .site-nav { display: flex; } }
@media (max-width: 819px) { .site-header__inner { justify-content: space-between; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(1.75rem, 4.5vw, 4rem); overflow: clip; }

.hero__title { font-size: clamp(2.6rem, 11.6vw, 4.4rem); }
.hero__line { display: block; }
@media (min-width: 640px) { .hero__title { font-size: clamp(3.4rem, 9vw, 5.6rem); } }
@media (min-width: 960px) { .hero__title { font-size: min(6.4vw, 6.25rem); } }

.hero__intro {
  display: grid; gap: 1.75rem; align-items: end;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 860px) { .hero__intro { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; } }

.status-tag {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: .75rem; font-stretch: 112%;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cocoa);
}
.status-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cocoa); }

.hero__lede { max-width: 34rem; margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.3rem); line-height: 1.5; }

/* The stage: a soft white glow the bar floats in front of */
.stage {
  position: relative;
  margin-top: clamp(1.25rem, 3.5vw, 2.75rem);
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  background:
    radial-gradient(56% 62% at 50% 52%, var(--white) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory) 100%);
}
.stage__inner { position: relative; }

.concept-label {
  position: absolute; top: calc(-1 * clamp(2.6rem, 4vw, 3.1rem)); left: 0; z-index: 2;
  display: inline-flex; align-items: center; gap: .6rem; margin: 0;
  padding: .5rem .85rem;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(.625rem, 1.6vw, .75rem); font-stretch: 110%;
  letter-spacing: .14em; text-transform: uppercase; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--charcoal);
}
.concept-label__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cocoa); flex: none; }

.bar { position: relative; width: min(100%, 1180px); margin-inline: auto; isolation: isolate; }
.bar img {
  width: 100%; height: auto;
  filter: drop-shadow(0 2px 3px rgba(23, 16, 12, .16)) drop-shadow(0 26px 28px rgba(59, 36, 25, .22));
}
/* Contact shadow beneath the wrapper */
.bar::after {
  content: ""; position: absolute; z-index: -1;
  left: 10%; right: 10%; bottom: -5%; height: 9%;
  background: radial-gradient(closest-side, rgba(23, 16, 12, .32), rgba(23, 16, 12, 0));
  filter: blur(10px);
}

.caption { max-width: 44rem; margin: 1.5rem auto 0; text-align: center; font-size: .875rem; line-height: 1.5; color: var(--ink-soft); }
.caption--dark { color: var(--stone); }

/* Small screens: product first, then the words and buttons */
@media (max-width: 859px) {
  .hero { display: flex; flex-direction: column; }
  .hero > .wrap { display: contents; }
  .hero__title, .hero__intro { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
  .hero__title { order: 1; }
  .stage { order: 2; margin-top: 1rem; padding-top: 3.75rem; }
  .hero__intro { order: 3; margin-top: 1.5rem; padding-bottom: clamp(3rem, 8vw, 4rem); }
  .hero .cta-row .btn { flex: 1 1 14rem; }
}

/* The one orchestrated moment: the page-load sequence */
@media (prefers-reduced-motion: no-preference) {
  .hero__line, .hero__copy, .cta-row, .concept-label, .caption { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__line:nth-child(1) { animation-delay: .05s; }
  .hero__line:nth-child(2) { animation-delay: .17s; }
  .hero .hero__copy { animation-delay: .32s; }
  .hero .cta-row { animation-delay: .42s; }
  .bar--hero img { animation: lift 1.5s cubic-bezier(.16, .8, .2, 1) .35s both; }
  .bar--hero::after { animation: settle 1.5s ease-out .5s both; }
  .hero .concept-label { animation-delay: .9s; }
  .hero .caption { animation-delay: 1.1s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lift { from { opacity: 0; transform: translateY(34px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scaleX(.8); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section--dark { background: var(--black); color: var(--ivory); overflow-x: clip; }

/* ---------- Concept / targets ---------- */
.concept__head { display: grid; gap: 1.5rem; align-items: end; }
.concept__intro { margin: 0; max-width: 36rem; color: rgba(245, 243, 238, .86); }
@media (min-width: 960px) { .concept__head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; } }

.concept__body { display: grid; gap: 3.5rem; margin-top: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 960px) { .concept__body { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2.5rem, 6vw, 5.5rem); } }

.concept__figure { margin: 0; }
.bar--dark { width: 100%; }
.bar--dark::before {
  content: ""; position: absolute; inset: -18% -6%; z-index: -2;
  background: radial-gradient(closest-side, rgba(228, 212, 198, .16), rgba(228, 212, 198, 0));
}
.bar--dark img { filter: drop-shadow(0 30px 36px rgba(0, 0, 0, .65)); }
.bar--dark::after { background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); }

.targets__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem; font-stretch: 112%;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cream);
}
.targets__list { margin: 0; }
.target {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 1.25rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line-dark);
}
.target:last-child { border-bottom: 1px solid var(--line-dark); }
.target dd {
  grid-column: 1; grid-row: 1; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-size: clamp(3.25rem, 7vw, 5rem); line-height: .9; color: var(--ivory);
}
.target .unit { font-size: .5em; margin-left: .05em; text-transform: uppercase; }
.target dt {
  grid-column: 2; grid-row: 1;
  font-family: var(--font-display); font-weight: 600; font-size: .8125rem; font-stretch: 112%;
  letter-spacing: .16em; text-transform: uppercase; color: var(--stone);
}
.targets__note { margin: 1.25rem 0 0; font-size: .9375rem; line-height: 1.5; color: rgba(245, 243, 238, .86); }

.availability { margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--line-dark); }
.availability__status {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin: 0 0 1.25rem;
  font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 1.25rem; text-transform: uppercase;
}
.availability__label { font-weight: 600; font-size: .75rem; letter-spacing: .16em; color: var(--stone); }
.section--dark .text-link { color: var(--ivory); }

/* ---------- Development ---------- */
.dev { display: grid; gap: 3.5rem; }
@media (min-width: 960px) {
  .dev { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
  .dev__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.dev__intro p { max-width: 32rem; margin-top: 1.5rem; }

.detail {
  margin-top: 2rem; aspect-ratio: 2.9 / 1; max-width: 32rem;
  background-image: url("/assets/product/qual-chocolate-chip-concept-1485.webp");
  background-repeat: no-repeat; background-size: 313% auto; background-position: 11.8% 88.9%;
  background-color: var(--white);
}
@media (max-width: 959px) { .detail { max-width: none; } }

.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.milestone {
  position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1.25rem;
  padding-bottom: 2.25rem; counter-increment: step;
}
.milestone:last-child { padding-bottom: 0; }
.milestone::before {
  content: ""; position: absolute; left: calc(1.25rem - .5px); top: 2.5rem; bottom: 0; width: 1px; background: var(--line);
}
.milestone:last-child::before { display: none; }

.milestone__marker {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ivory); border: 1.5px solid var(--charcoal);
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem; color: var(--charcoal);
}
.milestone__marker::after { content: counter(step); }
.milestone[data-status="in-progress"] .milestone__marker { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.milestone[data-status="complete"] .milestone__marker { background: var(--black); border-color: var(--black); color: var(--ivory); }
.milestone[data-status="complete"] .milestone__marker::after { content: "\2713"; }

.milestone h3 {
  margin: .4rem 0 .4rem;
  font-family: var(--font-display); font-weight: 700; font-stretch: 108%; font-size: 1.2rem; line-height: 1.25;
}
.milestone p { margin: 0; max-width: 34rem; color: var(--ink-soft); }

.status {
  display: inline-block; margin-top: .8rem; padding: .3rem .65rem; border: 1px solid currentColor;
  font-family: var(--font-display); font-weight: 600; font-size: .6875rem; line-height: 1.2; font-stretch: 112%;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.milestone[data-status="upcoming"] .status::before { content: "Upcoming"; }
.milestone[data-status="in-progress"] .status::before { content: "In progress"; }
.milestone[data-status="complete"] .status::before { content: "Complete"; }
.milestone[data-status="in-progress"] .status { color: var(--cocoa); border-color: var(--cocoa); }
.milestone[data-status="complete"] .status { color: var(--black); border-color: var(--black); }

.dev__note { margin: 2.5rem 0 0 3.75rem; font-size: .9375rem; color: var(--ink-soft); }

/* ---------- Waitlist ---------- */
.section--waitlist {
  background: linear-gradient(180deg, var(--black) 0%, var(--cocoa-deep) 100%);
  color: var(--ivory);
}
.waitlist { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 960px) { .waitlist { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(3rem, 7vw, 6rem); } }
.waitlist__copy p { max-width: 32rem; margin-top: 1.5rem; color: rgba(245, 243, 238, .88); }
.waitlist__copy .waitlist__fine { margin-top: 1rem; font-size: .9375rem; color: var(--stone); }

.waitlist__panel { padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--line-dark); background: rgba(11, 11, 11, .55); }

.form { display: grid; gap: 1.5rem; }
.form[hidden], .success[hidden] { display: none; }

.field { display: grid; gap: .35rem; }
.field label { font-size: .9375rem; color: var(--ivory); }
.field__opt { color: var(--stone); }
.field input[type="text"], .field input[type="email"] {
  width: 100%; padding: .7rem 0; font: inherit; font-size: 1.0625rem; color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--stone); border-radius: 0;
  transition: border-color .2s ease;
}
.field input[type="text"]:focus, .field input[type="email"]:focus { outline: none; border-bottom-color: var(--ivory); box-shadow: 0 1px 0 0 var(--ivory); }
.field input[aria-invalid="true"] { border-bottom-color: #E8A08C; box-shadow: 0 1px 0 0 #E8A08C; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ivory); transition: background-color 9999s ease-out; }

.field--check { grid-template-columns: auto 1fr; align-items: start; gap: .85rem; }
.field--check input { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; accent-color: var(--cream); }
.field--check label { font-size: .9375rem; line-height: 1.5; color: rgba(245, 243, 238, .88); }
.field--check a { color: var(--ivory); }

.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__status { min-height: 1.5rem; margin: -.25rem 0 0; font-size: .9375rem; color: rgba(245, 243, 238, .9); }
.form__status.is-error { color: #F2B8A6; }
.form__noscript { margin: 0; color: var(--ivory); }

.success h3 { margin: 0 0 .75rem; font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 1.75rem; text-transform: uppercase; line-height: 1.05; }
.success p { margin: 0; color: rgba(245, 243, 238, .9); }
.success:focus { outline: none; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); } }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; display: block; padding: 1.35rem 3rem 1.35rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-stretch: 106%; font-size: 1.0625rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.55rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -.2rem; }
.faq details p { margin: 0; padding: 0 3rem 1.5rem 0; max-width: 38rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; background: var(--black); color: var(--ivory); }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line-dark); }
.brand--footer { color: var(--ivory); font-size: 1.75rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.site-footer__nav a { font-size: .9375rem; color: var(--ivory); text-underline-offset: .3em; }
.site-footer__disclosure { max-width: 52rem; margin: 2rem 0 1rem; font-size: .875rem; line-height: 1.55; color: var(--stone); }
.site-footer__legal { margin: 0; font-size: .8125rem; color: var(--stone); }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding-block: clamp(3rem, 7vw, 6rem); }
.page__inner { max-width: 44rem; }
.page h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1.5rem; }
.page h2 { margin: 2.25rem 0 .75rem; font-family: var(--font-display); font-weight: 700; font-stretch: 108%; font-size: 1.25rem; }
.page li { margin-bottom: .4rem; }
.page .meta { color: var(--ink-soft); font-size: .9375rem; }

/* ---------- Print ---------- */
@media print { .site-header, .btn { display: none; } }
