/* =====================================================
   DanikToy – style.css
   1. Tokens   2. Base   3. Layout & buttons   4. Header
   5. Hero     6. Sections   7. Cards   8. Cart & dialogs
   9. Footer   10. Motion
   ===================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Supplied palette (ColourPallete.jpg) */
  --peach:    #ffd699;
  --apricot:  #ffbd59;
  --orange:   #ffa51f;
  --amber:    #cc7a00;
  --brown:    #7a4900;
  --espresso: #3d2500;

  /* Light surfaces derived from the peach swatch */
  --cream:    #fff7ea;
  --cream-2:  #ffefd2;
  --white:    #fffdf9;

  /* Logo colours: small doses only (chips, icons, confetti) */
  --pink:     #f9567c;
  --yellow:   #fbb726;
  --purple:   #a47bca;
  --green:    #a3b84a;
  --teal:     #40b8bd;
  --tangerine:#f6812d;

  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 14px;
  --r-md: 24px;
  --r-lg: 36px;
  --r-xl: 56px;

  --shadow-soft: 0 10px 30px rgba(122, 73, 0, .14);
  --shadow-lift: 0 18px 40px rgba(122, 73, 0, .22);
  --toy-shadow:  0 5px 0 var(--amber);

  --header-h: 76px;
  --gutter: 20px;
  --ease: cubic-bezier(.3, 1.4, .5, 1);   /* small springy overshoot */
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--espresso);
  background: var(--cream);
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--espresso); color: var(--cream); padding: 10px 16px; border-radius: var(--r-sm); transition: top .2s; }
.skip-link:focus { top: 12px; }

.todo { background: var(--peach); color: var(--espresso); padding: 0 .4em; border-radius: 6px; }

/* ---------- 3. LAYOUT & BUTTONS ---------- */
.container { width: min(1180px, 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }

.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.section-head p { margin-inline: auto; }

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  background: var(--espresso);
  color: var(--peach);
  padding: .25em .95em;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.btn {
  --btn-bg: var(--orange); --btn-fg: var(--espresso); --btn-edge: var(--amber);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: .7em 1.7em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 0; border-radius: 999px;
  box-shadow: 0 5px 0 var(--btn-edge);
  transition: transform .18s var(--ease), box-shadow .18s, background .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--btn-edge); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--btn-edge); }
.btn-primary { /* defaults */ }
.btn-secondary { --btn-bg: var(--white); --btn-edge: var(--brown); border: 3px solid var(--brown); min-height: 48px; }
.btn-ghost { --btn-bg: transparent; --btn-edge: var(--brown); border: 3px solid var(--espresso); box-shadow: 0 5px 0 var(--brown); }
.btn-dark { --btn-bg: var(--espresso); --btn-fg: var(--peach); --btn-edge: #1d1100; }
.btn-small { min-height: 42px; padding: .4em 1.1em; font-size: .98rem; box-shadow: 0 4px 0 var(--btn-edge); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.5rem; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--cream-2); border: 0; border-radius: 50%;
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:hover { transform: rotate(90deg) scale(1.08); background: var(--peach); }
.link-btn { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; padding: 8px; color: var(--brown); }
.tiny { font-size: .88rem; color: var(--brown); }

/* ---------- 4. HEADER ---------- */
.scroll-thread { position: fixed; inset: 0 0 auto 0; height: 5px; z-index: 120; pointer-events: none; }
.scroll-thread span {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: repeating-linear-gradient(90deg, var(--pink) 0 40px, var(--yellow) 40px 80px, var(--green) 80px 120px, var(--teal) 120px 160px, var(--purple) 160px 200px, var(--tangerine) 200px 240px);
  border-radius: 0 6px 6px 0;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 247, 234, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: box-shadow .25s;
}
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(122, 73, 0, .16); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 52px; width: auto; transition: transform .3s var(--ease); }
.brand:hover img { transform: rotate(-3deg) scale(1.05); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn {
  position: relative; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--orange); border: 0; border-radius: 50%; box-shadow: 0 4px 0 var(--amber);
  transition: transform .2s var(--ease);
}
.cart-btn:hover { transform: translateY(-2px) rotate(-6deg); }
.cart-btn.bump { animation: bump .5s var(--ease); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center; font-size: .78rem; font-weight: 800;
  background: var(--espresso); color: var(--cream); border-radius: 999px; border: 2px solid var(--cream);
}

.burger { width: 52px; height: 52px; display: grid; place-content: center; gap: 5px; background: var(--white); border: 3px solid var(--espresso); border-radius: 50%; }
.burger span { display: block; width: 20px; height: 3px; background: var(--espresso); border-radius: 3px; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* mobile nav = fold-down panel */
.main-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream); border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: 0 20px 30px rgba(122, 73, 0, .18);
  padding: 8px var(--gutter) 22px;
  max-height: 0; overflow: hidden; visibility: hidden; opacity: 0;
  transition: max-height .35s ease, opacity .25s, visibility .35s;
}
.main-nav.open { max-height: 90vh; overflow: auto; visibility: visible; opacity: 1; }
.main-nav a, .drop-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 52px; padding: 0 12px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; text-decoration: none;
  background: none; border: 0; border-radius: var(--r-sm); text-align: left;
}
.main-nav a:hover, .drop-toggle:hover { background: var(--peach); }
.drop { display: none; padding-left: 14px; }
.has-drop.open .drop { display: block; }
.drop-toggle svg { transition: transform .2s; }
.has-drop.open .drop-toggle svg { transform: rotate(180deg); }

@media (min-width: 900px) {
  .burger { display: none; }
  .main-nav { position: static; max-height: none; overflow: visible; visibility: visible; opacity: 1; background: none; box-shadow: none; padding: 0; border-radius: 0; }
  .main-nav > ul { display: flex; align-items: center; gap: 4px; }
  .main-nav a, .drop-toggle { width: auto; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 1.08rem; }
  .has-drop { position: relative; }
  .drop {
    display: block; position: absolute; left: 0; top: calc(100% + 6px); min-width: 230px; padding: 10px;
    background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow-lift);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .has-drop.open .drop, .has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
}

/* ---------- 5. HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--peach) 0%, #ffe4b8 55%, var(--cream) 100%);
  padding: clamp(28px, 5vw, 56px) 0 0;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 520px; height: 520px; right: -140px; top: -120px; background: var(--apricot); opacity: .55; }
.b2 { width: 300px; height: 300px; left: -120px; bottom: 60px; background: var(--orange); opacity: .28; }
.b3 { width: 180px; height: 180px; left: 40%; top: 6%; background: var(--cream); opacity: .6; }
.float { position: absolute; opacity: .9; animation: drift 7s ease-in-out infinite; }
.f-star { width: 34px; height: 34px; background: var(--pink); clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); }
.f-dot  { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); }
.f-ring { width: 34px; height: 34px; border-radius: 50%; border: 6px solid var(--purple); }
.s1 { left: 6%;  top: 18%; animation-delay: -1s; }
.s2 { left: 46%; top: 12%; background: var(--green); animation-delay: -3s; }
.s3 { right: 7%; bottom: 24%; background: var(--yellow); animation-delay: -2s; }
.s4 { left: 12%; bottom: 20%; background: var(--purple); animation-delay: -4s; }
.s5 { right: 36%; bottom: 14%; animation-delay: -5s; }
@media (max-width: 899px) { .s1, .s2 { display: none; } }

.hero-grid { position: relative; display: grid; gap: 28px; align-items: center; padding-bottom: clamp(48px, 8vw, 88px); }
.hero-copy .lead { font-size: 1.2rem; max-width: 46ch; }

.stage-card {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 560px;
  background: radial-gradient(circle at 50% 38%, var(--cream) 0%, #ffe2ac 55%, var(--apricot) 100%);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.stage-card::after { /* knitted seam */
  content: ""; position: absolute; inset: 12px; border-radius: calc(var(--r-xl) - 12px);
  border: 3px dashed rgba(122, 73, 0, .38); pointer-events: none;
}
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity .6s; }
.stage-canvas:active { cursor: grabbing; }
.stage-card.ready .stage-canvas { opacity: 1; }
.stage-fallback { position: absolute; inset: 0; margin: auto; width: 72%; height: auto; opacity: .95; transition: opacity .4s; }
.stage-card.ready .stage-fallback { opacity: 0; pointer-events: none; }
.stage-card:not(.no-3d):not(.ready) .stage-fallback { animation: breathe 2.2s ease-in-out infinite; }
.stage-hint { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; pointer-events: none; }
.stage-hint span { font-family: var(--font-display); font-size: .95rem; background: var(--espresso); color: var(--peach); padding: .3em 1em; border-radius: 999px; }
.stage-next {
  position: absolute; top: 24px; right: 24px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 600; min-height: 44px; padding: 0 16px;
  background: var(--white); border: 3px solid var(--espresso); border-radius: 999px; box-shadow: 0 3px 0 var(--espresso);
  transition: transform .18s var(--ease);
}
.stage-next:hover { transform: translateY(-2px); }
.stage-next:active { transform: translateY(2px); box-shadow: none; }

.ribbon { position: relative; background: var(--orange); color: var(--espresso); transform: rotate(-1.2deg) scale(1.03); overflow: hidden; border-block: 4px solid var(--espresso); }
.ribbon-track { display: flex; width: max-content; align-items: center; gap: 28px; padding: 14px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; white-space: nowrap; animation: marquee 32s linear infinite; }
.ribbon-track i { font-style: normal; color: var(--espresso); opacity: .7; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .stage-card { justify-self: end; }
}

/* ---------- 6. SECTIONS ---------- */
/* about */
.about { background: var(--cream); }
.split { display: grid; gap: 44px; align-items: center; }
.photo-collage { position: relative; aspect-ratio: 1 / .98; width: 100%; max-width: 560px; justify-self: center; }
.photo-slot {
  position: absolute; margin: 0; width: 80%; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--r-lg); border: 6px solid var(--white); box-shadow: var(--shadow-soft);
  background: var(--peach);
  transition: transform .45s var(--ease), box-shadow .3s;
}
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p1 { left: 0;  top: 0;   transform: rotate(-5deg); z-index: 1; }
.p2 { right: 0; top: 27%; transform: rotate(4deg);  z-index: 2; }
.p3 { left: 4%; bottom: 0; transform: rotate(-2deg); z-index: 3; }
.photo-collage:hover .p1 { transform: rotate(-8deg) translate(-8px, -10px); }
.photo-collage:hover .p2 { transform: rotate(7deg) translate(10px, -4px); }
.photo-collage:hover .p3 { transform: rotate(-1deg) translateY(8px); box-shadow: var(--shadow-lift); }
.sticker {
  position: absolute; right: 1%; top: -3%; z-index: 4; width: 104px; height: 104px; display: grid; place-items: center; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.1;
  background: var(--pink); color: var(--white); border-radius: 50%; border: 4px dashed var(--white);
  box-shadow: var(--shadow-soft); transform: rotate(12deg); animation: wobble 4s ease-in-out infinite;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
}

/* studio (3D) */
.studio { background: var(--orange); border-radius: var(--r-xl) var(--r-xl) 0 0; margin-top: -1px; }
.studio .kicker { background: var(--espresso); }
.studio.no-3d { display: none; }   /* hidden if WebGL / three.js is unavailable */
.studio-grid { display: grid; gap: 28px; align-items: stretch; }
.stage-big { aspect-ratio: 1 / 1; max-height: 620px; background: radial-gradient(circle at 50% 40%, var(--cream) 0%, #ffe9c4 60%, var(--peach) 100%); }
.studio-panel { background: var(--cream); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow-lift); display: flex; flex-direction: column; gap: 6px; }
.studio-panel h3 { margin: .6em 0 .5em; }
.studio-panel h3:first-child { margin-top: 0; }
.studio-panel .btn { align-self: flex-start; margin-top: 22px; }

.toy-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.toy-picker button {
  min-height: 52px; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  background: var(--white); border: 3px solid var(--peach); border-radius: var(--r-md);
  transition: transform .18s var(--ease), background .2s, border-color .2s;
}
.toy-picker button:hover { transform: translateY(-2px); border-color: var(--apricot); }
.toy-picker button[aria-checked="true"] { background: var(--espresso); color: var(--peach); border-color: var(--espresso); }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch {
  width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--white); background: var(--c);
  box-shadow: 0 0 0 2px rgba(61, 37, 0, .25), 0 3px 8px rgba(61, 37, 0, .2);
  transition: transform .2s var(--ease);
}
.swatch:hover { transform: scale(1.14) rotate(8deg); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 4px var(--espresso), 0 3px 8px rgba(61, 37, 0, .2); transform: scale(1.1); }
@media (min-width: 900px) {
  .studio-grid { grid-template-columns: 1.15fr 1fr; gap: 40px; }
  .studio-panel { justify-content: center; }
}

/* best sellers */
.best { background: var(--cream); border-radius: var(--r-xl) var(--r-xl) 0 0; margin-top: calc(var(--r-xl) * -1); z-index: 1; }

/* why */
.why { background: var(--cream-2); }
.why-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.why-card { padding: 28px 26px 30px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); border-bottom: 8px solid var(--c); transition: transform .3s var(--ease); }
.why-card:hover { transform: translateY(-8px) rotate(-1deg); }
.why-card p { margin: 0; }
.why-icon { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 18px; border-radius: 22px; background: var(--c); color: var(--white); transform: rotate(-6deg); }
.why-icon svg { width: 40px; height: 40px; }
.c-pink { --c: var(--pink); } .c-teal { --c: var(--teal); } .c-purple { --c: var(--purple); } .c-green { --c: var(--green); }
.c-green .why-icon, .c-teal .why-icon { color: var(--espresso); }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }

/* for who */
.forwho { background: var(--cream); }
.forwho-grid { display: grid; gap: 22px; }
.who-card {
  --tx: 0deg; --ty: 0deg;
  min-height: 250px; padding: 34px 30px; border-radius: var(--r-xl);
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
  transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty));
  transition: transform .25s ease-out;
}
.who-card::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; right: -50px; top: -50px; background: rgba(255, 255, 255, .45); }
.who-card::after { content: ""; position: absolute; inset: 10px; border: 3px dashed rgba(61, 37, 0, .28); border-radius: calc(var(--r-xl) - 10px); pointer-events: none; }
.who-card h3 { font-size: 1.8rem; position: relative; }
.who-card p { margin: 0; position: relative; }
.w1 { background: var(--yellow); } .w2 { background: #f9a9bc; } .w3 { background: #8fd5d8; }
@media (min-width: 800px) {
  .forwho-grid { grid-template-columns: repeat(3, 1fr); }
  .w2 { transform: translateY(26px) perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); }
}

/* mission */
.mission { padding: clamp(40px, 6vw, 70px) 0; background: var(--cream-2); }
.mission-blob {
  position: relative; overflow: hidden; text-align: center;
  background: var(--orange); border-radius: 48% 52% 46% 54% / 12% 14% 12% 14%;
  padding: clamp(56px, 9vw, 110px) clamp(24px, 8vw, 120px);
  box-shadow: var(--shadow-lift);
}
.mission-blob::after { content: ""; position: absolute; inset: 14px; border: 4px dashed rgba(61, 37, 0, .35); border-radius: inherit; pointer-events: none; }
.mission-blob h2 { max-width: 20ch; margin-inline: auto; position: relative; }
.mission-blob p { margin-inline: auto; position: relative; font-size: 1.15rem; }
.mission-blob .btn { position: relative; margin-top: 12px; }
.yarn { position: absolute; border-radius: 50%; background:
  repeating-linear-gradient(45deg, rgba(255,255,255,.3) 0 5px, transparent 5px 11px), var(--c); animation: drift 8s ease-in-out infinite; }
.y1 { --c: var(--pink);   width: 90px; height: 90px; left: 6%;  top: 14%; }
.y2 { --c: var(--teal);   width: 64px; height: 64px; right: 9%; top: 18%; animation-delay: -3s; }
.y3 { --c: var(--purple); width: 76px; height: 76px; right: 15%; bottom: 12%; animation-delay: -5s; }
.mission .kicker { position: relative; }

/* subscribe */
.subscribe { background: var(--cream-2); padding-top: clamp(40px, 6vw, 70px); }
.sub-card {
  display: grid; gap: 26px; align-items: center;
  background: var(--peach); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px);
  position: relative; box-shadow: var(--shadow-soft);
}
.sub-card::after { content: ""; position: absolute; inset: 10px; border: 3px dashed rgba(122, 73, 0, .4); border-radius: calc(var(--r-xl) - 10px); pointer-events: none; }
.sub-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.sub-card p { margin-bottom: 0; }
.sub-form { display: grid; gap: 12px; position: relative; z-index: 1; }
.sub-form input { min-height: 56px; padding: 0 22px; background: var(--white); border: 3px solid var(--espresso); border-radius: 999px; }
.sub-form input:focus { outline: none; box-shadow: 0 0 0 4px var(--orange); }
.sub-form input[aria-invalid="true"] { border-color: #b3261e; }
.form-msg { min-height: 1.5em; margin: 0; font-weight: 700; }
@media (min-width: 900px) {
  .sub-card { grid-template-columns: 1.1fr 1fr; }
  .sub-form { grid-template-columns: 1fr auto; }
  .form-msg { grid-column: 1 / -1; }
}

/* ---------- 7. PRODUCT CARDS ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card {
  --tx: 0deg; --ty: 0deg;
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty));
  transition: transform .25s ease-out, box-shadow .25s;
}
.card:hover { box-shadow: var(--shadow-lift); }
.card.is-hidden { display: none; }
.card.pop-in { animation: popIn .5s var(--ease) both; }
.card-media { position: relative; aspect-ratio: 1 / 1; margin: 10px 10px 0; border-radius: calc(var(--r-lg) - 8px); overflow: hidden; background: var(--tint, var(--peach)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; font-family: var(--font-display); color: rgba(61, 37, 0, .75); background:
  repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 12px, transparent 12px 24px); }
.ph svg { width: 78px; height: 78px; transition: transform .5s var(--ease); }
.card:hover .ph svg { transform: rotate(18deg) scale(1.1); }
.ph span { font-size: .92rem; background: rgba(255, 253, 249, .85); padding: .15em .8em; border-radius: 999px; }
.badge { position: absolute; left: 12px; top: 12px; font-family: var(--font-display); font-size: .88rem; font-weight: 600; background: var(--espresso); color: var(--peach); padding: .15em .8em; border-radius: 999px; }
.fav { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--white); border: 0; border-radius: 50%; color: var(--brown); box-shadow: 0 3px 10px rgba(61, 37, 0, .2); transition: transform .2s var(--ease), color .2s; }
.fav:hover { transform: scale(1.12); }
.fav svg path { fill: transparent; stroke: currentColor; stroke-width: 2; transition: fill .2s; }
.fav[aria-pressed="true"] { color: var(--pink); animation: bump .45s var(--ease); }
.fav[aria-pressed="true"] svg path { fill: currentColor; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 20px 20px; }
.card-cat { margin: 0 0 4px; font-family: var(--font-display); font-weight: 500; font-size: .9rem; color: var(--amber); }
.card-body h3 { font-size: 1.22rem; margin-bottom: .3em; }
.card-desc { font-size: .98rem; color: var(--brown); margin-bottom: 1em; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 8px; }
.price { margin: 0 auto 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.add-btn { width: 46px; height: 46px; display: grid; place-items: center; flex: none; background: var(--orange); border: 0; border-radius: 50%; box-shadow: 0 4px 0 var(--amber); transition: transform .18s var(--ease); }
.add-btn:hover { transform: translateY(-2px) rotate(-8deg); }
.add-btn:active { transform: translateY(3px); box-shadow: none; }

/* ---------- 8. CART & DIALOGS ---------- */
.scrim { position: fixed; inset: 0; z-index: 150; background: rgba(61, 37, 0, .5); }
.cart {
  position: fixed; z-index: 160; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  display: flex; flex-direction: column; background: var(--cream);
  border-radius: var(--r-lg) 0 0 var(--r-lg); box-shadow: -20px 0 50px rgba(61, 37, 0, .25);
  transform: translateX(105%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s;
}
.cart.open { transform: none; visibility: visible; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px; }
.cart-head h2 { margin: 0; font-size: 1.7rem; }
.cart-list { flex: 1; overflow: auto; padding: 8px 24px; display: grid; gap: 12px; align-content: start; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: var(--white); border-radius: var(--r-md); }
.cart-thumb { width: 64px; height: 64px; border-radius: 16px; background: var(--tint, var(--peach)); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item h3 { font-size: 1rem; margin: 0 0 4px; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--peach); font-weight: 800; }
.qty span { min-width: 24px; text-align: center; font-weight: 800; }
.cart-remove { background: none; border: 0; padding: 8px; color: var(--brown); text-decoration: underline; font-size: .85rem; }
.cart-empty { text-align: center; margin: 40px auto; font-family: var(--font-display); font-size: 1.2rem; padding: 0 24px; }
.cart-foot { padding: 16px 24px 24px; display: grid; gap: 10px; border-top: 3px dashed var(--peach); }
.cart-foot .tiny { margin: 0; }

.quick { width: min(880px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--cream); color: var(--espresso); box-shadow: 0 30px 80px rgba(61, 37, 0, .45); overflow: auto; }
.quick[open] { display: grid; animation: popIn .4s var(--ease); }
.quick::backdrop { background: rgba(61, 37, 0, .55); }
.quick-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--white); }
.quick-media { position: relative; aspect-ratio: 1 / 1; margin: 14px; border-radius: var(--r-lg); overflow: hidden; background: var(--tint, var(--peach)); }
.quick-media img { width: 100%; height: 100%; object-fit: cover; }
.quick-body { padding: 8px 28px 30px; align-self: center; }
@media (min-width: 760px) { .quick[open] { grid-template-columns: 1fr 1fr; } .quick-body { padding: 28px 40px 28px 12px; } }

.toast { position: fixed; z-index: 220; left: 50%; bottom: 24px; transform: translate(-50%, 140%); max-width: calc(100% - 32px); padding: 14px 26px; font-family: var(--font-display); font-weight: 500; background: var(--espresso); color: var(--peach); border-radius: 999px; box-shadow: var(--shadow-lift); opacity: 0; visibility: hidden; transition: transform .4s var(--ease), opacity .3s, visibility .4s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.bursts { position: fixed; inset: 0; z-index: 210; pointer-events: none; overflow: hidden; }
.burst { position: absolute; font-size: 26px; line-height: 1; will-change: transform, opacity; }

.cart-line { margin: 0 0 6px; font-size: .92rem; color: var(--brown); }
.cart-total, .co-total { display: flex; align-items: baseline; justify-content: space-between; margin: 0; max-width: none; font-family: var(--font-display); font-size: 1.25rem; }
.cart-total strong, .co-total strong { font-size: 1.7rem; }

.checkout { width: min(600px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: clamp(24px, 4vw, 38px); border: 0; border-radius: var(--r-xl); background: var(--cream); color: var(--espresso); box-shadow: 0 30px 80px rgba(61, 37, 0, .45); overflow: auto; }
.checkout[open] { animation: popIn .4s var(--ease); }
.checkout::backdrop { background: rgba(61, 37, 0, .55); }
.checkout h2 { font-size: clamp(1.5rem, 4vw, 2rem); padding-right: 44px; }
.co-items { margin: 0 0 20px; padding: 14px 18px; background: var(--white); border-radius: var(--r-md); display: grid; gap: 6px; }
.co-items li { display: flex; justify-content: space-between; gap: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-family: var(--font-display); font-weight: 500; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: 12px 18px; background: var(--white); border: 3px solid var(--peach); border-radius: var(--r-md); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--espresso); box-shadow: 0 0 0 4px var(--orange); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1.4fr; } }
.co-total { margin-top: 8px; padding-top: 16px; border-top: 3px dashed var(--peach); }
.co-ship { margin: 4px 0 14px; font-weight: 800; color: var(--brown); }
.checkout .form-msg { color: #b3261e; }
.co-done { text-align: center; padding: 20px 0 8px; }
.co-done p { margin-inline: auto; }

/* ---------- 9. FOOTER ---------- */
.site-footer { background: var(--espresso); color: var(--peach); padding: clamp(48px, 7vw, 80px) 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; }
.foot-logo { display: inline-block; background: var(--cream); padding: 12px 22px; border-radius: var(--r-lg); transition: transform .3s var(--ease); }
.foot-logo:hover { transform: rotate(-3deg) scale(1.04); }
.foot-logo img { height: 64px; width: auto; }
.foot-brand p { margin: 16px 0; }
.foot-h { font-size: 1.15rem; color: var(--white); margin-bottom: .8em; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer :focus-visible { outline-color: var(--peach); }
.foot-bottom { margin-top: 40px; padding: 22px 0 28px; border-top: 2px dashed rgba(255, 214, 153, .3); font-size: .95rem; }
.foot-bottom p { margin: 0; max-width: none; }
.site-footer .todo { background: rgba(255, 214, 153, .18); color: var(--peach); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; } .foot-brand { grid-column: auto; } }

/* ---------- 10. MOTION ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .who-card.reveal.in { transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .25s ease-out, opacity .7s; }
@media (min-width: 800px) { .js .who-card.w2.reveal.in { transform: translateY(26px) perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); } }

@keyframes drift   { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(8deg); } }
@keyframes wobble  { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(4deg) scale(1.05); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes bump    { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-8deg); } 100% { transform: scale(1); } }
@keyframes popIn   { from { opacity: 0; transform: scale(.9) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ribbon-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .ribbon-track span:nth-child(n+11), .ribbon-track i:nth-child(n+11) { display: none; }
}
