/* ===== Design tokens (colors from the First Batch label) ===== */
:root {
  --cream: #F6EFDF;
  --teal: #04605E;
  --cranberry: #9A1B2F;
  --brown: #5B3F2E;
  --orange: #D2700F;
  --ink: #1F3333;
  --white: #FFFFFF;
  --radius: 28px;
  --font-display: "Chewy", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cranberry); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.05; }
h1, h2 { font-family: var(--font-display); font-weight: 400; color: var(--teal); }
h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2.2rem, 6vw, 4rem); }
h3 { font-size: 1.35rem; color: var(--cranberry); }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  font-weight: 700; font-size: .8rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--brown); margin-bottom: .75rem;
}
.lede { font-size: 1.2rem; max-width: 34ch; }

/* ===== Buttons ===== */
.button {
  display: inline-block; padding: .85em 1.8em; border-radius: 999px;
  background: var(--cranberry); color: var(--white); font-weight: 700;
  text-decoration: none; border: 3px solid var(--cranberry);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(154, 27, 47, .3); }
.button-outline { background: transparent; color: var(--cranberry); }

/* ===== Announcement bar ===== */
.announce {
  background: var(--teal); color: var(--cream); text-align: center;
  font-weight: 600; font-size: .95rem; padding: .6rem 16px;
}
.announce p { margin: 0; }

/* ===== Header ===== */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.logo {
  font-family: var(--font-display); color: var(--teal);
  font-size: clamp(1.8rem, 4vw, 2.4rem); text-decoration: none; line-height: 1;
}
.header-link { font-weight: 700; color: var(--teal); text-decoration: none; }

/* ===== Sections ===== */
section { padding: clamp(3rem, 8vw, 6rem) 0; }
.band { background: var(--white); }
.band-teal { background: var(--teal); color: var(--cream); }
.band-teal h2 { color: var(--cream); }

/* ===== Hero ===== */
.hero { padding-top: 1rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1.2fr 1fr; }
.hero-copy h1 { margin-bottom: 1.25rem; }
/* Two bags stacked in one grid cell: chocolate tucked behind, maple in front. */
.hero-art { display: grid; place-items: center; container-type: inline-size; }
.hero-bag { grid-area: 1 / 1; display: block; }
.hero-bag-back { transform: translate(34%, -7%); }
.hero-bag-front { transform: translate(-30%, 4%); }
.hero-img {
  --tilt: -4deg;
  width: min(280px, 46vw, 58cqi); margin: 0 auto;
  filter: drop-shadow(0 22px 30px rgba(60, 40, 20, .25));
  transform: rotate(var(--tilt)); transition: transform .35s ease;
}
.hero-bag-back .hero-img { --tilt: 6deg; }
.hero-img:hover { transform: rotate(calc(var(--tilt) + 5deg)) translateY(-8px); }

/* ===== Bag illustration (swap for a photo later) ===== */
.bag {
  position: relative; width: min(320px, 72vw); aspect-ratio: 3 / 4; margin: 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #DDBF92, #B98F5C);
  border-radius: 20px 20px 34px 34px;
  box-shadow: 0 22px 44px rgba(60, 40, 20, .28);
  transform: rotate(-4deg); transition: transform .35s ease;
}
.bag::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 13%;
  border-radius: 20px 20px 0 0;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 4px, transparent 4px 9px);
}
.bag:hover { transform: rotate(2deg) translateY(-8px); }
.bag-label {
  width: 80%; margin-top: 12%; padding: 1.1rem .6rem; text-align: center;
  background: var(--white); border: 3px solid var(--cranberry); border-radius: 16px;
}
.bag-logo { display: block; font-family: var(--font-display); color: var(--teal); font-size: 2.5rem; line-height: 1; }
.bag-sub {
  display: block; margin: .45rem 0 .6rem; font-size: .55rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brown);
}
.bag-flavor { display: block; font-weight: 700; color: var(--cranberry); font-size: .95rem; line-height: 1.2; }
.bag-chocolate { background: linear-gradient(160deg, #8A6045, #5A3826); }
.bag-small { width: 210px; }
.bag-small .bag-logo { font-size: 1.7rem; }
.bag-small .bag-sub { font-size: .42rem; }
.bag-small .bag-flavor { font-size: .75rem; }

/* ===== Product cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; margin-top: 2rem; }
.card {
  position: relative; background: var(--cream); border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem; text-align: center;
  /* Cards share the parent's rows (photo, title, price, tagline, button) so prices
     and taglines line up even when one title wraps and another doesn't. */
  display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 0; justify-items: center;
}
.card > h3 { align-self: center; }
.card > .button { align-self: end; }
.button-disabled {
  background: transparent; color: var(--brown); border-color: rgba(91, 63, 46, .35);
  cursor: default;
}
.button-disabled:hover { transform: none; box-shadow: none; }
.card .bag { margin-bottom: 0; }
.price { font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.price span { font-size: 1rem; font-weight: 400; }
.ingredients { font-size: .95rem; max-width: 36ch; margin-inline: auto; }
.allergens { font-weight: 700; }
.buy-options { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.order-note { font-size: .9rem; margin-top: 1rem; }
.badge-soon {
  position: absolute; top: 1.25rem; right: 1.25rem; z-index: 1;
  background: #A85400; color: var(--white); font-weight: 700; font-size: .85rem;
  padding: .35em .9em; border-radius: 999px; transform: rotate(6deg);
}
.card-soon .bag { filter: saturate(.85); }

/* ===== Story ===== */
.story-grid { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; justify-content: center; }
.story-art img { width: 100%; max-width: 320px; margin: 0 auto; border-radius: var(--radius); box-shadow: 0 18px 36px rgba(60, 40, 20, .18); }

/* ===== Give back ===== */
.give-back { text-align: center; }
.give-back p { max-width: 56ch; margin: 0 auto; font-size: 1.2rem; }

/* ===== Ordering ===== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.step { background: var(--white); border-radius: var(--radius); padding: 1.75rem; }
.contact-line { font-weight: 600; }

/* ===== Footer ===== */
.site-footer { background: var(--brown); color: var(--cream); padding: 3rem 0 1.5rem; }
.site-footer a { color: var(--cream); }
.site-footer a:focus-visible { outline-color: var(--cream); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.site-footer .logo { color: var(--cream); display: block; margin-bottom: .75rem; }
.legal-title { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.copyright { margin-top: 2rem; font-size: .85rem; opacity: .8; }

/* ===== Brand ===== */
[hidden] { display: none !important; }
.logo-link { display: inline-block; line-height: 0; }
.logo-img { height: 44px; width: auto; }

/* ===== Home product card ===== */
.card-photo { position: relative; isolation: isolate; display: block; margin: 0 auto 1.5rem; width: 100%; max-width: 460px; padding: 1rem 0; }
.card-photo::before {
  content: ""; position: absolute; z-index: -1; inset: 12% 0 16% 0;
  background: url("/images/blob.svg") center / 100% 100% no-repeat;
}
.card-photo .bag-card {
  width: min(230px, 62%); aspect-ratio: 767 / 1154; transform: none;
  box-shadow: 0 14px 22px rgba(60, 40, 20, .22);
}
.bag-card .bag-logo { font-size: clamp(1.25rem, 5.5vw, 1.8rem); white-space: nowrap; }
.bag-card .bag-sub { font-size: clamp(.34rem, 1.4vw, .42rem); white-space: nowrap; letter-spacing: .16em; }
.bag-card .bag-flavor { font-size: clamp(.68rem, 2.6vw, .8rem); white-space: nowrap; }
.card-photo img { width: min(230px, 62%); margin: 0 auto; filter: drop-shadow(0 14px 22px rgba(60, 40, 20, .22)); transition: transform .3s ease; }
.card-photo:hover img, .card-photo:hover .bag-card { transform: translateY(-4px) rotate(-1deg); }
/* Duo: both bags stacked in one grid cell like the hero, chocolate tucked behind.
   translate/rotate compose with the hover transform above. */
.card-photo-duo { display: grid; place-items: center; }
.card-photo-duo img { grid-area: 1 / 1; }
.card-photo-duo .duo-back { translate: 22% -4%; rotate: 6deg; }
.card-photo-duo .duo-front { translate: -20% 3%; rotate: -4deg; }
.card h3 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.15; }
.card-title { color: inherit; text-decoration: none; }
.card-title:hover { text-decoration: underline; }
.card-tagline { font-style: italic; }
.details-link { font-weight: 700; }

/* ===== Product page ===== */
.pdp { padding-top: 1rem; }
.pdp-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.pdp-info h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: .75rem; }
.tagline { font-weight: 700; color: var(--brown); font-size: 1.15rem; }
.buy-options-start { justify-content: flex-start; margin-top: 1.5rem; }
.pdp-details { margin-top: 2rem; border-top: 2px solid rgba(91, 63, 46, .15); }
.pdp-details details { border-bottom: 2px solid rgba(91, 63, 46, .15); padding: 1rem 0; }
.pdp-details summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; color: var(--teal); }
.pdp-details details > p:first-of-type { margin-top: .75rem; }
.pdp-details .ingredients { max-width: none; margin-inline: 0; }

.stage { position: relative; }
.slides {
  position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); background: var(--white); scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--teal); font-size: 1.8rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
.gallery-arrow:focus-visible, .thumb:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.thumbs { display: flex; gap: .75rem; margin-top: 1rem; }
.thumb {
  width: 72px; height: 90px; padding: 0; border: 3px solid transparent; border-radius: 14px;
  overflow: hidden; background: var(--white); cursor: pointer;
}
.thumb[aria-current="true"] { border-color: var(--cranberry); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Thanks page ===== */
.thanks { text-align: center; min-height: 60vh; }
.thanks .lede { margin-inline: auto; }

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .pdp-grid { grid-template-columns: 1fr; gap: 2rem; }
  .logo-img { height: 36px; }
  .hero-grid, .story-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .story-art { order: 2; }
}

/* ===== Motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .bag, .bag:hover, .button:hover, .hero-img, .hero-img:hover,
  .card-photo:hover img, .card-photo:hover .bag-card { transform: none; }
}
