/*
 * Sugar Monsters Candy
 *
 * One stylesheet for the whole site. The brand is cute and playful —
 * mascots, sparkle, candy colors — carried by a calm, professional base:
 * Fredoka for headings, Nunito for body text, Pacifico for script accents,
 * and one loud raspberry with a small candy palette around it.
 *
 * Contents:
 *   1. Tokens & base
 *   2. Typography & layout helpers
 *   3. Header & navigation
 *   4. Buttons, badges, chips
 *   5. Cards & grids
 *   6. Forms
 *   7. Shop: tabs, wizard, candy picker, receipt, party bags
 *   8. Page sections: hero, trust bar, how-it-works, FAQ, gallery,
 *      events, testimonials
 *   9. Footer
 *  10. Animations & reduced motion
 */


/* ------------------------------------------------------------------
   1. Tokens & base
   ------------------------------------------------------------------ */

:root {
  --brand: #D6336C;
  --brand-dark: #B02458;
  --purple: #6D4AA8;
  --teal: #0B8F84;
  --green: #2F9E44;
  --amber: #F59F00;

  --ink: #332E38;
  --ink-soft: #6E6577;
  --cream: #FFFBF7;
  --tint-pink: #FDF1F5;
  --tint-lavender: #F7F4FC;
  --tint-mint: #EFFAF7;
  --line: #EFE7EE;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 4px rgba(51, 46, 56, 0.07);
  --shadow: 0 6px 22px rgba(51, 46, 56, 0.10);

  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', Verdana, sans-serif;
  --font-script: 'Pacifico', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream) url('../images/sparkle.png');
}

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


/* ------------------------------------------------------------------
   2. Typography & layout helpers
   ------------------------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.18;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 500; }

/* Gradient-filled accent words inside headings */
.accent {
  background: linear-gradient(100deg, var(--brand) 20%, var(--purple) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.script-accent {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}

h1 .script-accent { font-size: 1.08em; }

.eyebrow {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 0.7rem;
}

.lead { font-size: 1.06rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

.container { width: min(1120px, 92vw); margin: 0 auto; }
.section { padding: clamp(2.6rem, 6vw, 4.6rem) 0; }
.center { text-align: center; }
.hidden { display: none !important; }

.section-head {
  max-width: 620px;
  margin: 0 auto 2.2rem;
  text-align: center;
}

.section-head p { color: var(--ink-soft); margin-top: 0.5rem; }

/* Squiggle flourish under section headings */
.section-head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 9px;
  margin: 10px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 9'%3E%3Cpath d='M1 6 C7 1, 13 1, 19 6 S 31 11, 37 6 S 49 1, 55 6 S 67 11, 71 6' fill='none' stroke='%23D6336C' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Tinted section backgrounds; the sparkle tile shows through each */
.bg-pink { background: var(--tint-pink) url('../images/sparkle.png'); }
.bg-lavender { background: var(--tint-lavender) url('../images/sparkle.png'); }
.bg-mint { background: var(--tint-mint) url('../images/sparkle.png'); }

/* Photos framed like slightly-tilted snapshots */
.photo-tilt {
  border: 6px solid #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: rotate(-1.6deg);
}

.photo-tilt.tilt-right { transform: rotate(1.6deg); }

/* Hand-drawn doodle decorations, positioned inline where used */
.doodle {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
}

@media (max-width: 780px) {
  .doodle { display: none; }
}


/* ------------------------------------------------------------------
   3. Header & navigation
   ------------------------------------------------------------------ */

.announce {
  background: linear-gradient(90deg, var(--brand), var(--purple));
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand img { height: 44px; width: 44px; border-radius: 12px; }

.brand:hover img { animation: wiggle 0.4s ease; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.1;
}

.brand-name em { font-style: normal; color: var(--brand); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink-soft);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover { color: var(--brand); background: var(--tint-pink); }
.nav-links a.active { color: var(--brand); }

.nav-links a.nav-cta {
  background: var(--brand);
  color: #fff;
  margin-left: 0.4rem;
  border-radius: 999px;
}

.nav-links a.nav-cta:hover { background: var(--brand-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 0.6rem 4vw 1rem;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.05rem; padding: 0.75rem 1rem; }
  .nav-links a.nav-cta { margin: 0.4rem 0 0; text-align: center; }
}


/* ------------------------------------------------------------------
   4. Buttons, badges, chips
   ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #C2418F);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(214, 51, 108, 0.28);
  transition:
    background 0.15s ease,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.32);
}

.btn.btn-purple { background: var(--purple); box-shadow: 0 2px 10px rgba(109, 74, 168, 0.28); }
.btn.btn-purple:hover { background: #5B3D8E; }
.btn.btn-teal { background: var(--teal); box-shadow: 0 2px 10px rgba(11, 143, 132, 0.28); }
.btn.btn-teal:hover { background: #087268; }
.btn.btn-green { background: var(--green); box-shadow: 0 2px 10px rgba(47, 158, 68, 0.28); }
.btn.btn-green:hover { background: #268A3A; }

.btn.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: none;
}

.btn.btn-ghost:hover { background: var(--tint-pink); transform: none; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--tint-pink);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.5rem;
}

.badge.badge-purple { background: var(--tint-lavender); color: var(--purple); }
.badge.badge-teal { background: var(--tint-mint); color: var(--teal); }

.price-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--teal);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1.5px solid #E3DAE6;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  background: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip:hover { border-color: var(--brand); color: var(--brand); }

.chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--tint-pink);
  color: var(--brand);
}

a.chip { text-decoration: none; }


/* ------------------------------------------------------------------
   5. Cards & grids
   ------------------------------------------------------------------ */

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Sibling cards rotate through the candy palette */
.grid > .card:nth-child(2) { border-top-color: var(--purple); }
.grid > .card:nth-child(3) { border-top-color: var(--teal); }

.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card-body { padding: 1.35rem 1.4rem 1.5rem; }

.card-body .card-blurb { color: var(--ink-soft); font-size: 0.94rem; }

.card-body .btn { margin-top: 0.6rem; }

.card img.card-photo {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

/* Illustrated panel used where no clean photo exists */
.card-illustration {
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F7F4FC 0%, #FDE7F1 100%);
}

.card-illustration svg { width: 72%; height: auto; }

/* Selectable product cards (bag sizes, party packages) */
.product-card {
  position: relative;
  display: block;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
}

.product-card input { position: absolute; opacity: 0; pointer-events: none; }

.product-card img { width: 100%; height: 185px; object-fit: cover; }

.product-card .pc-body { padding: 1.05rem 1.1rem 1.2rem; text-align: center; }

.product-card .pc-body p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.25rem 0 0.5rem;
}

.product-card .pc-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--brand);
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #D9C8DD;
  box-shadow: var(--shadow);
}

.product-card:has(input:checked) {
  border-color: var(--green);
  box-shadow: 0 5px 18px rgba(47, 158, 68, 0.2);
}

.product-card:has(input:checked)::after {
  content: "✓ Selected";
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}


/* ------------------------------------------------------------------
   6. Forms
   ------------------------------------------------------------------ */

label {
  display: block;
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #E3DAE6;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(214, 51, 108, 0.12);
}

.field { margin-bottom: 1rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.4rem;
  background: #fff;
}

legend {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--ink);
  padding: 0 0.55rem;
}

legend small {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.notice {
  border-radius: var(--radius);
  border: 1px solid #BCE3DC;
  background: var(--tint-mint);
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
}

.notice.success {
  background: #F2FAF1;
  border-color: #BFE3C2;
  position: relative;   /* confetti falls inside */
  overflow: hidden;
}

.notice.error { background: #FDF1F3; border-color: #F2C4CE; }


/* ------------------------------------------------------------------
   7. Shop: tabs, wizard, candy picker, receipt, party bags
   ------------------------------------------------------------------ */

.shop-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.4rem;
}

.shop-tab {
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}

.shop-tab:hover { border-color: var(--brand); color: var(--brand); }

.shop-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Step progress dots */
.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.4rem 0 2rem;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 76px;
}

.step-dot .dot {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #E3DAE6;
  border-radius: 50%;
  background: #fff;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.step-dot .dot-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.step-dot.active .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-dot.active .dot-label { color: var(--brand); }
.step-dot.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.step-dot.done .dot-label { color: var(--green); }

.step-connector {
  flex: 1;
  max-width: 64px;
  height: 2px;
  background: #E3DAE6;
  margin-bottom: 1.15rem;
}

.step-connector.done { background: var(--green); }

/* Wizard panels: one visible step at a time */
.wizard-step { display: none; animation: step-in 0.3s ease; }
.wizard-step.active { display: block; }

.step-title { text-align: center; margin-bottom: 0.3rem; }

.step-hint {
  text-align: center;
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.7rem;
}

/* Candy picker grid with the filling-bag preview beside it */
.candy-layout {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 1.2rem;
  align-items: start;
}

.candy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.8rem;
}

.candy-tile {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 0.7rem 0.85rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.candy-tile input { position: absolute; opacity: 0; pointer-events: none; }

.candy-tile .candy-emoji { font-size: 1.8rem; line-height: 1.2; }
.candy-tile .candy-name { font-size: 0.84rem; font-weight: 800; margin-top: 0.3rem; }
.candy-tile .candy-flavor { font-size: 0.72rem; color: var(--ink-soft); }

.candy-tile .candy-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 0.35rem;
}

.candy-tile .candy-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.candy-tile:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  animation: wiggle 0.35s ease;
}

.candy-tile:has(input:checked) {
  border-color: var(--green);
  background: #F5FBF4;
  box-shadow: 0 3px 12px rgba(47, 158, 68, 0.18);
}

.candy-tile:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: bold;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.bag-preview {
  position: sticky;
  top: 84px;
  text-align: center;
  background: var(--tint-lavender);
  border: 1.5px dashed var(--purple);
  border-radius: var(--radius);
  padding: 1rem;
}

.bag-preview .bag-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple);
}

.bag-preview .bag-hint { font-size: 0.72rem; color: var(--ink-soft); }

.bag-preview .bag-shape {
  position: relative;
  width: 116px;
  min-height: 116px;
  margin: 0.4rem auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  justify-content: center;
  gap: 2px;
  background: #fff;
  border: 2px solid var(--purple);
  border-radius: 10px 10px 18px 18px;
  padding: 24px 8px 10px;
  font-size: 1.1rem;
}

/* The zip-seal across the top of the little bag */
.bag-preview .bag-shape::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 8px;
  right: 8px;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--purple) 0 5px, transparent 5px 9px);
  border-radius: 3px;
  opacity: 0.4;
}

.bag-preview .bag-shape.pop { animation: pop 0.3s ease; }

@media (max-width: 700px) {
  /* On phones the bag preview becomes a compact sticky strip above the grid */
  .candy-layout { grid-template-columns: 1fr; }

  .bag-preview {
    order: -1;
    position: sticky;
    top: 66px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 0.5rem 0.8rem;
  }

  .bag-preview .bag-shape {
    width: 60px;
    min-height: 48px;
    margin: 0;
    padding: 12px 4px 6px;
    font-size: 0.68rem;
  }

  .bag-preview .bag-hint { display: none; }
}

/* Order summary, styled like a shop receipt */
.receipt {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
}

.receipt h3 { margin-bottom: 0.8rem; }

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.receipt-line:last-of-type { border-bottom: none; }

.receipt-line .r-label { color: var(--ink-soft); }

.receipt-total {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--tint-pink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--brand);
}

/* Sticky running total along the bottom of the mix builder */
.total-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 0;
  box-shadow: 0 -4px 18px rgba(51, 46, 56, 0.22);
}

.total-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.total-bar .total-amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
}

/* Party bags: quantity stepper and bulk-price nudge */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #E3DAE6;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.qty-stepper button {
  width: 46px;
  height: 46px;
  border: none;
  background: var(--tint-lavender);
  color: var(--purple);
  font-size: 1.35rem;
  font-weight: bold;
  cursor: pointer;
}

.qty-stepper button:hover { background: var(--tint-pink); color: var(--brand); }

.qty-stepper input {
  width: 74px;
  border: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.6rem 0;
}

.qty-stepper input:focus { box-shadow: none; }

.savings-nudge {
  display: inline-block;
  background: var(--tint-mint);
  color: var(--teal);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.86rem;
  font-weight: 800;
}


/* ------------------------------------------------------------------
   8. Page sections
   ------------------------------------------------------------------ */

/* Home hero */
.hero {
  background:
    url('../images/sparkle.png'),
    linear-gradient(180deg, #FCE7F0 0%, var(--tint-pink) 55%, #FFFDFB 100%);
  padding: clamp(2.6rem, 6.5vw, 5rem) 0 clamp(2.2rem, 5vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}

.hero-grid > div:first-child { position: relative; }

.hero h1 { margin-bottom: 0.9rem; }

.hero-sub {
  max-width: 470px;
  margin-bottom: 1.5rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.hero-photo {
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* height:auto matters here — height:100% collapses the image in Safari */
.hero-photo img { width: 100%; height: auto; object-fit: cover; }

/* Soft candy-colored glow behind the hero art */
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 28%, rgba(214, 51, 108, 0.30), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(109, 74, 168, 0.28), transparent 55%),
    radial-gradient(circle at 70% 85%, rgba(11, 143, 132, 0.25), transparent 55%);
  filter: blur(26px);
}

/* The mascots, peeking over the hero photo like a sticker */
.hero-photo img.hero-mascots {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: clamp(120px, 14vw, 190px);
  height: auto;
  object-fit: contain;
  transform: rotate(-4deg);
  filter: drop-shadow(0 6px 14px rgba(51, 46, 56, 0.22));
  z-index: 2;
}

.hero-photo:hover .hero-mascots { animation: wiggle 0.5s ease; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo img.hero-mascots { width: 120px; right: 2px; bottom: -20px; }
}

/* Wavy divider between the hero and the trust bar */
.wave {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: -44px;
  margin-bottom: -1px;
}

@media (max-width: 860px) {
  .wave { display: none; }
}

/* Inner-page heroes */
.page-hero {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.2rem) 0 0.6rem;
  background:
    url('../images/sparkle.png'),
    linear-gradient(180deg, #FCE7F0 0%, var(--tint-pink) 60%, #FFFDFB 100%);
}

.page-hero .container { position: relative; }

.page-hero p.lead { max-width: 640px; margin: 0.7rem auto 0; }

/* A small mascot hanging out beside the page title */
.hero-buddy {
  position: absolute;
  right: 2%;
  bottom: -14px;
  width: clamp(70px, 9vw, 110px);
  transform: rotate(5deg);
  filter: drop-shadow(0 4px 10px rgba(51, 46, 56, 0.18));
}

@media (max-width: 700px) {
  .hero-buddy { display: none; }
}

/* Trust bar */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  padding: 1.5rem 0;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.trust-item strong { display: block; font-size: 0.94rem; color: var(--ink); }

.trust-item svg {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  stroke: var(--brand);
}

.trust-item:nth-child(2) svg { stroke: var(--purple); }
.trust-item:nth-child(3) svg { stroke: var(--teal); }
.trust-item:nth-child(4) svg { stroke: var(--green); }

@media (max-width: 800px) {
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
}

/* How-it-works steps in a dashed feature panel */
.dash-panel {
  position: relative;
  background: #fff;
  border: 2.5px dashed var(--brand);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

.dash-panel .panel-splat {
  position: absolute;
  top: -22px;
  right: -14px;
  width: 74px;
  pointer-events: none;
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  counter-reset: hiw;
}

.hiw-step { text-align: center; }

.hiw-step .hiw-num {
  counter-increment: hiw;
  width: 46px;
  height: 46px;
  margin: 0 auto 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.hiw-step .hiw-num::after { content: counter(hiw); }

.hiw-step:nth-child(2) .hiw-num { background: var(--purple); }
.hiw-step:nth-child(3) .hiw-num { background: var(--teal); }
.hiw-step:nth-child(4) .hiw-num { background: var(--green); }

.hiw-step h3 { font-size: 1.02rem; margin-bottom: 0.25rem; }
.hiw-step p { font-size: 0.86rem; color: var(--ink-soft); }

@media (max-width: 800px) {
  .hiw-grid { grid-template-columns: repeat(2, 1fr); }
}

/* FAQ accordion */
details.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 0.65rem;
}

details.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  list-style: none;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--brand);
}

details.faq-item[open] summary { color: var(--brand); }
details.faq-item[open] summary::after { content: "–"; }

details.faq-item .faq-body {
  padding: 0 1.25rem 1.05rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Photo gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: 215px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 800px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 150px; }
}

/* "Where to find us next" event rows */
.event-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.3rem;
  margin-bottom: 0.7rem;
}

.event-row h3 { font-size: 1.02rem; }
.event-row p { font-size: 0.86rem; color: var(--ink-soft); }

.event-date {
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
  background: var(--tint-pink);
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
}

.event-date .ev-month {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.event-date .ev-day {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}

/* Testimonials */
.quote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
  font-size: 0.95rem;
}

.quote-card .stars { color: var(--amber); letter-spacing: 2px; margin-bottom: 0.5rem; }

.quote-card .quote-name {
  margin-top: 0.8rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
}

/* Celebrating mascots on order-success screens */
.success-mascots {
  width: 150px;
  margin: 0 auto 0.9rem;
  animation: pop 0.5s ease;
}


/* ------------------------------------------------------------------
   9. Footer
   ------------------------------------------------------------------ */

.site-footer {
  margin-top: 3.5rem;
  background: #3A2B45;
  color: #D8CFE0;
  padding: 3rem 0 1.6rem;
  font-size: 0.92rem;
}

.site-footer h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.7rem;
}

.site-footer a { color: #E8E2EC; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.45rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.4rem;
  margin-bottom: 2.2rem;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

.footer-mascots { width: 130px; margin-bottom: 0.8rem; }

.footer-slogan {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.footer-fine {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.78rem;
  color: #A79DAF;
}


/* ------------------------------------------------------------------
   10. Animations & reduced motion
   ------------------------------------------------------------------ */

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2.5deg); }
  75% { transform: rotate(2.5deg); }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Confetti bits are created by throwConfetti() in main.js */
.confetti-bit {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.85;
  animation: confetti-fall 2.6s ease-in forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(340px) rotate(540deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .candy-tile:hover,
  .brand:hover img,
  .hero-photo:hover .hero-mascots,
  .bag-preview .bag-shape.pop,
  .success-mascots { animation: none; }

  .confetti-bit { display: none; }
}
