/* ==========================================================================
   Melty Moments — one-page concept
   Palette: warm ivory #fff8ef · cocoa #734d38 · peach #daa087
   ========================================================================== */

/* ---- Fonts (bundled locally, OFL-licensed: Baloo 2 + Nunito, latin) ---- */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/baloo2-400-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/nunito-400-800.woff2') format('woff2');
}

/* ---- Design tokens ---- */
:root {
  --ivory: #fff8ef;
  --cream: #fffdf8;
  --cocoa: #734d38;
  --cocoa-deep: #43291c;
  --peach: #daa087;
  --peach-deep: #b26b4b;
  --peach-soft: #f6d9c9;
  --blush: #fdeee2;
  --line: #ecd2bd;
  --danger: #a13d2d;
  --shadow-soft: 0 16px 36px -18px rgba(115, 77, 56, 0.35);
  --shadow-lift: 0 22px 44px -20px rgba(115, 77, 56, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: 'Baloo 2', 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--ivory);
  color: var(--cocoa-deep);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  font-weight: 700;
  color: var(--cocoa-deep);
}

p + p { margin-top: 0.9em; }

a { color: var(--cocoa); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--peach-deep); }

button { font: inherit; color: inherit; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
ul, ol { padding: 0; }

.wrap { width: min(1160px, 100% - 2.25rem); margin-inline: auto; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- Accessibility helpers ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--cocoa);
  color: var(--ivory);
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: var(--ivory); }

:focus-visible {
  outline: 3px solid var(--peach-deep);
  outline-offset: 2px;
  border-radius: 6px;
}
.site-foot :focus-visible, .finale :focus-visible { outline-color: var(--peach-soft); }

section[tabindex="-1"] { outline: none; }

/* ---- Type utilities ---- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--peach-soft);
  color: var(--cocoa-deep);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--peach-deep);
}

.micro {
  font-size: 0.82rem;
  color: var(--cocoa);
  margin-top: 0.6rem;
}

.sec-head { max-width: 640px; }
.sec-title {
  font-size: clamp(1.9rem, 3.4vw + 0.6rem, 2.9rem);
  margin-top: 0.9rem;
  letter-spacing: -0.01em;
}
.sec-sub { margin-top: 0.8rem; color: var(--cocoa); font-size: 1.05rem; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); position: relative; }
.section > .wrap { position: relative; z-index: 1; }

/* Decorative bleeds (hero glow, packaging tag) must never widen the page.
   overflow-x: clip does not create a scroll container, so the flavor rail
   and the sticky summary keep working. */
.hero, .flavors, .builder, .packaging, .faq, .finale, .site-foot { overflow-x: clip; }

/* Anchored sections stop clear of the sticky header */
#flavors, #build, #packaging, #faq { scroll-margin-top: 76px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0.72rem 1.5rem;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--cocoa); color: var(--ivory); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--cocoa-deep); color: var(--ivory); }

.btn-ghost { border-color: var(--cocoa); color: var(--cocoa); background: transparent; }
.btn-ghost:hover { background: var(--peach-soft); color: var(--cocoa-deep); }

.btn-peach { background: var(--peach); color: var(--cocoa-deep); box-shadow: var(--shadow-soft); }
.btn-peach:hover { background: var(--peach-soft); color: var(--cocoa-deep); }

.btn-text {
  background: none;
  border: none;
  color: var(--cocoa);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  padding: 0.5rem 0.4rem;
  cursor: pointer;
}
.btn-text:hover { color: var(--peach-deep); }
.btn-danger { color: var(--danger); }

.btn-lg { padding: 0.95rem 1.9rem; font-size: 1.08rem; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.92rem; }

/* ==========================================================================
   Header + navigation
   ========================================================================== */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 248, 239, 0.92);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--cocoa-deep);
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-tint { color: var(--peach-deep); }
.brand-sm .brand-mark { width: 32px; height: 32px; }
.brand-sm .brand-name { font-size: 1.1rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--cocoa);
  background: var(--cream);
  cursor: pointer;
}
.nav-toggle-box { position: relative; width: 20px; height: 14px; }
.nav-toggle-bar,
.nav-toggle-box::before,
.nav-toggle-box::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2.6px;
  border-radius: 2px;
  background: var(--cocoa);
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-box::before { top: 0; }
.nav-toggle-bar { top: 5.7px; }
.nav-toggle-box::after { top: 11.4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::before { top: 5.7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::after { top: 5.7px; transform: rotate(-45deg); }

.site-nav { display: none; }
.site-nav.open {
  display: block;
  position: absolute;
  top: calc(100% + 1px);
  left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 1rem 1.4rem 1.4rem;
}
.site-nav ul { list-style: none; }
.site-nav ul a {
  display: block;
  padding: 0.85rem 0.4rem;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--cocoa-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.site-nav ul a:hover { color: var(--peach-deep); }
.site-nav .nav-cta { margin-top: 1.1rem; width: 100%; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 1.6rem; }
  .site-nav ul { display: flex; gap: 1.4rem; }
  .site-nav ul a {
    padding: 0.4rem 0.1rem;
    font-size: 1rem;
    border-bottom: none;
    position: relative;
  }
  .site-nav ul a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 3px;
    border-radius: 2px;
    background: var(--peach);
    transition: right 0.2s ease;
  }
  .site-nav ul a:hover::after { right: 0; }
  .site-nav .nav-cta { margin-top: 0; width: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: clamp(2.4rem, 6vw, 4.5rem); position: relative; }

.hero-grid {
  display: grid;
  gap: 2.6rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.7rem, 5.6vw + 0.9rem, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-top: 1.1rem;
}
.hero-accent { display: block; color: var(--peach-deep); }

.lede {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 1vw + 0.6rem, 1.22rem);
  color: var(--cocoa);
  max-width: 34rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.hero-art {
  position: relative;
  width: min(420px, 100%);
  margin-inline: auto;
}
.hero-art > img { position: relative; z-index: 1; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: -6% -14%;
  background: radial-gradient(closest-side, var(--peach-soft), rgba(246, 217, 201, 0) 72%);
  z-index: 0;
}

.seal {
  position: absolute;
  top: -14px;
  right: -6px;
  width: clamp(104px, 26vw, 138px);
  z-index: 2;
  filter: drop-shadow(0 10px 18px rgba(115, 77, 56, 0.25));
}
.seal svg { width: 100%; height: auto; }
.seal-spin { transform-origin: 80px 80px; animation: seal-spin 28s linear infinite; }
.seal-text { font-family: var(--font-display); }

@keyframes seal-spin { to { transform: rotate(1turn); } }

.asset-note {
  font-size: 0.78rem;
  color: var(--cocoa);
  text-align: center;
  margin-top: 0.7rem;
  opacity: 0.92;
}

/* ---- Scallop dividers (scooped edges between sections) ---- */
.scallop {
  height: 32px;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  background-image: radial-gradient(34px 34px at 32px 34px, var(--sc, var(--blush)) 32px, rgba(0, 0, 0, 0) 33.5px);
  background-size: 64px 32px;
  background-repeat: repeat-x;
  background-position: 0 bottom;
}
.scallop-to-flavors { --sc: var(--blush); }
.scallop-to-builder { --sc: var(--ivory); }
.scallop-to-packaging { --sc: var(--peach-soft); }
.scallop-to-faq { --sc: var(--ivory); }
.scallop-to-finale { --sc: var(--cocoa); }

.flavors { background: var(--blush); }
.flavors .scallop, .builder .scallop, .packaging .scallop, .faq .scallop { margin-top: 0; padding-top: 0; }
.flavors { padding-bottom: 0; }
.builder { background: var(--ivory); }
.packaging { background: var(--peach-soft); }
.faq { background: var(--ivory); }

/* The scallop at the end of flavors bites into builder (ivory) */
.flavors > .scallop { --sc: var(--ivory); }
/* The scallop at the end of packaging bites into faq (ivory) */
.packaging > .scallop { --sc: var(--ivory); }
/* The scallop at the end of faq bites into finale (cocoa) */
.faq > .scallop { --sc: var(--cocoa); }

/* ==========================================================================
   Flavor rail
   ========================================================================== */
.flavors .sec-head { margin-bottom: 1.8rem; }

.rail-zone { position: relative; }

ul.flavor-rail {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-top: 0.75rem;
  padding-bottom: 2rem;
  /* gutter aligns the rail cards with the .wrap content edge: max(18px, (viewport - 1160px)/2) */
  padding-left: max(calc(50% - 580px), 1.125rem);
  padding-right: max(calc(50% - 580px), 1.125rem);
  scroll-padding-left: max(calc(50% - 580px), 1.125rem);
  scrollbar-width: thin;
  scrollbar-color: var(--peach) transparent;
}
ul.flavor-rail::-webkit-scrollbar { height: 8px; }
ul.flavor-rail::-webkit-scrollbar-thumb { background: var(--peach); border-radius: 4px; }
ul.flavor-rail::-webkit-scrollbar-track { background: rgba(115, 77, 56, 0.08); }

.flavor-card {
  flex: 0 0 auto;
  width: min(268px, 78vw);
  scroll-snap-align: start;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.1rem 1.3rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  position: relative;
}

.flavor-num {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--peach-deep);
  opacity: 0.9;
}

.scoop-stage {
  display: grid;
  place-items: center;
  background: var(--tint, var(--peach-soft));
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem 0.85rem;
  margin-bottom: 0.95rem;
}
.scoop-svg { width: 84px; height: 74px; }

.flavor-card h3 { font-size: 1.18rem; line-height: 1.2; }
.flavor-note { font-size: 0.92rem; color: var(--cocoa); margin-top: 0.4rem; flex-grow: 1; }

.flavor-meta { margin-top: 0.7rem; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--cocoa-deep); }
.per { font-size: 0.82rem; color: var(--cocoa); }

.add-btn { margin-top: 0.7rem; width: 100%; background: var(--cocoa); color: var(--ivory); }
.add-btn:hover { background: var(--cocoa-deep); color: var(--ivory); }

.in-box {
  min-height: 1.3em;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--peach-deep);
  text-align: center;
  margin-top: 0.45rem;
}

/* Flavor palettes (shared by cards + picker rows) */
.fl-1 { --tint: #fce4dc; --scoop: #e2796a; --scoop-dot: #fff8ef; }
.fl-2 { --tint: #fff3dd; --scoop: #f7cf8f; --scoop-dot: #b26b4b; }
.fl-3 { --tint: #fdeadd; --scoop: #f2a37c; --scoop-dot: #fff8ef; }
.fl-4 { --tint: #f0e2d8; --scoop: #6b4634; --scoop-dot: rgba(255, 248, 239, 0.92); }
.fl-5 { --tint: #f8ecd7; --scoop: #d8a96f; --scoop-dot: #734d38; }
.fl-6 { --tint: #f5e8d5; --scoop: #a5713d; --scoop-dot: #fff8ef; }

.scoop-stage .scoop-svg { color: var(--scoop, var(--peach)); }

.rail-btn {
  display: none;
  position: absolute;
  top: 34%;
  z-index: 5;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--cocoa);
  color: var(--ivory);
  cursor: pointer;
  place-items: center;
  box-shadow: var(--shadow-lift);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.rail-btn:hover { background: var(--cocoa-deep); transform: scale(1.06); }
.rail-btn svg { width: 22px; height: 22px; }
.flip-x { transform: scaleX(-1); }
.rail-prev { left: 0.6rem; }
.rail-next { right: 0.6rem; }

@media (min-width: 1240px) {
  .rail-btn { display: grid; }
}

.rail-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--cocoa);
  padding-bottom: 0.4rem;
}

/* ==========================================================================
   Builder
   ========================================================================== */
.builder-status {
  margin-top: 1.4rem;
  background: var(--peach-soft);
  color: var(--cocoa-deep);
  border-left: 5px solid var(--peach-deep);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  min-height: 1.2em;
}
.builder-status:empty { display: none; }

.noscript-note {
  margin-top: 1.2rem;
  background: var(--blush);
  border: 2px dashed var(--peach-deep);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-weight: 700;
}

.builder-grid {
  display: grid;
  gap: 1.6rem;
  margin-top: 1.6rem;
  align-items: start;
}

.steps {
  list-style: none;
  display: grid;
  gap: 1.3rem;
  min-width: 0;
}

.step {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.step-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.step-num {
  flex: none;
  width: 2.1rem; height: 2.1rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--peach-soft);
  color: var(--cocoa-deep);
  font-size: 1.05rem;
  font-weight: 800;
}

/* Step 1 — size cards */
.size-fieldset { border: none; padding: 0; }
.size-grid { display: grid; gap: 0.9rem; }

.size-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "radio name" "radio count" "radio desc";
  column-gap: 0.9rem;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  background: var(--ivory);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.size-card:hover { border-color: var(--peach); transform: translateY(-1px); }
.size-card input {
  grid-area: radio;
  width: 1.35rem; height: 1.35rem;
  accent-color: var(--cocoa);
}
.size-card .size-name { grid-area: name; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--cocoa-deep); }
.size-card .size-count { grid-area: count; font-weight: 800; font-size: 0.85rem; color: var(--peach-deep); text-transform: uppercase; letter-spacing: 0.05em; }
.size-card .size-desc { grid-area: desc; font-size: 0.92rem; color: var(--cocoa); }

.size-card.checked,
.size-card:has(input:checked) {
  border-color: var(--cocoa);
  background: var(--peach-soft);
}
.size-card:has(input:focus-visible) { outline: 3px solid var(--peach-deep); outline-offset: 2px; }

@media (min-width: 640px) {
  .size-grid { grid-template-columns: 1fr 1fr; }
  .size-card { grid-template-areas: "radio name" "radio count" "radio desc"; }
}

/* Step 2 — picker rows */
.picker { list-style: none; display: grid; gap: 0.65rem; }

.pick {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.8rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.7rem 0.6rem 0.6rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pick.is-picked { border-color: var(--peach-deep); box-shadow: inset 0 0 0 1px var(--peach-deep); }
.pick-scoop { color: var(--scoop, var(--peach)); }
.pick-scoop .scoop-svg { width: 44px; height: 39px; }
.pick-info { min-width: 0; display: grid; gap: 0.05rem; }
.pick-name { font-weight: 800; color: var(--cocoa-deep); line-height: 1.25; }
.pick-price { font-size: 0.8rem; color: var(--cocoa); }

.stepper { display: inline-flex; align-items: center; gap: 0.3rem; }
.step-btn {
  width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  border: 2px solid var(--cocoa);
  background: var(--peach-soft);
  color: var(--cocoa-deep);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.step-btn:hover { background: var(--peach); }
.step-btn:active { transform: scale(0.94); }
.step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.step-btn.is-off { opacity: 0.4; cursor: not-allowed; }

.pick-qty {
  min-width: 2.1rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--cocoa-deep);
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
  align-items: center;
}

/* Step 3 — review */
.review {
  background: var(--ivory);
  border: 1px dashed var(--peach);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  min-height: 4.4rem;
}
.review-empty { color: var(--cocoa); font-size: 0.98rem; }
.review-list { list-style: none; display: grid; gap: 0.45rem; }
.review-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.98rem;
}
.review-list .rv-name { font-weight: 700; }
.review-list .rv-price { font-variant-numeric: tabular-nums; color: var(--cocoa); }
.review-total { margin-top: 0.8rem; border-top: 2px solid var(--line); padding-top: 0.7rem; font-weight: 700; }
.review-total strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--cocoa-deep); }

.name-label { display: block; margin-top: 1.2rem; font-weight: 800; }
.name-label .opt { font-weight: 600; color: var(--cocoa); font-size: 0.9em; }
#box-name {
  width: 100%;
  margin-top: 0.45rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--cocoa-deep);
}
#box-name:focus { outline: 3px solid var(--peach-deep); outline-offset: 1px; border-color: var(--cocoa); }
#box-name::placeholder { color: rgba(115, 77, 56, 0.55); }

/* Step 4 */
.step-copy { color: var(--cocoa); margin-bottom: 1.1rem; max-width: 30rem; }

/* Side summary */
.builder-side { min-width: 0; }
.mini {
  background: var(--cocoa);
  color: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: var(--shadow-lift);
}
.mini-title { color: var(--ivory); font-size: 1.2rem; margin-bottom: 0.9rem; }
.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(255, 248, 239, 0.35);
  font-size: 0.98rem;
}
.mini-row b { font-family: var(--font-display); font-size: 1.2rem; }
.mini .btn-text { color: var(--peach-soft); margin-top: 0.9rem; padding-inline: 0; }
.mini .btn-text:hover { color: #fff; }
.mini .micro { color: var(--peach-soft); }

@media (min-width: 1000px) {
  .builder-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .mini { position: sticky; top: 92px; }
}

/* ==========================================================================
   Packaging story
   ========================================================================== */
.pack-grid { display: grid; gap: 2.4rem; align-items: center; }

.pack-art { position: relative; width: min(360px, 88%); margin-inline: auto; }
.pack-art .asset-note { margin-top: 3.2rem; }
.pack-tag {
  position: absolute;
  width: 38%;
  right: -8%;
  bottom: -7%;
  transform: rotate(8deg);
  filter: drop-shadow(0 12px 18px rgba(115, 77, 56, 0.28));
}

.pack-copy p { color: var(--cocoa-deep); }
.pack-copy > p { margin-top: 1rem; max-width: 36rem; }
.pack-copy .sec-title { margin-top: 0.9rem; }

.pack-notes {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}
.pack-notes li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid rgba(255, 253, 248, 0.9);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.97rem;
}
.pack-spark { width: 22px; height: 22px; flex: none; color: var(--peach-deep); margin-top: 0.1rem; }

.pull-quote {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.6vw + 0.5rem, 1.5rem);
  font-weight: 700;
  color: var(--cocoa-deep);
  border-left: 5px solid var(--cocoa);
  padding: 0.4rem 0 0.4rem 1.1rem;
  max-width: 30rem;
}

@media (min-width: 900px) {
  .pack-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; }
  .pack-art { width: min(400px, 100%); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-wrap { max-width: 780px; }
.faq-list { margin-top: 1.6rem; border-top: 2px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--cocoa-deep);
  cursor: pointer;
}
.faq-q:hover { color: var(--peach-deep); }

.faq-icon { position: relative; width: 18px; height: 18px; flex: none; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--peach-deep);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.faq-icon::before { left: 0; top: 7.7px; width: 18px; height: 2.6px; }
.faq-icon::after { left: 7.7px; top: 0; width: 2.6px; height: 18px; }
.faq-item.open .faq-icon::after { transform: scaleY(0); }

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.faq-item.open .faq-panel { grid-template-rows: 1fr; }
.faq-panel-inner { overflow: hidden; }
.faq-panel-inner p { padding: 0 0.2rem 1.2rem; color: var(--cocoa); max-width: 60ch; }

/* ==========================================================================
   Finale + footer
   ========================================================================== */
.finale {
  background: var(--cocoa);
  color: var(--ivory);
  padding: clamp(3.4rem, 8vw, 6rem) 0;
  background-image: url('assets/pattern.svg');
  background-size: 130px;
}
.finale-wrap { text-align: center; display: grid; justify-items: center; gap: 1.1rem; }
.finale-title {
  color: var(--ivory);
  font-size: clamp(2rem, 4.4vw + 0.6rem, 3.4rem);
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.finale-sub { color: var(--peach-soft); max-width: 44rem; font-size: 1.05rem; }
.finale .btn { margin-top: 0.6rem; }

.site-foot {
  background: var(--cocoa-deep);
  color: var(--peach-soft);
  padding: 2.1rem 0 2.4rem;
}
.foot-row {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}
.foot-note { max-width: 46rem; font-size: 0.95rem; }
.foot-meta { font-size: 0.85rem; color: rgba(246, 217, 201, 0.85); }
.foot-meta a { color: var(--peach-soft); }
.foot-meta a:hover { color: #fff; }

@media (min-width: 900px) {
  .foot-row {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
  }
  .foot-note { margin: 0; }
}

/* ==========================================================================
   Preview dialog
   ========================================================================== */
body:has(dialog[open]) { overflow: hidden; }

#preview-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(460px, calc(100% - 2rem));
  box-shadow: 0 30px 70px -20px rgba(67, 41, 28, 0.55);
  background: var(--cream);
  color: var(--cocoa-deep);
}
#preview-dialog::backdrop {
  background: rgba(67, 41, 28, 0.55);
  backdrop-filter: blur(2px);
}
#preview-dialog[open] { animation: pd-in 0.22s ease; }
@keyframes pd-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.pd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.5rem 0;
}
.pd-head h2 { font-size: 1.5rem; }

.pd-x {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--ivory);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cocoa);
}
.pd-x:hover { background: var(--peach-soft); color: var(--cocoa-deep); }

.pd-badge {
  margin: 0.7rem 1.5rem 0;
  display: inline-block;
  background: var(--peach-soft);
  color: var(--cocoa-deep);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pd-name { margin: 0.9rem 1.5rem 0; font-weight: 800; color: var(--peach-deep); }

.pd-list {
  list-style: none;
  margin: 1rem 1.5rem 0;
  display: grid;
  gap: 0.45rem;
}
.pd-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.45rem;
  font-size: 0.98rem;
}
.pd-list .pd-item-name { font-weight: 700; }
.pd-list .pd-item-price { font-variant-numeric: tabular-nums; color: var(--cocoa); }

.pd-total {
  margin: 1rem 1.5rem 0;
  font-weight: 700;
  border-top: 2px solid var(--line);
  padding-top: 0.8rem;
}
.pd-total strong { font-family: var(--font-display); font-size: 1.25rem; }

.pd-note { margin: 0.9rem 1.5rem 0; font-size: 0.9rem; color: var(--cocoa); }

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 1.2rem 1.5rem 1.5rem;
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .seal-spin { animation: none; }
  .btn:hover, .rail-btn:hover { transform: none; }
}

/* Larger breathing room on wide screens */
@media (min-width: 768px) {
  .wrap { width: min(1160px, 100% - 3rem); }
  .hero-grid { gap: 3.5rem; grid-template-columns: 1.05fr 0.95fr; }
  .hero-art { width: min(440px, 100%); }
  .flavor-card { width: 268px; }
  .step { padding: 1.7rem 1.7rem 1.8rem; }
}
