/* АРТРО ПЛЮС — cinematic scroll-scrub */
:root {
  --bg: #050B14;
  --teal: #2FD4C6;
  --amber: #F0B35B;
  --red: #E85D3D;
  --text: #EAF2F6;
  --muted: rgba(234, 242, 246, 0.62);
  --font: -apple-system, "SF Pro Display", Inter, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- LOADER ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: opacity 0.6s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
}
.loader-pct {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.loader-bar {
  width: min(220px, 60vw);
  height: 2px;
  background: rgba(47, 212, 198, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--teal);
  transition: width 0.2s ease;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(5, 11, 20, 0.55) 0%,
    rgba(5, 11, 20, 0.25) 45%,
    rgba(5, 11, 20, 0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.25rem;
}
.hero h1 {
  font-size: clamp(3rem, 12vw, 7.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 1rem;
}
.hero-sub {
  font-size: clamp(1.3rem, 5vw, 2.4rem);
  font-weight: 600;
  color: var(--amber);
  margin-top: 0.6rem;
}
.hero-cue {
  position: absolute;
  bottom: calc(1.4rem + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  animation: cue-bounce 2.2s ease-in-out infinite;
}
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ---------- SCRUB SECTIONS ---------- */
.scrub {
  position: relative;
  /* height set by app.js: frames * 6vh, min 300vh */
  min-height: 300vh;
}
.scrub .stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}
.scrub canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scrub .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.beat {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, 0);
  width: min(88vw, 760px);
  text-align: center;
  font-size: clamp(1.35rem, 4.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 24px rgba(5, 11, 20, 0.9);
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}
.beat.chip {
  font-size: clamp(0.85rem, 3vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(232, 93, 61, 0.12);
  border: 1px solid rgba(232, 93, 61, 0.5);
  border-radius: 999px;
  padding: 0.7em 1.4em;
  width: auto;
  max-width: 88vw;
  top: 74%;
}

/* ---------- INGREDIENTS ---------- */
.ingredients {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: clamp(4rem, 10vw, 8rem) 1.25rem;
  text-align: center;
}
.ingredients h2 {
  font-size: clamp(1.8rem, 6.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 1rem auto 3rem;
  max-width: 20ch;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}
.card {
  background: rgba(47, 212, 198, 0.05);
  border: 1px solid rgba(47, 212, 198, 0.16);
  border-radius: 18px;
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
}
.card img {
  width: min(180px, 46vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 auto 1.25rem;
}
.card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
}
.card p { color: var(--muted); line-height: 1.5; font-size: 0.98rem; }
.card-teal h3 { color: var(--teal); }
.card-green h3 { color: #7BE8A2; }
.card-white h3 { color: var(--text); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(240, 179, 91, 0.12), transparent 65%),
    var(--bg);
  padding: clamp(4.5rem, 12vw, 9rem) 1.25rem;
  text-align: center;
}
.cta-jar {
  width: min(300px, 62vw);
  margin: 0 auto 2rem;
  filter: drop-shadow(0 24px 60px rgba(240, 179, 91, 0.22));
}
.cta h2 {
  font-size: clamp(2.4rem, 9vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.cta-offer {
  font-size: clamp(1.1rem, 4.4vw, 1.6rem);
  font-weight: 600;
  color: var(--muted);
  margin: 0.9rem 0 2.4rem;
}
.cta-offer .accent { color: var(--amber); font-weight: 800; }
.cta-btn {
  display: inline-block;
  background: var(--amber);
  color: #14100A;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  font-weight: 800;
  text-decoration: none;
  padding: 1.1em 2.4em;
  border-radius: 999px;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 40px rgba(240, 179, 91, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(240, 179, 91, 0.5);
}

/* ---------- FOOTER ---------- */
footer {
  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top: 1px solid rgba(234, 242, 246, 0.08);
  padding: 2rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-cue { animation: none; }
  .cta-btn { transition: none; }
  body.reduced-motion .scrub {
    min-height: auto;
    height: auto !important;
  }
  body.reduced-motion .scrub .stage {
    position: relative;
    height: 100dvh;
  }
  body.reduced-motion .beat {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    opacity: 1;
    margin: 1.2rem auto;
  }
  body.reduced-motion .scrub .beats-static {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.25rem 3.5rem;
    background: linear-gradient(180deg, transparent 40%, rgba(5, 11, 20, 0.82) 100%);
  }
}
