:root {
  --butter: #fff4da;
  --cream: #fffbf0;
  --caramel-tint: #fbe6bd;
  --pistachio: #dfe8bf;
  --treacle: #2c1810;
  --cocoa: #654635;
  --line: #e6d3aa;
  --raspberry: #b3123f;
  --raspberry-dark: #8f0d31;
  --on-dark-muted: #e8d9c3;
  --radius: 14px;
  --font-display: "Gloock", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--butter);
  color: var(--treacle);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

h2 { font-size: clamp(2rem, 5vw, 3rem); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

.wrap {
  width: min(1140px, 100%);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--treacle);
  color: var(--cream);
}
.skip-link:focus { left: 12px; top: 12px; }

.sample-notice {
  padding: 8px 20px;
  background: var(--treacle);
  color: var(--cream);
  font-size: 0.9rem;
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark > span { margin-inline: -0.14em; color: var(--raspberry); }
.wordmark__logo { display: block; width: 52px; height: 52px; }
.footer-logo { display: block; width: 130px; height: 130px; margin-bottom: 14px; }

.hygiene { margin: 8px 0; font-size: 0.9rem; font-weight: 600; }
.hygiene a {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--pistachio);
  color: var(--treacle);
  text-decoration: none;
}
.hygiene a:hover { text-decoration: underline; color: var(--treacle); }

.certificate {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0 16px 16px;
  overflow: hidden auto;
  border: 0;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--treacle);
}
.certificate::backdrop { background: rgb(44 24 16 / 0.7); }
.certificate__head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
  background: var(--cream);
}
.certificate__head h2 { font-size: 1.35rem; }
.certificate__close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--caramel-tint);
  color: var(--treacle);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.certificate img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.certificate__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-menu { display: flex; align-items: center; gap: 22px; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
  font-size: 1rem;
}
.site-header nav a { text-decoration: none; white-space: nowrap; }
.site-header nav a:hover { color: var(--raspberry); }
.site-header nav a[aria-current="page"] { color: var(--raspberry); font-weight: 700; }

.site-header nav .nav-shop {
  padding: 7px 18px;
  background: var(--raspberry);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
}
.site-header nav .nav-shop[aria-current="page"] { color: #fff; }
.site-header nav .nav-shop:hover { background: var(--raspberry-dark); color: #fff; }

.basket-link {
  position: relative;
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  text-decoration: none;
}
.basket-link:hover { color: var(--raspberry); }
.basket-link__count {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--raspberry);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.menu-button {
  display: none;
  padding: 8px 18px;
  border: 2px solid var(--treacle);
  border-radius: 999px;
  background: transparent;
  color: var(--treacle);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.header-search input,
.shop-search input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--butter);
  color: var(--treacle);
  font: inherit;
}
.header-search input { width: 170px; padding: 6px 16px; font-size: 0.95rem; }
.header-search input::placeholder, .shop-search input::placeholder { color: var(--cocoa); }

/* Sweet-shop awning: stripes with a scalloped bottom edge */
.awning {
  --stripe: 44px;
  height: 46px;
  background: repeating-linear-gradient(
    90deg,
    var(--raspberry) 0 var(--stripe),
    var(--cream) var(--stripe) calc(var(--stripe) * 2)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 24px no-repeat,
    radial-gradient(circle at 50% 24px, #000 22px, transparent 22.5px) 0 0 / var(--stripe) 46px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% 24px no-repeat,
    radial-gradient(circle at 50% 24px, #000 22px, transparent 22.5px) 0 0 / var(--stripe) 46px repeat-x;
}

/* Hero */
.hero { padding: 32px 0 72px; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero h1 { font-size: clamp(2.75rem, 7vw, 5rem); }

.hero__lead {
  max-width: 34em;
  margin: 22px 0 28px;
  color: var(--cocoa);
  font-size: 1.25rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--raspberry);
  font-weight: 700;
}

.text-link {
  font-weight: 600;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--raspberry); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--raspberry);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--raspberry-dark); }
.btn--large { padding: 15px 30px; font-size: 1.125rem; }

/* Sections */
.section { padding: 80px 0; }
.section--mix { background: var(--pistachio); }
.section--tint { background: var(--caramel-tint); }
.section--dark { background: var(--treacle); color: var(--cream); }

.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head p { margin-top: 14px; font-size: 1.125rem; color: var(--cocoa); }
.section--dark .section__head p { color: var(--on-dark-muted); }

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.product {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product__art {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 8px;
}
.product__art svg { display: block; width: 74%; height: 100%; margin-inline: auto; }
.product__art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.product h3 { font-size: 1.45rem; }
.product h3 a { text-decoration: none; }
.product h3 a:hover { color: var(--raspberry); }

.product__desc { margin: 8px 0 10px; color: var(--cocoa); font-size: 1rem; line-height: 1.45; }

.product__allergens {
  margin-bottom: 16px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.product__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.product__price { font-size: 1.3rem; font-weight: 700; line-height: 1.1; }

.product__tag {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pistachio);
  font-size: 0.8rem;
  font-weight: 600;
}
.product__tag--christmas { background: var(--raspberry); color: #fff; }

.section__more { margin-top: 36px; text-align: center; }
.allergy-notice { max-width: 760px; margin-top: 28px; color: var(--cocoa); font-size: 0.95rem; }

/* A single product */
.product-page { padding: 24px 0 56px; }
.breadcrumb { margin-bottom: 20px; color: var(--cocoa); font-size: 0.95rem; }
.breadcrumb a { text-underline-offset: 3px; }
.product-page__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}
.product-page__art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}
.product-page__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-page__art svg { display: block; width: 70%; height: auto; }
.product-page h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
.product-page__price { margin: 12px 0; font-size: 1.6rem; font-weight: 700; }
.product-page__desc { color: var(--cocoa); font-size: 1.15rem; }
.product-page__deal {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--pistachio);
  font-weight: 500;
}
.product-page__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }

.field { display: grid; gap: 6px; max-width: 280px; margin-top: 16px; font-weight: 600; }
.field select {
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--treacle);
  font: inherit;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--treacle);
  border-radius: 999px;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--treacle);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { color: var(--raspberry); }
.stepper output { min-width: 26px; font-weight: 700; text-align: center; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.info-card { padding: 22px; border-radius: var(--radius); background: var(--caramel-tint); }
.info-card h2 { margin-bottom: 10px; font-size: 1.5rem; }
.info-card p { font-size: 1rem; }
.info-card p + p { margin-top: 8px; }
.info-card a { font-weight: 600; text-underline-offset: 3px; }
.related__title { margin-bottom: 24px; font-size: clamp(1.8rem, 4vw, 2.4rem); }

/* The 2 crust method */
.crust { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 40px; }
.crust .section__head { margin-bottom: 0; }
.crust__steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: crust; }
.crust__steps li { position: relative; padding-left: 58px; counter-increment: crust; }
.crust__steps li::before {
  content: counter(crust);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--raspberry);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.crust__steps h3 { margin-bottom: 4px; font-size: 1.45rem; }
.crust__steps p { color: var(--cocoa); }

/* Make your own */
.maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; gap: 32px; }
.maker__choices { display: grid; gap: 28px; }
.maker__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.maker__group legend { margin-bottom: 12px; padding: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.maker__search {
  width: 100%;
  max-width: 420px;
  margin-bottom: 14px;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--treacle);
  font: inherit;
}
.flavour-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  padding: 2px;
}
.shape-list { display: flex; gap: 8px; }
.shape-list .flavour-option { min-width: 110px; }
.flavour-option { position: relative; display: block; cursor: pointer; }
.flavour-option input { position: absolute; opacity: 0; }
.flavour-option span {
  display: block;
  padding: 9px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font-weight: 500;
  line-height: 1.25;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.flavour-option:hover span { border-color: var(--raspberry); }
.flavour-option input:checked + span { border-color: var(--treacle); background: var(--treacle); color: var(--cream); font-weight: 600; }
.flavour-option input:focus-visible + span { outline: 3px solid var(--raspberry); outline-offset: 2px; }
.maker__summary {
  position: sticky;
  top: 84px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--caramel-tint);
}
.maker__summary h2 { font-size: 1.7rem; }
.maker__summary .product-page__price { margin: 6px 0 12px; }
.maker__summary #maker-details { margin-bottom: 12px; font-size: 1rem; }
.maker__summary #maker-details p { margin-bottom: 8px; }
.maker__preview { position: relative; margin-bottom: 14px; }
.maker__fudge { display: block; width: 60%; height: auto; margin-inline: auto; overflow: visible; transform-origin: 50% 85%; }
.maker__fudge path, .maker__fudge ellipse { transition: fill 0.5s ease; }
.maker__topping path, .maker__topping ellipse, .maker__topping circle, .maker__topping rect { transition: none; }
.maker__fudge.is-wobbling { animation: fudge-wobble 0.7s cubic-bezier(0.3, 1.4, 0.5, 1); }
.maker__fudge.is-spinning-out { animation: fudge-spin-out 0.22s ease-in forwards; }
.maker__fudge.is-spinning-in { animation: fudge-spin-in 0.6s cubic-bezier(0.2, 1.5, 0.4, 1); }
.maker__topping.is-dropping { animation: topping-drop 0.6s cubic-bezier(0.3, 1.5, 0.5, 1); }
.maker__bit {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(44 24 16 / 0.15);
  pointer-events: none;
  animation: fudge-bit 0.75s cubic-bezier(0.15, 0.7, 0.4, 1) forwards;
}
#maker-title.is-new { animation: title-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes fudge-wobble {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.14, 0.84); }
  45% { transform: scale(0.92, 1.1) rotate(-3deg); }
  70% { transform: scale(1.04, 0.97) rotate(2deg); }
  100% { transform: scale(1, 1); }
}
@keyframes fudge-spin-out { to { transform: scale(0.15, 0.6) rotate(200deg); opacity: 0; } }
@keyframes fudge-spin-in { from { transform: scale(0.2, 0.5) rotate(-160deg); opacity: 0; } }
@keyframes topping-drop {
  0% { transform: translateY(-80px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes fudge-bit {
  0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--turn)) scale(0.4); opacity: 0; }
}
@keyframes title-pop { from { transform: translateY(10px) scale(0.96); opacity: 0; } }
.btn:disabled { background: #b9a48d; cursor: not-allowed; transform: none; }

/* Basket */
.basket { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; gap: 32px; }
.basket__lines { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.basket-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto 76px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}
.basket-line__art { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; }
.basket-line__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.basket-line__art svg { display: block; width: 100%; height: 100%; }
.basket-line__name { display: grid; justify-items: start; gap: 2px; font-weight: 600; line-height: 1.3; }
.basket-line__name a { text-decoration: none; }
.basket-line__name a:hover { color: var(--raspberry); }
.basket-line__remove {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--cocoa);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.basket-line__total { margin: 0; font-weight: 700; text-align: right; }
.basket-line .stepper button { width: 34px; height: 34px; }

.basket__summary { display: grid; gap: 14px; padding: 24px; border-radius: var(--radius); background: var(--caramel-tint); }
.basket__summary h2 { font-size: 1.7rem; }
.basket__summary dl { display: grid; gap: 8px; margin: 0; }
.basket__summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.basket__summary dd { margin: 0; font-weight: 600; }
.basket__saving { color: #1c6b3a; font-weight: 600; }
.basket__total { padding-top: 10px; border-top: 1px solid #d9bd85; font-size: 1.15rem; font-weight: 700; }
.basket__total dd { font-weight: 700; }
.basket__note { margin: 0; color: var(--cocoa); font-size: 0.95rem; }
.basket__message { margin: 0; color: var(--raspberry-dark); font-weight: 600; }
.basket__message:empty { display: none; }
.basket-empty { display: grid; justify-items: start; gap: 16px; font-size: 1.125rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--treacle);
  color: var(--cream);
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1), visibility 0.2s;
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast a { color: #ffcf70; font-weight: 700; text-underline-offset: 3px; }

/* Inner page headings */
.page-head { padding: 28px 0 44px; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.page-head__lead { max-width: 38em; margin: 16px 0 24px; color: var(--cocoa); font-size: 1.2rem; }
.page-head .tina h1 { margin-bottom: 18px; }
.page-head__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: center;
  gap: 40px;
}
.page-head__photo { display: block; width: 100%; height: auto; border-radius: 999px 999px 18px 18px; }

.section--shop { padding-top: 32px; background: var(--butter); }
.section--festive, .page-head--festive { background: var(--raspberry-dark); color: var(--cream); }
.section--festive .section__head p, .page-head--festive .page-head__lead { color: #ffe9ef; }
.section--festive .eyebrow, .page-head--festive .eyebrow { color: #ffcf70; }
.btn--light { background: var(--cream); color: var(--raspberry-dark); }
.btn--light:hover { background: #fff; }

/* Snow over the Christmas heading */
.page-head--festive { position: relative; overflow: clip; }
.page-head--festive .wrap { position: relative; }
.page-head--festive::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgb(255 255 255 / 0.75) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgb(255 255 255 / 0.45) 0 3px, transparent 3.5px);
  background-size: 110px 110px, 170px 170px;
  background-position: 0 0, 40px 60px;
  animation: snow 18s linear infinite;
  pointer-events: none;
}
@keyframes snow { to { background-position: 40px 440px, 0 740px; } }

/* Christmas teaser on the home page */
.teaser { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 40px; }
.teaser .section__head { margin-bottom: 0; }
.teaser .btn { margin-top: 10px; }
.teaser__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.teaser__photos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }

/* Search and filters on the shop page */
.shop-search { max-width: 620px; margin-bottom: 16px; }
.shop-search input { padding: 14px 24px; background: var(--cream); font-size: 1.125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px;
  border: 2px solid var(--treacle);
  border-radius: 999px;
  background: transparent;
  color: var(--treacle);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.chip:hover { color: var(--raspberry); border-color: var(--raspberry); }
.chip[aria-pressed="true"] { background: var(--treacle); border-color: var(--treacle); color: var(--cream); }
.shop-count { margin-bottom: 18px; color: var(--cocoa); font-weight: 500; }
.shop-empty { padding: 32px 0; font-size: 1.125rem; }

/* What goes in */
.ingredients { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: center; }
.ingredients .section__head { margin-bottom: 0; }
.ingredients__photo { display: block; width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 720px) {
  .ingredients { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Delivery */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.delivery-card {
  padding: 28px;
  border: 1px solid #5b4031;
  border-radius: var(--radius);
}
.delivery-card h2 { font-size: 1.7rem; }
.delivery-card__price { margin: 8px 0 12px; color: #ffcf70; font-size: 1.3rem; font-weight: 700; }
.delivery-card p:last-child { color: var(--on-dark-muted); }

/* Tina */
.tina {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}
.tina__art { max-width: 420px; }
.tina h2, .tina h1 { margin-bottom: 18px; }
.tina p:not(.eyebrow) { max-width: 36em; font-size: 1.125rem; }

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px 56px;
}

.faq details { border-bottom: 1px solid #d9bd85; }
.faq details:first-child { border-top: 1px solid #d9bd85; }

.faq summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
}
.faq summary:hover { color: var(--raspberry); }
.faq details p { padding-bottom: 18px; color: var(--cocoa); }

/* Footer */
.site-footer {
  padding: 56px 0 28px;
  background: var(--treacle);
  color: var(--on-dark-muted);
  font-size: 1rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin-bottom: 10px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
}

.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }

.site-footer__legal {
  margin-top: 36px;
  font-size: 0.875rem;
}

/* Policies page */
.policies { padding: 48px 0 80px; }
.policies .wrap { max-width: 760px; }
.policies h1 { margin-bottom: 16px; font-size: clamp(2.5rem, 6vw, 3.5rem); }
.policies h2 { margin: 44px 0 14px; font-size: 2rem; scroll-margin-top: 80px; }
.policies mark { padding: 0 4px; background: #ffd966; color: var(--treacle); }
.draft-note {
  padding: 14px 18px;
  background: #ffd966;
  border-radius: 10px;
  font-weight: 500;
}

/* Tablet and phone */
@media (max-width: 860px) {
  .hero { padding: 20px 0 56px; }
  .hero__inner, .tina, .faq { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 400px; margin-inline: auto; }
  .tina { gap: 28px; }
  .tina__art { max-width: 300px; }
  .delivery-grid, .teaser, .product-page__top, .basket, .maker, .crust { grid-template-columns: minmax(0, 1fr); }
  .product-page__top { gap: 24px; }
  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__inner > :first-child { grid-column: 1 / -1; }
  .page-head__split { grid-template-columns: minmax(0, 1fr); }
  .page-head__photo { max-width: 280px; margin-inline: auto; }
  .section { padding: 60px 0; }
}

@media (max-width: 1160px) {
  .menu-button { display: block; }
  .site-menu {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    padding: 16px 20px 24px;
    background: var(--cream);
    box-shadow: 0 18px 24px -18px rgb(44 24 16 / 0.5);
  }
  .site-menu.is-open { display: block; }
  .site-header nav { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 1.125rem; }
  .site-header nav a { padding-block: 8px; }
  .site-header nav .nav-shop { margin-top: 8px; padding: 9px 24px; }
  .header-search { margin-top: 14px; }
  .header-search input { width: 100%; padding: 10px 18px; font-size: 1rem; }
}

@media (max-width: 860px) {
  .maker__summary { position: static; }
  .flavour-list { max-height: 340px; }
}

@media (max-width: 560px) {
  .wordmark { gap: 7px; font-size: 1.35rem; }
  .wordmark__logo { width: 44px; height: 44px; }
  .flavour-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { padding-inline: 16px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product { padding: 12px; }
  .product h3 { font-size: 1.2rem; }
  .product__buy .btn { width: 100%; padding-inline: 8px; }
  .basket-line { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px 12px; }
  .basket-line .stepper { grid-column: 2; justify-self: start; }
  .basket-line__total { grid-column: 3; grid-row: 2; }
  .basket-line__art { grid-row: span 2; align-self: start; }
  .basket-line__name { grid-column: 2 / -1; }
  .delivery-card { padding: 22px; }
}

/* ------------------------------------------------------------------
   Motion and media
------------------------------------------------------------------- */

/* Page transitions between the pages */
@view-transition { navigation: auto; }

.site-header .wordmark { view-transition-name: wordmark; }

::view-transition-old(root) { animation: page-out 0.28s ease-in both; }
::view-transition-new(root) { animation: page-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes page-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(22px); } }

/* Scroll progress, along the bottom of the header */
.scroll-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--raspberry);
  transform: scaleX(0);
  transform-origin: left;
}

/* Awning unrolls when the page opens */
.awning {
  transform-origin: top;
  animation: awning-unroll 0.8s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
@keyframes awning-unroll { from { transform: scaleY(0); } }

/* Hero entrance */
.hero { overflow: clip; }
.line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; animation: line-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.line:nth-child(2) > span { animation-delay: 0.1s; }
.line:nth-child(3) > span { animation-delay: 0.2s; }
@keyframes line-rise { from { transform: translateY(105%); } }

.hero .eyebrow, .hero__lead, .hero__actions { animation: soft-rise 0.8s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero__lead { animation-delay: 0.45s; }
.hero__actions { animation-delay: 0.55s; }
@keyframes soft-rise { from { opacity: 0; transform: translateY(18px); } }

.hero__art {
  position: relative;
  width: min(100%, 440px);
  margin-inline: auto;
}

.arch {
  aspect-ratio: 880 / 1184;
  overflow: hidden;
  border-radius: 999px 999px 18px 18px;
  background: #a9631f;
  transform: translateY(var(--shift, 0));
  animation: arch-open 1.1s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes arch-open { from { clip-path: inset(100% 0 0 0 round 999px 999px 18px 18px); } to { clip-path: inset(0 0 0 0 round 999px 999px 18px 18px); } }

.arch__video { display: block; width: 100%; height: 100%; object-fit: cover; }

.float {
  position: absolute;
  height: auto;
  pointer-events: none;
  translate: 0 var(--shift, 0);
  filter: drop-shadow(0 12px 14px rgb(44 24 16 / 0.2));
}
.float--chunk { top: 8%; left: -18%; width: 34%; rotate: -14deg; animation: bob 7s ease-in-out infinite; }
.float--fudge { bottom: 12%; left: -13%; width: 30%; animation: bob 6s 0.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(3deg); } }

.stamp {
  position: absolute;
  right: -7%;
  bottom: 9%;
  width: 31%;
  overflow: visible;
  animation: stamp-in 0.7s 0.9s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.stamp text { font-family: var(--font-body); }
.stamp > text { font-family: var(--font-display); }
.stamp__ring { transform-origin: 100px 100px; animation: spin 22s linear infinite; }
@keyframes stamp-in { from { transform: scale(0) rotate(-40deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ticker */
.marquee {
  overflow: hidden;
  padding: 14px 0;
  background: var(--raspberry);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  white-space: nowrap;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__track span { display: inline-flex; align-items: center; }
.marquee__track span::after {
  content: "&";
  margin-inline: 0.9em;
  color: #ffc2d1;
}

/* Reveal on scroll (classes are added by script.js, so no script means no hiding) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Hover and press */
.btn { transition: background-color 0.15s, transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.95); }

.product { transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; }
.product.is-in:hover { transform: translateY(-5px); box-shadow: 0 16px 28px -14px rgb(44 24 16 / 0.35); transition-delay: 0s !important; }
.product__art svg { transition: transform 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.product:hover .product__art svg { transform: translateY(-5px) rotate(-4deg) scale(1.05); }
.product__art img { transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.product:hover .product__art img { transform: scale(1.05); }

/* Pinned "How it's made" story. Stacked by default; script.js adds .story--pinned. */
.story { background: var(--treacle); color: var(--cream); padding: 72px 0; }
.story__title { margin-bottom: 28px; }
.story__steps { margin: 0; padding: 0; list-style: none; }
.story__step { margin-bottom: 24px; }
.story__step h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.story__step p { color: var(--on-dark-muted); font-size: 1.125rem; }
.story__meter { display: none; }
.story__media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.story__frame { overflow: hidden; border-radius: 14px; background: #4a2c1c; aspect-ratio: 912 / 1152; }
.story__frame img, .story__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }

.story--pinned { height: 520vh; padding: 0; }
.story--pinned .story__sticky {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.story--pinned .story__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 56px;
  width: min(1140px, 100%);
}
.story--pinned .story__text { position: relative; padding-left: 26px; }
.story--pinned .story__steps { position: relative; min-height: 190px; }
.story--pinned .story__step {
  position: absolute;
  inset: 0 0 auto;
  margin: 0;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.story--pinned .story__step.is-active { opacity: 1; transform: none; }
.story--pinned .story__meter {
  display: block;
  position: absolute;
  inset: 4px auto 4px 0;
  width: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #5b4031;
}
.story--pinned .story__meter span {
  display: block;
  height: 100%;
  background: #ffcf70;
  transform: scaleY(0);
  transform-origin: top;
}
.story--pinned .story__media {
  position: relative;
  display: block;
  height: min(78svh, 620px);
  margin: 0;
  overflow: hidden;
  border-radius: 999px 999px 18px 18px;
  background: #4a2c1c;
}
.story--pinned .story__frame {
  position: absolute;
  inset: 0;
  border-radius: 0;
  aspect-ratio: auto;
  will-change: clip-path;
}

/* Chocolate drips running down from the dark section above */
.section--drips { position: relative; overflow: clip; padding-top: 190px; }
.drips { position: absolute; inset: 0 0 auto; height: 150px; pointer-events: none; }
.drips span {
  position: absolute;
  top: -100%;
  left: var(--x);
  width: var(--w);
  height: 100%;
  border-radius: 0 0 999px 999px;
  background: var(--treacle);
  transform: translateY(calc(var(--p, 0) * var(--d) * 100%));
}

/* Tina's picture */
.tina__art { position: relative; }
.tina__art > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  translate: 0 var(--shift, 0);
  clip-path: inset(0 0 0 0 round 18px);
  transition: clip-path 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tina__art.art-reveal:not(.is-in) > img:first-child { clip-path: inset(100% 0 0 0 round 18px); }
.tina__art { z-index: 1; }

/* Smoothly opening FAQs, where the browser supports it */
:root { interpolate-size: allow-keywords; }
.faq details::details-content {
  height: 0;
  overflow: clip;
  transition: height 0.35s ease, content-visibility 0.35s allow-discrete;
}
.faq details[open]::details-content { height: auto; }

@media (max-width: 860px) {
  .story--pinned .story__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 20px;
  }
  .story--pinned .story__media { order: -1; height: 46svh; width: min(100%, 340px); margin-inline: auto; }
  .story--pinned .story__steps { min-height: 150px; }
  .story__title { margin-bottom: 14px; font-size: 1.5rem; font-family: var(--font-body); font-weight: 700; color: #ffcf70; }
  .hero__art { width: min(78%, 320px); margin-top: 44px; }
  .float--chunk { top: 16%; left: -15%; width: 30%; }
  .float--fudge { left: -14%; }
  .stamp { right: -12%; }
  .section--drips { padding-top: 120px; }
  .drips { height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
