/* ============================================================
   Flavor Friends — marketing microsite
   Visual language lifted straight from the game:
   pink sky gradient, chunky 3D candy buttons, kawaii bounce.
   ============================================================ */

:root {
  --pink-0:   #fff6fb;
  --pink-1:   #ffd0e8;
  --pink-2:   #ffb0cc;
  --pink-3:   #e890c8;
  --magenta:  #e8245e;
  --rose:     #ff6a96;

  --purple-1: #b06ef0;
  --purple-2: #7c2fd8;
  --purple-3: #4e1a90;
  --grape:    #1d1130;

  --teal-1:   #4de8c8;
  --teal-2:   #18b89a;
  --teal-3:   #0d8070;

  --sun-1:    #ffe566;
  --sun-2:    #ffcc44;
  --orange:   #f59200;
  --orange-d: #b06400;

  --ink:      #46265f;
  --ink-soft: #7a5a9a;

  --shadow-soft: 0 18px 40px rgba(120,40,100,0.22);

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

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #ffd0e8;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* fixed gradient sky behind everything — avoids iOS background-attachment:fixed bug */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(170deg, #ffe3f1 0%, #ffd0e8 26%, #ffb6d4 62%, #e79ad0 100%);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.5px;
}

/* sprinkle confetti canvas sits behind everything */
#sprinkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrap { position: relative; z-index: 1; }
.container { width: min(1080px, 90vw); margin-inline: auto; }

/* ============================================================
   Chunky candy button (matches in-game CTA)
   ============================================================ */
.btn {
  --b: var(--purple-2);
  --b-dark: var(--purple-3);
  --b-light: var(--purple-1);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: #fff;
  padding: 0.85em 1.6em;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--b-light) 0%, var(--b) 100%);
  box-shadow: 0 6px 0 var(--b-dark), 0 14px 24px rgba(80,20,120,0.34);
  text-shadow: 0 2px 4px rgba(60,10,90,0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--b-dark), 0 6px 12px rgba(80,20,120,0.3); }
.btn:hover { transform: translateY(-2px); }
.btn::before {
  content: "";
  position: absolute; inset: 3px 8px auto 8px; height: 38%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent);
  pointer-events: none;
}
.btn.sun { --b: var(--orange); --b-dark: var(--orange-d); --b-light: var(--sun-2); color: #6b3a00; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.btn.teal { --b: var(--teal-2); --b-dark: var(--teal-3); --b-light: var(--teal-1); }
.btn.rose { --b: var(--magenta); --b-dark: #a01040; --b-light: var(--rose); }
.btn.lg { font-size: 1.25rem; padding: 1em 2em; }

/* App store badge link */
.store-badge {
  display: inline-flex; align-items: center; gap: 0.7em;
  background: #15101f;
  color: #fff;
  padding: 0.7em 1.4em 0.7em 1.2em;
  border-radius: 18px;
  box-shadow: 0 8px 0 #000, 0 16px 28px rgba(20,8,40,0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(6px); box-shadow: 0 2px 0 #000, 0 6px 14px rgba(20,8,40,0.4); }
.store-badge svg { width: 30px; height: 30px; flex: none; }
.store-badge .sb-small { font-size: 0.66rem; opacity: 0.82; line-height: 1; text-transform: uppercase; letter-spacing: 1px; }
.store-badge .sb-big { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 30;
  padding: 0.7rem 0;
  transition: padding 0.2s ease;
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  padding: 0.5rem 0.7rem 0.5rem 0.9rem;
  box-shadow: 0 10px 28px rgba(150,60,120,0.18);
}
.nav.scrolled .nav-inner { background: rgba(255,255,255,0.78); }
.nav-logo { height: 38px; width: auto; display: block; }
.nav-links { display: flex; gap: 0.3rem; margin-left: auto; align-items: center; }
.nav-links a.lnk {
  font-family: var(--font-display); font-weight: 600;
  color: var(--purple-3); padding: 0.45em 0.9em; border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a.lnk:hover { background: rgba(124,47,216,0.12); }
.nav-cta { margin-left: 0.3rem; }
.nav .btn { font-size: 0.95rem; padding: 0.6em 1.2em; box-shadow: 0 4px 0 var(--b-dark), 0 8px 16px rgba(80,20,120,0.3); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 3.5rem 0 2rem; text-align: center; overflow: hidden; }
.hero-logo {
  width: min(540px, 84vw); height: auto;
  filter: drop-shadow(0 14px 22px rgba(120,30,100,0.35));
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
  will-change: transform;
}
.hero-logo:hover { transform: scale(1.04) rotate(-1deg); }
.hero-tagline {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  color: var(--purple-3);
  margin: 1.1rem auto 0.3rem; max-width: 18ch;
  text-shadow: 0 2px 0 rgba(255,255,255,0.55);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem); font-weight: 700;
  color: var(--ink-soft); max-width: 40ch; margin: 0.4rem auto 1.6rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center; }

/* floating cone characters */
.hero-container { position: relative; }
.cone {
  position: absolute; bottom: -10px; width: clamp(120px, 17vw, 230px);
  height: auto; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 16px 18px rgba(120,40,100,0.3));
  will-change: transform;
}
.cone.left  { left: 0; animation: bob 4.2s ease-in-out infinite; }
.cone.right { right: 0; animation: bob 4.2s ease-in-out infinite 0.8s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-18px) rotate(2deg); } }

/* sweet word ticker */
.ticker {
  position: relative; z-index: 3;
  margin-top: 2.5rem;
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2));
  border-block: 3px solid rgba(255,255,255,0.45);
  padding: 0.6rem 0;
  transform: rotate(-1.4deg) scale(1.04);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.ticker-track { display: flex; gap: 2.5rem; width: max-content; animation: scrollx 22s linear infinite; }
.ticker-track span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: #fff; text-shadow: 0 2px 3px rgba(60,10,90,0.4);
  display: inline-flex; align-items: center; gap: 2.5rem;
  white-space: nowrap;
}
.ticker-track span::after { content: "🍦"; font-size: 1rem; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ============================================================
   Section scaffolding
   ============================================================ */
section { position: relative; }
.section-pad { padding: 4.5rem 0; }
.kicker {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--magenta); background: #fff;
  padding: 0.4em 1em; border-radius: 999px;
  box-shadow: 0 4px 0 rgba(232,36,94,0.18);
  margin-bottom: 0.9rem;
}
.section-title {
  font-size: clamp(1.9rem, 4.6vw, 3rem); color: var(--purple-3);
  text-shadow: 0 3px 0 rgba(255,255,255,0.5);
}
.section-head { text-align: center; margin-bottom: 2.6rem; }
.section-head .section-sub { color: var(--ink-soft); font-weight: 700; font-size: 1.1rem; margin-top: 0.5rem; max-width: 46ch; margin-inline: auto; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px) scale(0.98); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.34,1.3,.5,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Feature rows (alternating, tilted screenshots)
   ============================================================ */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  margin-bottom: 3.5rem;
}
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media { position: relative; }
.feature-shot {
  width: 100%; border-radius: 22px; display: block;
  border: 5px solid #fff;
  box-shadow: var(--shadow-soft);
  transform: rotate(-2deg);
  transition: transform 0.3s cubic-bezier(.34,1.4,.5,1);
}
.feature:nth-child(even) .feature-shot { transform: rotate(2deg); }
.feature-shot:hover { transform: rotate(0deg) scale(1.02); }
.feature-emoji {
  position: absolute; top: -22px; left: -16px; font-size: 2.6rem;
  filter: drop-shadow(0 6px 6px rgba(120,40,100,0.3));
  animation: bob 5s ease-in-out infinite;
}
.feature-title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); color: var(--purple-3); margin-bottom: 0.7rem; }
.feature-body { font-size: 1.12rem; font-weight: 600; color: var(--ink-soft); max-width: 40ch; }
.feature-tag {
  display: inline-block; margin-top: 1.1rem;
  font-family: var(--font-display); font-weight: 600; color: var(--teal-3);
  background: rgba(77,232,200,0.28); padding: 0.4em 1em; border-radius: 999px;
}

/* ============================================================
   Worlds
   ============================================================ */
.worlds { background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.35)); }
.world-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; }
.world-card {
  background: #fff; border-radius: 22px; padding: 1.5rem 1.3rem; text-align: center;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 12px 26px rgba(150,60,120,0.16);
  transition: transform 0.2s ease;
}
.world-card:hover { transform: translateY(-6px) rotate(-1deg); }
.world-emoji { font-size: 2.8rem; display: block; margin-bottom: 0.5rem; }
.world-num { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--magenta); }
.world-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--purple-3); margin: 0.2rem 0 0.3rem; }
.world-desc { font-size: 0.92rem; font-weight: 700; color: var(--ink-soft); }

/* ============================================================
   Stats
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.2rem; text-align: center; }
.stat {
  background: linear-gradient(180deg, var(--sun-1), var(--sun-2));
  border-radius: 22px; padding: 1.6rem 1rem;
  box-shadow: 0 8px 0 var(--orange-d), 0 16px 28px rgba(200,120,0,0.28);
  border: 3px solid rgba(255,255,255,0.6);
}
.stat:nth-child(2) { background: linear-gradient(180deg, var(--teal-1), var(--teal-2)); box-shadow: 0 8px 0 var(--teal-3), 0 16px 28px rgba(13,128,112,0.28); }
.stat:nth-child(3) { background: linear-gradient(180deg, var(--rose), var(--magenta)); box-shadow: 0 8px 0 #a01040, 0 16px 28px rgba(200,30,80,0.28); }
.stat:nth-child(4) { background: linear-gradient(180deg, var(--purple-1), var(--purple-2)); box-shadow: 0 8px 0 var(--purple-3), 0 16px 28px rgba(80,20,120,0.28); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,0.12); line-height: 1; }
.stat:first-child .stat-num { color: #6b3a00; text-shadow: 0 2px 0 rgba(255,255,255,0.4); }
.stat-label { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: rgba(255,255,255,0.95); margin-top: 0.3rem; }
.stat:first-child .stat-label { color: #6b3a00; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band { text-align: center; padding: 4.5rem 0; }
.cta-card {
  position: relative;
  background: linear-gradient(135deg, var(--purple-2), var(--magenta));
  border-radius: 34px; padding: 3rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 4px solid rgba(255,255,255,0.4);
  overflow: hidden;
}
.cta-card h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.8rem); text-shadow: 0 3px 6px rgba(40,0,40,0.3); }
.cta-card p { color: rgba(255,255,255,0.92); font-weight: 700; font-size: 1.12rem; margin: 0.7rem auto 1.8rem; max-width: 42ch; }
.cta-card .sparkle { position: absolute; font-size: 2rem; opacity: 0.6; animation: twinkle 3s ease-in-out infinite; }

@keyframes twinkle { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 0.9; transform: scale(1.15); } }

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; z-index: 1; padding: 3rem 0 2.5rem; text-align: center; }
.footer-logo { height: 46px; margin-bottom: 1rem; filter: drop-shadow(0 6px 10px rgba(120,30,100,0.25)); }
.footer-links { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.footer-links a { font-family: var(--font-display); font-weight: 600; color: var(--purple-3); }
.footer-links a:hover { color: var(--magenta); }
.footer-copy { color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; }
.footer-copy a { color: var(--magenta); }

/* ============================================================
   Content pages (support / privacy)
   ============================================================ */
.page-hero { text-align: center; padding: 3rem 0 1rem; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--purple-3); text-shadow: 0 3px 0 rgba(255,255,255,0.5); }
.page-hero p { color: var(--ink-soft); font-weight: 700; font-size: 1.15rem; margin-top: 0.6rem; }
.card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  border: 3px solid rgba(255,255,255,0.8);
  border-radius: 26px; padding: 2.2rem 2.2rem;
  box-shadow: 0 14px 34px rgba(150,60,120,0.16);
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.5rem; color: var(--purple-3); margin-bottom: 0.6rem; }
.card h3 { font-size: 1.15rem; color: var(--magenta); margin: 1.3rem 0 0.4rem; }
.card p, .card li { color: var(--ink); font-weight: 600; font-size: 1.02rem; margin-bottom: 0.7rem; }
.card ul { padding-left: 1.3rem; }
.card li { margin-bottom: 0.4rem; }
.card a:not(.btn) { color: var(--purple-2); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(124,47,216,0.35); }
.card a:hover { color: var(--magenta); }
.lead { font-size: 1.15rem !important; }
.muted { color: var(--ink-soft); font-size: 0.92rem; }

/* contact tiles */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.contact-tile {
  background: var(--purple-2);
  color: #fff; border-radius: 22px; padding: 1.6rem;
  box-shadow: 0 4px 0 var(--purple-3), 0 8px 20px rgba(80,20,120,0.22);
  display: block; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-tile:hover { transform: translateY(-3px); }
.contact-tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--purple-3), 0 4px 10px rgba(80,20,120,0.2); }
.contact-tile.teal { background: var(--teal-2); box-shadow: 0 4px 0 var(--teal-3), 0 8px 20px rgba(13,128,112,0.22); }
.contact-tile.teal:active { box-shadow: 0 2px 0 var(--teal-3), 0 4px 10px rgba(13,128,112,0.2); }
.contact-tile .ct-emoji { font-size: 2rem; }
.contact-tile .ct-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 0.3rem 0 0.2rem; }
.contact-tile .ct-sub { font-weight: 700; font-size: 0.95rem; word-break: break-word; opacity: 0.9; }

/* FAQ accordion */
.faq { background: rgba(255,255,255,0.82); border: 3px solid rgba(255,255,255,0.8); border-radius: 20px; margin-bottom: 0.9rem; overflow: hidden; box-shadow: 0 8px 20px rgba(150,60,120,0.12); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.4rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--purple-3);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--magenta); transition: transform 0.2s ease; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.4rem 1.2rem; color: var(--ink); font-weight: 600; }

.back-home { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.5rem; font-family: var(--font-display); font-weight: 600; color: var(--purple-2); }
.back-home:hover { color: var(--magenta); }

/* ============================================================
   Burger menu
   ============================================================ */
.burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; padding: 6px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
  margin-left: auto;
}
.burger span {
  display: block; width: 100%; height: 3px;
  border-radius: 3px; background: var(--purple-3);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(120,40,100,0.18);
  padding: 0.5rem;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile-menu.open { display: block; }
.mobile-menu a.lnk {
  display: block;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  color: var(--purple-3);
  padding: 0.75em 1em; border-radius: 12px;
  transition: background 0.15s ease;
}
.mobile-menu a.lnk:hover { background: rgba(124,47,216,0.1); }
.mobile-menu .btn {
  display: block; text-align: center;
  margin: 0.4rem 0 0.1rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .cone {
    width: clamp(64px, 17vw, 108px);
    bottom: -18px;
    z-index: 1;
  }
  .cone.left  { left: calc(50% - 50vw + 2px); }
  .cone.right { right: calc(50% - 50vw + 2px); }
  .hero-logo,
  .hero-tagline,
  .hero-sub,
  .hero-actions {
    position: relative;
    z-index: 3;
  }
}

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-shot, .feature:nth-child(even) .feature-shot { transform: rotate(-1.5deg); }
  /* hide desktop links, show burger */
  .nav-links a.lnk,
  .nav-links a.btn.nav-cta { display: none; }
  .burger { display: flex; }
  .nav-inner { position: relative; }
  .cone {
    width: clamp(56px, 15vw, 92px);
    bottom: -22px;
  }
  .hero { padding-top: 2rem; }
  .section-pad { padding: 3rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto; }
}
