/* ============================================================
   CHOCOLOCO — Core styles, homepage universe, chrome
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,800&family=Lilita+One&family=Nunito:wght@400;600;700;800&family=Pacifico&display=swap");

:root {
  --cocoa: #2b1a14;
  --cocoa-mid: #4a2c2a;
  --milk: #c47a3a;
  --milk-light: #e8b86d;
  --caramel: #d4a017;
  --cream: #fff6e4;
  --cream-2: #fffaf5;
  --strawberry: #ec407a;
  --mint: #26a69a;
  --mint-deep: #00695c;
  --yellow: #ffe082;
  --pink: #f8bbd0;
  --white: #fffefb;
  --foil: #f3d19a;
  --shadow: 0 18px 40px rgba(43, 26, 20, 0.18);
  --radius: 28px;
  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--cocoa);
  background: var(--cream-2);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .display {
  font-family: "Lilita One", "Baloo 2", cursive;
  letter-spacing: 0.02em;
  margin: 0 0 0.4em;
}
.editorial { font-family: "Fraunces", serif; }

.wrap { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.wrap-wide { width: min(1440px, calc(100% - 24px)); margin-inline: auto; }

.candy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 0 #7a3e1d, 0 14px 24px rgba(0,0,0,.15);
  transform: translateY(0);
  transition: transform .15s, box-shadow .15s;
}
.candy-btn:hover { transform: translateY(2px); box-shadow: 0 6px 0 #7a3e1d, 0 10px 18px rgba(0,0,0,.12); }
.candy-btn:active { transform: translateY(8px); box-shadow: 0 0 0 #7a3e1d; }
.candy-btn.brown { background: linear-gradient(#c47a3a, #8b4513); color: #fff8e7; }
.candy-btn.pink { background: linear-gradient(#ff7eb3, #ec407a); color: #fff; box-shadow: 0 8px 0 #ad1457, 0 14px 24px rgba(0,0,0,.15); }
.candy-btn.mint { background: linear-gradient(#80cbc4, #26a69a); color: #00332e; box-shadow: 0 8px 0 #00695c, 0 14px 24px rgba(0,0,0,.15); }
.candy-btn.cream { background: #fff6e4; color: var(--cocoa); box-shadow: 0 8px 0 #d4a017, 0 14px 24px rgba(0,0,0,.12); }
.candy-btn.sm { padding: 8px 14px; font-size: 13px; box-shadow: 0 4px 0 #7a3e1d; }

/* WAVES */
.wave { display: block; width: 100%; height: 90px; }
.wave svg { width: 100%; height: 100%; display: block; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: linear-gradient(180deg, #4a2c2a 0%, #2b1a14 100%);
  color: #fff6e4;
  box-shadow: 0 10px 30px rgba(43,26,20,.35);
}
.announcement {
  background: repeating-linear-gradient(90deg, #c47a3a 0 18px, #d4a017 18px 36px);
  color: #2b1a14;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
  letter-spacing: 0.08em;
}
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 10px 22px 14px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff6e4;
}
.logo-mark {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(#c47a3a, #6b2d12);
  display: grid; place-items: center;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.15), 0 8px 0 #1a0f0a;
  position: relative;
  overflow: hidden;
}
.logo-mark::before {
  content: "";
  width: 34px; height: 18px; border-radius: 6px;
  background: linear-gradient(#6b2d12, #3e1f10);
  box-shadow: 0 0 0 3px #e8b86d;
}
.logo-mark::after {
  content: "";
  position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ffe082;
}
.logo-type { line-height: 1; }
.logo-type strong {
  font-family: "Lilita One", cursive;
  font-size: 28px;
  display: block;
  background: linear-gradient(#ffe082, #ffcc80);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-type small { font-family: "Pacifico", cursive; font-size: 12px; opacity: .85; }

.nav-main { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.nav-main a {
  color: #fff6e4; font-weight: 800; font-size: 14px;
  padding: 8px 10px; border-radius: 999px;
}
.nav-main a:hover, .nav-main a.active { background: rgba(255,224,130,.18); color: #ffe082; }

.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,246,228,.12); color: #fff6e4;
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.icon-btn .count {
  position: absolute; top: -4px; right: -4px;
  background: #ec407a; color: #fff; font-size: 11px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center;
}
.search-pill {
  display: flex; align-items: center; gap: 8px;
  background: #fff6e4; color: var(--cocoa);
  border-radius: 999px; padding: 8px 14px; min-width: 220px;
}
.search-pill input {
  border: 0; outline: 0; background: transparent; width: 100%; font-weight: 700;
}
.burger { display: none; }

/* SEARCH DROPDOWN */
.search-suggest {
  position: absolute; top: calc(100% + 8px); right: 0; left: auto;
  width: min(420px, 90vw); background: #fffefb; color: var(--cocoa);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; display: none; z-index: 90;
}
.search-suggest.open { display: block; }
.search-suggest a {
  display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px dashed #f3d19a;
}
.search-suggest a:hover { background: #fff6e4; }
.search-wrap { position: relative; }

/* FACTORY INTRO */
.factory-intro {
  position: relative;
  min-height: 92vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,224,130,.35), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(236,64,122,.2), transparent 30%),
    linear-gradient(180deg, #5d3a2a 0%, #2b1a14 45%, #1a0f0a 100%);
  color: #fff6e4;
  overflow: hidden;
  display: grid; place-items: center;
  text-align: center;
  padding: 60px 16px 100px;
}
.factory-intro h1 {
  font-size: clamp(38px, 7vw, 86px);
  line-height: 0.95;
  text-shadow: 0 8px 0 #1a0f0a;
  max-width: 16ch;
  margin-inline: auto;
}
.factory-intro p.lede {
  font-size: clamp(18px, 2.4vw, 28px);
  max-width: 22ch;
  margin: 12px auto 28px;
  font-weight: 700;
  color: #ffe082;
}
.factory-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.float-choco {
  position: absolute; pointer-events: none;
  border-radius: 10px;
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}
.steam {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.12);
  filter: blur(8px);
  animation: steam 6s ease-in-out infinite;
}
@keyframes steam {
  0% { transform: translateY(20px) scale(.8); opacity: .2; }
  100% { transform: translateY(-80px) scale(1.3); opacity: 0; }
}
.bean {
  position: absolute; width: 22px; height: 30px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 30% 30%, #8d6e63, #3e2723);
  box-shadow: inset -4px -6px 0 rgba(0,0,0,.25);
  animation: beanspin 10s linear infinite;
}
@keyframes beanspin { to { transform: rotate(360deg) translateX(8px); } }

/* CONVEYOR */
.conveyor-section {
  background: #3e2723;
  color: #fff6e4;
  padding: 28px 0 10px;
  position: relative;
}
.conveyor-section h2 { text-align: center; font-size: clamp(28px, 4vw, 48px); color: #ffe082; }
.belt-window { overflow: hidden; padding: 20px 0 40px; }
.belt {
  display: flex; gap: 22px; width: max-content;
  animation: belt 40s linear infinite;
}
.belt:hover { animation-play-state: paused; }
@keyframes belt { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.belt-track {
  height: 18px;
  background: repeating-linear-gradient(90deg, #1a0f0a 0 16px, #5d4037 16px 32px);
  border-top: 6px solid #8d6e63;
  border-bottom: 6px solid #1a0f0a;
}

/* FINDER */
.craving {
  background: linear-gradient(180deg, #fff0f5, #fff6e4);
  padding: 80px 0;
}
.craving h2 { text-align: center; font-size: clamp(32px, 5vw, 64px); }
.flavor-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin: 28px 0;
}
.flavor-pill {
  border: 0; cursor: pointer;
  padding: 14px 20px; border-radius: 999px;
  font-weight: 800; font-size: 16px;
  background: #fff; box-shadow: 0 6px 0 rgba(43,26,20,.12);
}
.flavor-pill.active { background: #ec407a; color: #fff; box-shadow: 0 6px 0 #ad1457; }
.finder-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; min-height: 120px; }

/* BAR WALL */
.bar-wall {
  background: #2b1a14;
  padding: 70px 0 90px;
  color: #fff6e4;
}
.bar-wall h2 { text-align: center; font-size: clamp(32px, 5vw, 60px); }
.wall-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 90px;
  gap: 14px;
  margin-top: 30px;
}

/* CLASSIC EDITORIAL */
.classic-edit {
  background: #fffaf5;
  padding: 90px 0;
}
.classic-edit h2 { font-family: "Fraunces", serif; font-size: clamp(36px, 6vw, 72px); text-align: center; }
.edit-row {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  align-items: center; margin: 50px 0;
}
.edit-row.reverse { grid-template-columns: .9fr 1.1fr; }
.edit-copy h3 { font-size: 42px; }
.edit-copy p { font-size: 18px; line-height: 1.7; }

/* FLAVOR MAP */
.flavor-map {
  background: radial-gradient(circle at center, #ffe082 0 18%, #fff0f5 18% 100%);
  padding: 90px 0 110px;
}
.flavor-map h2 { text-align: center; font-size: clamp(32px, 5vw, 58px); }
.map-stage {
  position: relative; width: min(620px, 92vw); height: min(620px, 92vw);
  margin: 40px auto 20px;
  overflow: hidden;
}
.map-core {
  position: absolute; inset: 32%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #c47a3a, #3e1f10);
  box-shadow: inset 0 -20px 0 rgba(0,0,0,.2), 0 20px 40px rgba(0,0,0,.2);
  display: grid; place-items: center; color: #fff6e4; text-align: center;
  font-family: "Lilita One", cursive; font-size: 22px; z-index: 2;
}
.map-node {
  position: absolute; width: 110px; height: 110px; border-radius: 50%;
  border: 0; cursor: pointer; font-weight: 800;
  box-shadow: var(--shadow);
  display: grid; place-items: center; text-align: center; padding: 8px;
}
.map-results { margin-top: 20px; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* CHOCOLATE BOX */
.box-section {
  background: #6b2d12;
  padding: 80px 0;
  color: #fff6e4;
}
.lid-box {
  background: linear-gradient(#8b4513, #5d2a0c);
  border: 10px solid #d4a017;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 0 #3e1f10, var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* BUILDER */
.builder-section {
  background: linear-gradient(180deg, #fff6e4, #ffe0b2);
  padding: 90px 0;
}
.builder-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start;
}
.step-card {
  background: #fff; border-radius: 24px; padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 10px 0 rgba(212,160,23,.25);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid #f3d19a; background: #fffaf5; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font-weight: 800;
}
.chip.on { background: #c47a3a; color: #fff; border-color: #7a3e1d; }
.preview-stage {
  position: sticky; top: 110px;
  background: #4a2c2a; color: #fff6e4; border-radius: 28px; padding: 24px;
  min-height: 420px; text-align: center;
}

/* WEEKLY */
.weekly {
  position: relative;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,224,130,.5), transparent 40%),
    linear-gradient(120deg, #1a0f0a, #4a2c2a 50%, #ad1457);
  color: #fff6e4;
  padding: 90px 0;
}
.weekly-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.weekly h2 { font-size: clamp(28px, 4vw, 44px); color: #ffe082; }

/* DARK LAB */
.dark-lab {
  background: #0e0a08;
  color: #efebe9;
  padding: 90px 0;
  font-family: "Nunito", sans-serif;
}
.dark-lab h2 { font-family: "Fraunces", serif; color: #d4af37; font-size: clamp(32px, 5vw, 56px); }
.pct-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.pct-btn {
  width: 88px; height: 88px; border-radius: 50%; border: 3px solid #d4af37;
  background: transparent; color: #d4af37; font-weight: 800; cursor: pointer;
}
.pct-btn.on { background: #d4af37; color: #0e0a08; }
.lab-meter {
  height: 18px; border-radius: 99px; background: #1a120c; overflow: hidden; margin: 16px 0;
}
.lab-meter span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #c47a3a, #3e1f10 70%, #000);
  width: 70%;
  transition: width .4s;
}

/* MILK CLOUD */
.milk-cloud {
  background: linear-gradient(180deg, #fff8e7, #ffe0b2 60%, #f8bbd0);
  padding: 90px 0 120px;
  position: relative; overflow: hidden;
}
.cloud {
  position: absolute; background: rgba(255,255,255,.65); border-radius: 50%;
  filter: blur(2px);
}
.cloud-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; position: relative; z-index: 2; }

/* FRUIT */
.fruit-sec {
  background: linear-gradient(160deg, #fce4ec, #fff3e0 40%, #e8f5e9);
  padding: 90px 0;
}
.fruit-masonry {
  columns: 3; column-gap: 16px;
}
.fruit-masonry .item { break-inside: avoid; margin-bottom: 16px; }

/* CRUNCH */
.crunch-sec {
  background: #fff3e0;
  padding: 80px 0;
}
.crunch-mix {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

/* GIFTS */
.gifts-sec {
  background: #4a148c;
  color: #fff;
  padding: 90px 0;
}
.gift-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px;
}
.gift-card {
  background: #fff; color: var(--cocoa); border-radius: 8px 8px 18px 18px;
  padding: 18px 10px 22px; text-align: center; font-weight: 800;
  box-shadow: 0 12px 0 rgba(0,0,0,.2);
  position: relative;
}
.gift-card::before {
  content: ""; position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  width: 46px; height: 18px; background: #d4a017; border-radius: 4px;
}

/* MINI SHELF */
.mini-shelf {
  background: #fff0f5;
  padding: 70px 0;
}
.shelf-scroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.shelf-scroll > * { scroll-snap-align: start; flex: 0 0 180px; }

/* SIZES */
.sizes-sec {
  background: #fffaf5;
  padding: 80px 0;
}
.size-line {
  display: flex; align-items: end; justify-content: center; gap: 18px; flex-wrap: wrap;
  min-height: 220px;
}

/* STORIES */
.stories-sec {
  background: #fff8e7;
  padding: 90px 0;
}
.mag-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.mag-card {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow); padding: 0;
  display: flex; flex-direction: column;
}
.mag-card.hero { grid-row: span 2; }
.mag-card .img { height: 160px; background-size: cover; background-position: center; }
.mag-card.hero .img { height: 280px; }
.mag-card .body { padding: 16px 18px 22px; }
.mag-card h3 { font-family: "Fraunces", serif; }

/* SOCIAL WALL */
.social-wall { background: #2b1a14; color: #fff6e4; padding: 80px 0; }
.social-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}

/* REVIEWS */
.reviews-sec {
  background: #fff0e6;
  padding: 80px 0;
}
.review-wrap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}

/* NEWSLETTER */
.news-sec {
  background: linear-gradient(90deg, #c62828, #8b4513 40%, #c47a3a);
  color: #fff8e7;
  padding: 70px 0 90px;
}
.wrapper-form {
  background: #fff8e7; color: var(--cocoa);
  border-radius: 8px 8px 40px 40px;
  padding: 28px;
  max-width: 640px; margin: 20px auto 0;
  box-shadow: 0 18px 0 #7a3e1d;
  position: relative;
}
.wrapper-form::before {
  content: "CHOCOLOCO";
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .3em; font-weight: 800; opacity: .5;
}
.news-row { display: flex; gap: 10px; margin-top: 16px; }
.news-row input {
  flex: 1; border: 2px solid #f3d19a; border-radius: 999px; padding: 12px 16px; font-weight: 700;
}

/* PAGE HEROES */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { font-size: clamp(36px, 6vw, 72px); }

/* FOOTER */
.site-footer {
  background: #2b1a14;
  color: #fff6e4;
  padding: 60px 0 20px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 24px;
}
.site-footer h4 { color: #ffe082; margin-bottom: 10px; }
.site-footer a { display: block; padding: 4px 0; opacity: .85; }
.site-footer a:hover { color: #ffe082; opacity: 1; }
.foot-bottom {
  border-top: 1px dashed rgba(255,224,130,.3);
  margin-top: 30px; padding-top: 16px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
}

/* BACK TO TOP */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: #ec407a; color: #fff; cursor: pointer; display: none;
  box-shadow: 0 8px 0 #ad1457;
}
.to-top.show { display: grid; place-items: center; }

/* MOBILE NAV */
.mobile-nav {
  display: none;
  position: fixed; inset: 0; background: #2b1a14; color: #fff6e4;
  z-index: 100; padding: 80px 24px; overflow: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; font-size: 22px; font-weight: 800; padding: 10px 0; }

.reveal { opacity: 0; transform: translateY(24px); transition: .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  background: #2b1a14; color: #fff6e4; padding: 12px 18px; border-radius: 999px;
  z-index: 120; opacity: 0; transition: .3s; font-weight: 800;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
