/* CHAWKY fun shop, demo by Velare. Palette: warm cream, deep cocoa, pops of
   pistachio, raspberry, tangerine, butter yellow. */

:root {
  --cream: #FFF4E3;
  --cream-deep: #F9E8CF;
  --cocoa: #2E1A0F;
  --cocoa-soft: #55392A;
  --pistachio: #9CBF5F;
  --pistachio-deep: #55702B;
  --raspberry: #F2547D;
  --raspberry-deep: #B41E48;
  --tangerine: #FF7A3B;
  --tangerine-deep: #C2440B;
  --butter: #FFC845;
  --butter-deep: #8A6200;
  --card: #FFFBF3;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 6px 0 rgba(46, 26, 15, 0.16);
  --shadow-pop: 0 10px 30px rgba(46, 26, 15, 0.18);
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", "Helvetica Neue", sans-serif;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--cocoa);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.02em; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--cocoa); color: var(--cream); padding: 10px 18px; border-radius: var(--radius-pill);
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--cocoa);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.18s var(--ease-bounce), box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 4px 0 var(--cocoa);
  color: var(--cocoa);
  background: var(--card);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--cocoa); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--cocoa); }
.btn:focus-visible { outline: 3px dashed var(--raspberry); outline-offset: 3px; }
.btn-primary { background: var(--cocoa); color: var(--cream); box-shadow: 0 4px 0 var(--butter-deep); }
.btn-primary:hover { background: #3C2415; box-shadow: 0 7px 0 var(--butter-deep); }
.btn-primary:active { box-shadow: 0 2px 0 var(--butter-deep); }
.btn-butter { background: var(--butter); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }

/* ---------- Stickers ---------- */
.sticker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--cocoa);
  background: var(--card);
  box-shadow: 0 3px 0 rgba(46, 26, 15, 0.35);
  transform: rotate(-2deg);
}
.sticker-butter { background: var(--butter); }
.sticker-rasp { background: var(--raspberry); color: #FFF6F0; }
.sticker-pist { background: var(--pistachio); }
.sticker-tang { background: var(--tangerine); color: #FFF6F0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 244, 227, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--cocoa);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--cocoa);
  text-decoration: none;
  display: flex; flex-direction: column; line-height: 1;
  position: relative;
}
.wordmark-dot {
  position: absolute; top: -2px; right: -14px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--raspberry); border: 2px solid var(--cocoa);
}
.wordmark-sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cocoa-soft);
  margin-top: 4px;
}
.wordmark.small { font-size: 1.5rem; }
.main-nav { display: flex; gap: clamp(12px, 2.5vw, 30px); }
.main-nav a {
  font-weight: 700; color: var(--cocoa); text-decoration: none;
  padding: 6px 2px; border-bottom: 3px solid transparent;
  transition: border-color 0.15s ease;
}
.main-nav a:hover { border-bottom-color: var(--tangerine); }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.95rem;
  background: var(--butter); color: var(--cocoa);
  border: 3px solid var(--cocoa); border-radius: var(--radius-pill);
  padding: 9px 16px; cursor: pointer;
  box-shadow: 0 3px 0 var(--cocoa);
  transition: transform 0.18s var(--ease-bounce), box-shadow 0.18s ease;
}
.cart-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--cocoa); }
.cart-btn:focus-visible { outline: 3px dashed var(--raspberry); outline-offset: 3px; }
.cart-count {
  min-width: 24px; height: 24px; border-radius: var(--radius-pill);
  background: var(--cocoa); color: var(--cream);
  display: grid; place-items: center;
  font-size: 0.8rem; padding: 0 6px;
}
.cart-count.bump { animation: bump 0.4s var(--ease-bounce); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(40px, 7vw, 90px) clamp(16px, 5vw, 72px) clamp(40px, 6vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
}
.hero-eyebrow { margin-bottom: 20px; }
.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--raspberry);
  text-decoration: underline wavy var(--butter) 5px;
  text-underline-offset: 8px;
}
.hero-sub { font-size: 1.15rem; max-width: 34rem; margin-bottom: 30px; color: var(--cocoa-soft); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-note { font-size: 0.88rem; color: var(--cocoa-soft); }
.hero-visual { position: relative; }
.hero-blob {
  position: absolute; inset: -6% -8%;
  background: var(--butter);
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  transform: rotate(-4deg);
  z-index: 0;
}
.hero-visual img {
  position: relative; z-index: 1;
  width: 100%; height: clamp(400px, 40vw, 580px); object-fit: cover;
  border-radius: var(--radius-lg);
  border: 4px solid var(--cocoa);
  box-shadow: var(--shadow-pop);
  transform: rotate(2deg);
}
.hero-sticker-1 { position: absolute; z-index: 2; top: 6%; left: -4%; transform: rotate(-8deg); }
.hero-sticker-2 { position: absolute; z-index: 2; bottom: 8%; right: -3%; transform: rotate(6deg); }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--cocoa);
  color: var(--butter);
  overflow: hidden;
  border-top: 3px solid var(--cocoa);
  border-bottom: 3px solid var(--cocoa);
  padding: 13px 0;
}
.marquee-track {
  display: flex; align-items: center; gap: 28px;
  width: max-content;
  animation: marquee 26s linear infinite;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.06em;
  white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--raspberry); font-size: 0.7rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 90px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin-bottom: 10px; }
.section-head p { color: var(--cocoa-soft); font-size: 1.05rem; }

/* ---------- Shop ---------- */
.shop { padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 48px); max-width: 1280px; margin: 0 auto; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: clamp(20px, 3vw, 34px);
}
.product-card {
  background: var(--card);
  border: 3px solid var(--cocoa);
  border-radius: var(--radius-lg);
  padding: 18px 18px 22px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.22s var(--ease-bounce), box-shadow 0.22s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 0 12px 0 rgba(46, 26, 15, 0.16); }
.product-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--cocoa);
  aspect-ratio: 1 / 1;
  background: var(--pop, var(--cream-deep));
}
.product-media::before {
  content: "";
  position: absolute; inset: 12% 10% -20% 10%;
  background: var(--pop, transparent);
  border-radius: 50%;
  opacity: 0.55;
}
.product-media img {
  position: relative;
  width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center);
  transition: transform 0.3s var(--ease-bounce);
}
.product-card:hover .product-media img { transform: scale(1.06) rotate(-1deg); }
.product-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
}
.product-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin: 16px 0 4px; }
.product-desc { color: var(--cocoa-soft); font-size: 0.92rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.product-price { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.add-btn {
  font-family: var(--font-display); font-weight: 800; font-size: 0.92rem;
  background: var(--butter); color: var(--cocoa);
  border: 3px solid var(--cocoa); border-radius: var(--radius-pill);
  padding: 10px 18px; cursor: pointer;
  box-shadow: 0 3px 0 var(--cocoa);
  transition: transform 0.18s var(--ease-bounce), box-shadow 0.18s ease, background 0.18s ease;
}
.add-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--cocoa); background: var(--tangerine); color: #FFF6F0; }
.add-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--cocoa); }
.add-btn:focus-visible { outline: 3px dashed var(--raspberry); outline-offset: 3px; }
.add-btn.added { background: var(--pistachio); }

/* ---------- Box teaser ---------- */
.box-teaser {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  background: var(--cocoa);
  color: var(--cream);
  padding: clamp(56px, 8vw, 100px) clamp(16px, 5vw, 72px);
}
.box-visual { position: relative; max-width: 460px; justify-self: center; }
.box-visual img {
  border-radius: var(--radius-lg);
  border: 4px solid var(--butter);
  transform: rotate(-3deg);
  width: 100%; height: clamp(360px, 36vw, 500px); object-fit: cover;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.box-sticker { position: absolute; bottom: -14px; right: -8px; transform: rotate(5deg); }
.box-copy h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 16px; color: var(--butter); }
.box-copy > p { font-size: 1.1rem; max-width: 34rem; margin-bottom: 22px; color: #F4E4CE; }
.box-perks { list-style: none; margin-bottom: 30px; display: grid; gap: 10px; }
.box-perks li { padding-left: 32px; position: relative; color: #F4E4CE; }
.box-perks li::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--pistachio); border: 2.5px solid var(--butter);
}
.box-teaser .btn-primary { background: var(--butter); color: var(--cocoa); border-color: var(--butter); box-shadow: 0 4px 0 rgba(0,0,0,0.45); }
.box-teaser .btn-primary:hover { background: var(--tangerine); border-color: var(--tangerine); }
.box-cta-note { margin-top: 14px; font-size: 0.95rem; color: var(--butter); min-height: 1.5em; }

/* ---------- Why ---------- */
.why { padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 48px); max-width: 1180px; margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 34px); }
.why-card {
  background: var(--card);
  border: 3px solid var(--cocoa);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.22s var(--ease-bounce);
}
.why-card:hover { transform: rotate(0deg) translateY(-5px); }
.why-icon {
  width: 58px; height: 58px; border-radius: 18px;
  background: var(--pop); color: var(--cocoa);
  border: 3px solid var(--cocoa);
  display: grid; place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 3px 0 rgba(46, 26, 15, 0.3);
}
.why-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.why-card p { color: var(--cocoa-soft); font-size: 0.96rem; }

/* ---------- Reviews ---------- */
.reviews { padding: 0 clamp(16px, 4vw, 48px) clamp(56px, 8vw, 110px); max-width: 1180px; margin: 0 auto; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 34px); }
.review-card {
  background: var(--cream-deep);
  border: 3px solid var(--cocoa);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.22s var(--ease-bounce);
  box-shadow: var(--shadow-card);
}
.review-card:hover { transform: rotate(0deg) translateY(-4px); }
.review-stars { color: var(--tangerine); font-size: 1.15rem; letter-spacing: 3px; margin-bottom: 12px; }
.review-card blockquote { font-size: 1.02rem; font-weight: 500; margin-bottom: 16px; }
.review-card figcaption { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; }
.review-card figcaption span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.82rem; color: var(--cocoa-soft); }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  padding: clamp(56px, 8vw, 100px) 20px;
  background: var(--raspberry);
  color: #FFF6F0;
  border-top: 3px solid var(--cocoa);
  border-bottom: 3px solid var(--cocoa);
}
.final-cta h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 10px; }
.final-cta p { font-size: 1.1rem; margin-bottom: 28px; }
.final-cta .btn-butter { box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cocoa); color: #E9D7BE;
  padding: 48px clamp(16px, 4vw, 48px) 30px;
  display: grid; gap: 26px;
  text-align: center;
}
.site-footer .wordmark { color: var(--butter); align-items: center; }
.footer-brand p { max-width: 30rem; margin: 10px auto 0; font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.footer-links a { color: #E9D7BE; text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--butter); }
.footer-note { font-size: 0.82rem; color: #B99F7F; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(46, 26, 15, 0.55);
  opacity: 0; transition: opacity 0.25s ease;
}
.cart-overlay.open { opacity: 1; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160;
  width: min(420px, 92vw);
  background: var(--cream);
  border-left: 3px solid var(--cocoa);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s var(--ease-bounce);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 3px solid var(--cocoa);
}
.cart-head h2 { font-size: 1.5rem; }
.cart-head h2 span { color: var(--raspberry); }
.cart-close {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); color: var(--cocoa);
  border: 3px solid var(--cocoa);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--cocoa);
  transition: transform 0.18s var(--ease-bounce);
}
.cart-close:hover { transform: rotate(90deg); }
.cart-close:focus-visible { outline: 3px dashed var(--raspberry); outline-offset: 3px; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: grid; gap: 14px; align-content: start; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--card);
  border: 2.5px solid var(--cocoa);
  border-radius: var(--radius-md);
  padding: 10px;
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 2px solid var(--cocoa); }
.cart-item-name { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; line-height: 1.2; }
.cart-item-price { font-size: 0.85rem; color: var(--cocoa-soft); font-variant-numeric: tabular-nums; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--cocoa); background: var(--butter);
  font-weight: 700; font-size: 0.95rem; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.qty-btn:hover { background: var(--tangerine); color: #FFF6F0; }
.qty-btn:focus-visible { outline: 2px dashed var(--raspberry); outline-offset: 2px; }
.qty-val { min-width: 20px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--cocoa-soft); font-size: 0.78rem; text-decoration: underline;
  justify-self: end; align-self: start;
  padding: 4px;
}
.cart-item-remove:hover { color: var(--raspberry-deep); }
.cart-item-line { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; justify-self: end; font-variant-numeric: tabular-nums; }
.cart-empty { padding: 40px 22px; text-align: center; display: none; }
.cart-empty.show { display: block; }
.cart-empty-face { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--tangerine); margin-bottom: 8px; }
.cart-empty p { margin-bottom: 18px; color: var(--cocoa-soft); }
.cart-foot { border-top: 3px solid var(--cocoa); padding: 18px 22px 22px; background: var(--cream-deep); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.15rem; margin-bottom: 6px; }
.cart-total-row strong { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-foot-note { font-size: 0.8rem; color: var(--cocoa-soft); margin-bottom: 14px; }
.checkout-msg { margin-top: 12px; font-weight: 700; font-size: 0.92rem; color: var(--raspberry-deep); text-align: center; min-height: 1.4em; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200;
  transform: translate(-50%, 200%);
  visibility: hidden;
  background: var(--cocoa); color: var(--cream);
  font-weight: 700; font-size: 0.95rem;
  padding: 13px 24px; border-radius: var(--radius-pill);
  border: 2.5px solid var(--butter);
  transition: transform 0.3s var(--ease-bounce), visibility 0.3s;
  max-width: 92vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s var(--ease-bounce); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-card, .why-card, .review-card, .btn, .add-btn, .cart-btn, .cart-drawer, .cart-overlay, .toast, .cart-close, .product-media img { transition: none; }
  .cart-count.bump { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; margin: 12px auto 0; width: 100%; }
  .box-teaser { grid-template-columns: 1fr; }
  .box-visual { max-width: 420px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .hero h1 { font-size: clamp(2.3rem, 9.5vw, 3rem); }
  .hero-sticker-1 { left: 2%; }
  .hero-sticker-2 { right: 2%; }
  .cart-label { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
}
