/* ============================================================
   VYRO — Premium Energy Drink · Core Stylesheet
   Design language: pure-black luxury, liquid glass, flavor-accent theming.
   Tailwind v4 handles utility layout; this file owns the brand system.
   ============================================================ */

:root {
  --ink: #050506;
  --ink-2: #0a0a0c;
  --surface: #0d0d10;
  --surface-2: #131317;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-dim: #a8abb4;
  --text-mute: #6b6e78;

  /* Metallic logo gradient */
  --metal: linear-gradient(180deg, #ffffff 0%, #dfe2e6 42%, #9aa0a6 100%);

  /* Live accent — switched per flavor / per section by JS */
  --accent: #FFC400;
  --accent-rgb: 255, 196, 0;

  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset-ish base ---------- */
* { box-sizing: border-box; }
/* IMPORTANT: never set overflow (not even `clip`) on html/body. Doing so moves
   the scrolling element from <html> to <body>, and Lenis writes scroll to
   documentElement — so scroll silently freezes. Horizontal overflow from the
   wide flavors track is instead clipped on the `.flavors` section itself. */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body, "Inter", sans-serif);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.8s var(--ease-soft);
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display, "Space Grotesk", sans-serif); }
p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Lenis smooth-scroll recommended styles ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--accent); color: #000; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   AMBIENT LAYERS (noise, background canvas, blurred orbs)
   ============================================================ */
.noise-layer {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.orb {
  position: fixed; z-index: 0; border-radius: 50%; pointer-events: none;
  filter: blur(90px); opacity: 0.5; will-change: transform;
  transition: background 1s var(--ease-soft);
}
.orb--1 { width: 46vw; height: 46vw; top: -10vw; left: -8vw;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.55), transparent 68%); }
.orb--2 { width: 38vw; height: 38vw; bottom: -12vw; right: -6vw;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.35), transparent 70%);
  animation: float-slow 18s ease-in-out infinite; }
.orb--3 { width: 28vw; height: 28vw; top: 45%; left: 55%;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
  animation: float-slow 22s ease-in-out infinite reverse; }

@keyframes float-slow {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(4vw, -3vw, 0); }
}

/* Everything above ambient layers. NOTE: `header` is intentionally excluded —
   giving it position/z-index creates a stacking context that would trap the
   fixed .nav (z-index:100) beneath <main>, hiding it behind the hero video. */
main, footer, .cart-drawer, .cart-backdrop, .toast { position: relative; z-index: 2; }

/* ============================================================
   GLASS PRIMITIVE
   ============================================================ */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --btn-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.6rem; border-radius: var(--btn-radius);
  font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; user-select: none;
  /* One single, shared, fixed colour for every button. Hover is driven purely by opacity. */
  background: #fff; color: #000;
  opacity: 0.85;
  transition: opacity 0.25s var(--ease);
}
.btn i, .btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { opacity: 1; }

/* Variants keep only their size/shape — the colour is inherited from .btn. */
.btn--ghost { padding: 0.6rem; }

.btn--glow { font-size: 1.05rem; padding: 1.1rem 2.4rem; }

.btn--block { width: 100%; }
.btn--cart { position: relative; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--accent); color: #000; font-size: 0.7rem; font-weight: 700;
  transform: scale(0); transition: transform 0.3s var(--ease);
}
.cart-count.is-visible { transform: scale(1); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100% - 28px)); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.7rem 0.55rem 1.2rem; border-radius: 22px;
  transition: width 0.55s var(--ease), top 0.55s var(--ease),
              border-radius 0.55s var(--ease), padding 0.55s var(--ease),
              background 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft),
              border-color 0.45s var(--ease-soft);
}
/* Full-width solid bar once the page is scrolled (toggled by js/ui.js). */
.nav--solid {
  top: 0;
  width: 100%;
  border-radius: 0;
  padding: 0.55rem clamp(1.2rem, 5vw, 3.2rem);
  background: rgba(7, 7, 9, 0.82);
  border-color: transparent;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.85);
}

.nav__logo { display: inline-flex; align-items: center; }
.nav__logo-img {
  height: 40px; width: auto; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: height 0.55s var(--ease);
}
.nav--solid .nav__logo-img { height: 34px; }
.nav__links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav__links a {
  font-family: var(--font-heading); font-size: 0.9rem; font-weight: 500; color: var(--text-dim);
  position: relative; transition: color 0.25s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--accent); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 0.4rem; margin-left: 1.6rem; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__burger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  padding: calc(var(--nav-h) + 4rem) 1.5rem 6rem; overflow: hidden; text-align: center;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; will-change: transform; }
.hero__fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 30% 20%, rgba(255,196,0,0.28), transparent 60%),
    radial-gradient(50% 50% at 80% 70%, rgba(138,46,255,0.25), transparent 60%),
    linear-gradient(160deg, #0a0a0c, #050506);
  background-size: 180% 180%;
  animation: gradient-drift 16s ease-in-out infinite;
}
@keyframes gradient-drift {
  0%,100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  will-change: transform; opacity: 0; transition: opacity 1s var(--ease-soft);
}
.hero__video.is-ready { opacity: 1; }
.hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 50% 30%, rgba(5,5,6,0.25), rgba(5,5,6,0.75));
  opacity: 0.45; /* spec: 45% */
}

.hero__content { position: relative; z-index: 2; max-width: 900px; }
.hero__eyebrow {
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.4em;
  font-size: 0.72rem; color: var(--text-dim); margin-bottom: 1.4rem;
}
.hero__title {
  --tg: linear-gradient(180deg, #ffffff 30%, #b9bcc4 100%);
  font-weight: 700; letter-spacing: -0.02em; line-height: 0.95;
  font-size: clamp(3rem, 11vw, 8.5rem);
  background-image: var(--tg);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero__subtitle {
  margin: 1.6rem auto 2.4rem; max-width: 32ch; color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}
.hero__actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
  /* Sits clear of the iOS home bar and of mobile browser chrome that can eat
     the last strip of 100svh. */
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(1.75rem, 5vh, 3.25rem));
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem; color: var(--text-mute);
  text-decoration: none; transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.scroll-indicator:hover { color: var(--text); }
.scroll-indicator__label { font-size: 0.68rem; letter-spacing: 0.35em; text-transform: uppercase; }
.scroll-indicator__track {
  width: 22px; height: 36px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-indicator__dot { width: 4px; height: 8px; border-radius: 999px; background: var(--accent); animation: scroll-dot 1.8s var(--ease) infinite; }
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ============================================================
   SHARED SECTION HEADINGS
   ============================================================ */
.section-eyebrow {
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.34em;
  font-size: 0.72rem; color: var(--accent); margin-bottom: 1rem;
}
.section-title {
  --tg: linear-gradient(180deg, #fff, #c4c7cd);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.02;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  background-image: var(--tg);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* When a gradient heading is split into masked lines, the text moves into a
   nested span — re-apply the gradient clip to that span so it actually paints
   (background-clip:text on the ancestor doesn't render through the wrapper). */
[data-split] .split-line > span {
  background-image: var(--tg, linear-gradient(180deg, #fff, #c4c7cd));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.section-lead { margin-top: 1.2rem; color: var(--text-dim); max-width: 52ch; font-size: clamp(1rem, 2vw, 1.15rem); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; padding: 0 1.5rem; }
.section-head .section-lead { margin-inline: auto; }

/* ============================================================
   FLAVORS (pinned horizontal scroll)
   ============================================================ */
/* Clips the wide horizontal track here (NOT on html/body — see base note). */
.flavors { position: relative; padding: 7rem 0 0; overflow: hidden; }
.flavors__intro { text-align: center; max-width: 720px; margin: 0 auto 3rem; padding: 0 1.5rem; }
.flavors__track {
  display: flex; gap: 2rem; padding: 2rem clamp(1.5rem, 8vw, 12vw) 6rem; width: max-content;
}

/* Base surface (background, border, blur, shadow) comes from the shared .glass
   primitive so flavor cards and shop cards read as one family. */
.flavor-card {
  position: relative; flex: 0 0 auto; width: min(84vw, 420px); min-height: 560px;
  border-radius: 24px; padding: 2.4rem; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}
.flavor-card:hover { transform: translateY(-8px); border-color: rgba(var(--accent-rgb),0.55); box-shadow: 0 36px 70px -28px rgba(var(--accent-rgb),0.45); }
.flavor-card__glow {
  position: absolute; inset: 0; z-index: 0; opacity: 0.9;
  background: radial-gradient(80% 60% at 50% 12%, rgba(var(--accent-rgb),0.35), transparent 62%);
}
.flavor-card__index {
  font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.2em; color: var(--accent);
}
.flavor-card__body { position: relative; z-index: 2; }
.flavor-card__name { font-size: 2rem; font-weight: 700; margin: 0.4rem 0 0.7rem; }
.flavor-card__desc { color: var(--text-dim); font-size: 0.98rem; }
.flavor-card__ingredients { margin-top: 0.9rem; color: var(--text-mute); font-size: 0.82rem; letter-spacing: 0.02em; }

.energy-meter { display: flex; gap: 6px; margin: 1.3rem 0 1.6rem; }
.energy-meter span { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.10); }
/* filled levels set per card via nth-child overrides */
.flavor-card[data-accent="mango"] .energy-meter span:nth-child(-n+4),
.flavor-card[data-accent="lime"] .energy-meter span:nth-child(-n+3),
.flavor-card[data-accent="berry"] .energy-meter span,
.flavor-card[data-accent="red"] .energy-meter span {
  background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb),0.7);
}

/* ---------- Product cans (real WebP images) ----------
   Centered without a transform (auto-margins / grid) so the float animation
   owns the transform entirely — letting each can bob on its own phase. */
.flavor-card__can,
.product-card__can {
  height: auto; object-fit: contain;
  animation: can-float 6s ease-in-out infinite;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.flavor-card__can {
  position: absolute; top: 2%; left: 0; right: 0; margin-inline: auto;
  width: 82%; max-width: 250px; z-index: 1;
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 52px rgba(var(--accent-rgb), 0.45));
}
.product-card__can {
  height: 200px; width: auto; max-width: 92%;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 34px rgba(var(--accent-rgb), 0.4));
  /* `rotate`/`scale` are individual transform props — they compose with the
     float animation's `transform` instead of fighting it. */
  transition: rotate 0.45s var(--ease), scale 0.45s var(--ease);
}
.product-card:hover .product-card__can { rotate: 6deg; scale: 1.05; }

/* Independent bob — each grid position gets a distinct phase + speed so the
   cans never float in sync (applies to both the Flavors and Shop grids). */
.flavor-card:nth-child(1) .flavor-card__can, .product-card:nth-child(1) .product-card__can { animation-duration: 6s;   animation-delay: 0s; }
.flavor-card:nth-child(2) .flavor-card__can, .product-card:nth-child(2) .product-card__can { animation-duration: 6.9s; animation-delay: -1.6s; }
.flavor-card:nth-child(3) .flavor-card__can, .product-card:nth-child(3) .product-card__can { animation-duration: 5.6s; animation-delay: -3.1s; }
.flavor-card:nth-child(4) .flavor-card__can, .product-card:nth-child(4) .product-card__can { animation-duration: 7.4s; animation-delay: -2.2s; }

@keyframes can-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-16px) rotate(1.5deg); }
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { padding: 8rem 1.5rem; max-width: 1180px; margin: 0 auto; }
.features__grid {
  display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card { padding: 2rem; border-radius: 22px; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease); }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(var(--accent-rgb),0.4); }
.feature-card i, .feature-card svg {
  width: 32px; height: 32px; color: var(--accent); margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.6));
}
.feature-card h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ============================================================
   INGREDIENTS
   ============================================================ */
.ingredients { position: relative; padding: 9rem 1.5rem; overflow: hidden; text-align: center; }
.ingredients__content { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

/* ============================================================
   GLOBAL FLOATING-FRUIT FIELD
   A fixed layer behind all content (z-0, below <main> at z-2). The opaque
   hero video covers it during the hero; every transparent section after it
   lets the fruit show through, so the field reads as a global ambient
   background rather than belonging to one section.
   ============================================================ */
.fruit-field {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
/* Depth groups — mouse-parallaxed by js/ui.js. They fill the field so the
   fruits' absolute positioning stays relative to the viewport as before. */
.fruit-layer { position: absolute; inset: 0; will-change: transform; }
/* `rotate:` (individual transform prop) sets each fruit's static base tilt;
   the keyframes animate `transform` (drift + subtle spin) and compose with it. */
.floater {
  position: absolute; width: 150px; height: auto; object-fit: contain;
  will-change: transform; user-select: none; -webkit-user-drag: none;
}
/* Depth layers — size/blur/opacity build front-to-back depth. */
.floater--front { opacity: 0.9;  filter: drop-shadow(0 26px 34px rgba(0,0,0,0.5)); }
.floater--mid   { opacity: 0.62; filter: blur(1.5px) drop-shadow(0 18px 26px rgba(0,0,0,0.4)); }
.floater--back  { opacity: 0.38; filter: blur(4px) drop-shadow(0 10px 20px rgba(0,0,0,0.35)); }

/* Position across the viewport + base orientation + independent drift.
   Central fruits are kept to the faint back layer so copy stays readable. */
.floater--mango      { width: 190px; top: 9%;    left: 3%;   rotate: -14deg; animation: fruit-float-a 13s ease-in-out infinite; }
.floater--grenade    { width: 168px; bottom: 8%; right: 4%;  rotate: 16deg;  animation: fruit-float-b 15s ease-in-out infinite; }
.floater--framboises { width: 150px; top: 56%;   left: 4%;   rotate: -18deg; animation: fruit-float-c 14s ease-in-out infinite; }
.floater--citron     { width: 126px; top: 8%;    right: 7%;  rotate: 22deg;  animation: fruit-float-b 12s ease-in-out infinite; }
.floater--fraise     { width: 96px;  bottom: 13%; left: 33%; rotate: 30deg;  animation: fruit-float-a 11s ease-in-out infinite; }
.floater--framboise  { width: 88px;  top: 42%;   left: 47%;  rotate: -22deg; animation: fruit-float-c 16s ease-in-out infinite; }
.floater--myrtille   { width: 86px;  top: 20%;   right: 32%; rotate: 12deg;  animation: fruit-float-a 15s ease-in-out infinite; }
.floater--citron2    { width: 104px; bottom: 27%; right: 21%; rotate: -30deg; animation: fruit-float-b 13s ease-in-out infinite; }

@keyframes fruit-float-a { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(12px,-26px) rotate(6deg); } }
@keyframes fruit-float-b { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-18px,20px) rotate(-6deg); } }
@keyframes fruit-float-c { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(20px,16px) rotate(5deg); } }

@media (max-width: 860px) {
  /* Thin the field on small screens so fruit doesn't crowd the copy. */
  .floater--fraise, .floater--framboise, .floater--myrtille, .floater--citron2 { display: none; }
  .floater--mango { width: 120px; }
  .floater--grenade, .floater--framboises, .floater--citron { width: 100px; }
}

.ingredients__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.5rem; margin-top: 3.5rem;
}
.ingredients__stats dt { font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; color: #fff; }
.ingredients__stats dd { color: var(--text-mute); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; margin-top: 0.3rem; }

/* ============================================================
   SHOP
   ============================================================ */
.shop { padding: 6rem 1.5rem 8rem; max-width: 1180px; margin: 0 auto; }
.shop__grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.product-card {
  padding: 1.6rem; border-radius: 24px; text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.product-card:hover { transform: translateY(-8px); border-color: rgba(var(--accent-rgb),0.55); box-shadow: 0 36px 70px -28px rgba(var(--accent-rgb),0.45); }
.product-card__media {
  height: 230px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 18px;
  background: radial-gradient(70% 60% at 50% 30%, rgba(var(--accent-rgb),0.22), transparent 65%);
}
.product-card h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; }
.product-card__price { color: var(--text-dim); margin: 0.3rem 0 1rem; font-weight: 500; }

/* ============================================================
   SHOWCASE (full-bleed parallax lifestyle band)
   ============================================================ */
.showcase {
  position: relative; height: min(78vh, 680px); overflow: hidden;
  display: grid; place-items: center; margin: 2rem 0;
}
/* Media is taller than the frame so the scroll-driven vertical shift never
   exposes an edge. GSAP animates the <img> yPercent (see animations.js). */
/* The photo is a viewport-fixed background: it stays put while the section
   scrolls over it, giving the classic parallax reveal — no JS involved. */
.showcase__media {
  position: absolute; inset: 0; z-index: 0;
  background: url("../assets/img/showcase/surfer-1536.webp") center / cover no-repeat fixed;
  background-image: -webkit-image-set(
    url("../assets/img/showcase/surfer-960.webp") 1x,
    url("../assets/img/showcase/surfer-1536.webp") 2x);
  background-image: image-set(
    url("../assets/img/showcase/surfer-960.webp") 1x,
    url("../assets/img/showcase/surfer-1536.webp") 2x);
}
/* iOS/Android largely ignore or jank on `fixed`; fall back to a static cover. */
@media (max-width: 768px), (hover: none) {
  .showcase__media { background-attachment: scroll; }
}
/* Scrim for text legibility over the photo. */
.showcase::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,5,6,0.35), rgba(5,5,6,0.15) 40%, rgba(5,5,6,0.75));
}
.showcase__overlay { position: relative; z-index: 2; text-align: center; padding: 1.5rem; }
.showcase__eyebrow {
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.8rem; color: var(--accent); margin-bottom: 0.6rem;
}
.showcase__title {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: clamp(2rem, 6vw, 4rem); line-height: 1.05;
  text-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ============================================================
   TESTIMONIALS (auto-scrolling marquee)
   ============================================================ */
.testimonials { padding: 4rem 0 8rem; overflow: hidden; }
/* Edge fade is done with overlay gradients (not a CSS mask): a mask on this
   ancestor would isolate the subtree and neutralise the cards' backdrop-filter,
   killing the glass blur. Overlays keep the fade while letting the blur work. */
.marquee { position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 8%; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.marquee__track { display: flex; gap: 1.4rem; width: max-content; will-change: transform; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.testi-card {
  flex: 0 0 auto; width: 340px; padding: 1.8rem; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
}
.testi-card__head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.testi-card__avatar {
  width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: #000;
  background: linear-gradient(135deg, var(--accent), #fff);
}
img.testi-card__avatar { object-fit: cover; background: var(--surface-2); }
.testi-card__name { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; }
.testi-card__role { color: var(--text-mute); font-size: 0.78rem; }
.testi-card__stars { color: var(--accent); display: flex; gap: 2px; margin-left: auto; }
.testi-card__stars i, .testi-card__stars svg { width: 15px; height: 15px; fill: currentColor; }
.testi-card__quote { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }

/* ============================================================
   CTA
   ============================================================ */
.cta { padding: 4rem 1.5rem 9rem; }
.cta__inner {
  max-width: 860px; margin: 0 auto; text-align: center; padding: clamp(3rem, 8vw, 6rem) 2rem; border-radius: 34px;
  position: relative; overflow: hidden;
}
.cta__inner::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(70% 90% at 50% 0%, rgba(var(--accent-rgb),0.28), transparent 60%);
}
.cta__title { position: relative; font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.02em; }
.cta__lead { position: relative; color: var(--text-dim); margin: 1rem 0 2.2rem; }
.cta .btn--glow { position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 5rem 1.5rem 2.5rem; max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); }
.footer__top { display: flex; flex-wrap: wrap; gap: 3rem; justify-content: space-between; }
.footer__brand { max-width: 320px; }
.footer__logo { display: inline-block; margin-bottom: 1.4rem; }
.footer__logo-img { height: 58px; width: auto; object-fit: contain; opacity: 0.95; }
.footer__social { display: flex; gap: 0.6rem; }
.footer__social a {
  width: 42px; height: 42px; display: block;
  opacity: 0.85; transition: opacity 0.25s var(--ease);
}
.footer__social a:hover { opacity: 1; }
.footer__social img { width: 100%; height: 100%; object-fit: contain; }

.footer__newsletter { min-width: 280px; flex: 1; max-width: 420px; }
.footer__newsletter label { display: block; font-family: var(--font-heading); font-weight: 600; margin-bottom: 0.8rem; }
.footer__newsletter-row { display: flex; gap: 0.6rem; }
.footer__newsletter input {
  flex: 1; padding: 0.85rem 1.1rem; border-radius: 999px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--line); color: #fff; font-family: var(--font-body); font-size: 0.95rem;
}
.footer__newsletter input::placeholder { color: var(--text-mute); }
.footer__newsletter input:focus { border-color: rgba(var(--accent-rgb),0.6); outline: none; }
.footer__newsletter-msg { font-size: 0.85rem; margin-top: 0.7rem; min-height: 1.2em; color: var(--accent); }

.footer__links { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 3rem 0 1.5rem; }
.footer__links a { color: var(--text-mute); font-size: 0.88rem; transition: color 0.25s var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__copy { color: var(--text-mute); font-size: 0.82rem; }

/* ============================================================
   CART DRAWER + TOAST
   ============================================================ */
.cart-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.35s var(--ease); }
.cart-backdrop.is-open { opacity: 1; }
.cart-backdrop[hidden] { display: none; }

.cart-drawer {
  position: fixed; top: 0; right: 0; z-index: 160; height: 100svh; width: min(400px, 90vw);
  transform: translateX(100%); transition: transform 0.45s var(--ease);
  display: flex; flex-direction: column; border-radius: 0; border-right: 0; padding: 1.6rem;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.cart-drawer__head h2 { font-size: 1.3rem; }
.cart-drawer__items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.cart-drawer__empty { color: var(--text-mute); text-align: center; margin-top: 3rem; }
.cart-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem; border-radius: 14px; border: 1px solid var(--line); }
.cart-item__dot { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; }
.cart-item__name { font-family: var(--font-heading); font-weight: 600; font-size: 0.92rem; }
.cart-item__meta { color: var(--text-mute); font-size: 0.8rem; }
.cart-item__remove { margin-left: auto; background: none; border: 0; color: var(--text-mute); cursor: pointer; padding: 6px; border-radius: 8px; }
.cart-item__remove:hover { color: #fff; background: rgba(255,255,255,0.08); }
.cart-drawer__foot { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1rem; }
.cart-drawer__total { display: flex; justify-content: space-between; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); z-index: 200;
  background: rgba(20,20,24,0.95); backdrop-filter: blur(14px); border: 1px solid var(--line-strong);
  color: #fff; padding: 0.9rem 1.4rem; border-radius: 14px; font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8); transition: transform 0.4s var(--ease); pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); }

/* ============================================================
   SCROLL-REVEAL INITIAL STATES (GSAP animates to visible)
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(28px); }
.split-line { display: inline-block; overflow: hidden; }
.split-line > span { display: inline-block; will-change: transform; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav__links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 1.2rem;
    padding: 1.6rem; border-radius: 20px; text-align: center;
    background: rgba(12,12,15,0.92); backdrop-filter: blur(22px); border: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all 0.3s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__burger { display: flex; }
  .ingredients__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .footer__newsletter-row { flex-direction: column; }
  .footer__newsletter input { width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@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 !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .orb { display: none; }
}
