/* ===== Base ===== */
html { background: #0a0a0a; }
body { -webkit-font-smoothing: antialiased; background: transparent; }

/* Custom selection */
::selection { background: #FB8C00; color: #fff; }

/* Hide scrollbar on the page chrome but keep functionality */
html { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Backdrops by flavor (set via [data-flavor]) */
#backdrop[data-flavor="mango"]      { background: linear-gradient(135deg, #FFB74D 0%, #FFA726 50%, #E65100 100%); }
#backdrop[data-flavor="chocolate"]  { background: linear-gradient(135deg, #8D6E63 0%, #5D4037 55%, #2E1A14 100%); }
#backdrop[data-flavor="pomegranate"]{ background: linear-gradient(135deg, #E57373 0%, #C62828 55%, #4A0E0E 100%); }

/* Subtle film grain */
.noise {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Slanted CTA */
.slanted-cta {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
}

/* Nav scroll state */
#nav.scrolled { background: rgba(0,0,0,0.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,0.08); }

/* Rise-in animation for hero */
.anim-rise { opacity: 0; transform: translateY(28px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.anim-rise:nth-child(2){ animation-delay: .08s; }
.anim-rise:nth-child(3){ animation-delay: .16s; }
.anim-rise:nth-child(4){ animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Reveal on scroll utility */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Scrollytelling stage */
.story-stage { height: 500vh; position: relative; }
.story-sticky {
  position: sticky; top: 0; height: 100vh; width: 100%;
  display: grid; place-items: center; overflow: hidden;
}

/* Big numerical price tag */
.price-pill {
  font-variant-numeric: tabular-nums;
}

/* Stat counters */
.stat-val {
  font-feature-settings: "ss01";
  letter-spacing: -0.04em;
}

/* Flavor menu pill button */
.flavor-pill { transition: all .25s ease; }
.flavor-pill[aria-pressed="true"] { background: #fff; color: #111; }
.flavor-pill[aria-pressed="false"]:hover { background: rgba(255,255,255,0.1); }

/* Glow under bottle */
.bottle-glow {
  position: absolute; left:50%; bottom: 8%; transform: translateX(-50%);
  width: 70vmin; height: 22vmin; border-radius: 50%; filter: blur(60px);
  background: radial-gradient(ellipse, rgba(255,255,255,0.45), transparent 60%);
  pointer-events: none; opacity: .55;
}

/* Floating chunks layer */
.chunk { position: absolute; will-change: transform, opacity; }

/* Buy now card */
.buy-card { background: rgba(0,0,0,0.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* Transition fade for flavor swap */
.fade-out { opacity: 0; transform: scale(.985); transition: opacity .45s ease, transform .45s ease; }
.fade-in  { opacity: 1; transform: none;       transition: opacity .55s ease, transform .55s ease; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .anim-rise, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
