/* =====================================================================
   Letstick — campaign layer (Higgsfield Nano Banana Pro imagery)
   Real campaign photography carries every scene. Narration is voice-only:
   a small orb pulses while she speaks; text appears only with captions on (Aa).
   ===================================================================== */

/* ---------- campaign scenes: the photo fills the screen (9:16 source) ---------- */
.stage-scene { aspect-ratio: 1080 / 1935; }
.stage-scene__bg { object-position: center; }
.screen--splash .stage-scene::after {
  background: linear-gradient(180deg, rgba(18, 13, 10, .78) 0%, rgba(18, 13, 10, .25) 26%, rgba(18, 13, 10, 0) 44%, rgba(18, 13, 10, 0) 70%, rgba(18, 13, 10, .82) 100%);
}
.screen--welcome .stage-scene::after {
  background: linear-gradient(180deg, rgba(18, 13, 10, .72) 0%, rgba(18, 13, 10, 0) 24%, rgba(18, 13, 10, 0) 72%, rgba(18, 13, 10, .8) 100%);
}
.screen--splash.is-active .stage-scene__bg, .screen--welcome.is-active .stage-scene__bg { animation: kenburns 14s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

/* splash type sits in the photo's calm upper space */
.screen--splash { padding-top: calc(78px + env(safe-area-inset-top)); }
.splash__title { font-size: 3.2rem; text-shadow: 0 6px 30px rgba(0, 0, 0, .35); }
.splash__sub { text-shadow: 0 2px 14px rgba(0, 0, 0, .45); color: rgba(246, 238, 225, .9); }
.screen--splash.is-active .splash__title { animation: riseIn 1s cubic-bezier(.2, .8, .2, 1) .5s both; }
.screen--splash.is-active .splash__sub { animation: riseIn 1s cubic-bezier(.2, .8, .2, 1) .75s both; }
.screen--splash.is-active #startBtn { animation: riseIn .9s cubic-bezier(.2, .8, .2, 1) 1.1s both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.collab { display: inline-flex; align-items: center; gap: 8px; margin: 2px auto 0; padding: 6px 14px; border-radius: 999px;
  font-size: .82rem; color: var(--ivory); background: rgba(246, 238, 225, .12); border: 1px solid rgba(246, 238, 225, .28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.screen--splash.is-active .collab { animation: riseIn .9s cubic-bezier(.2, .8, .2, 1) .3s both; }

/* welcome */
.welcome__title { font-size: 3.4rem; text-shadow: 0 6px 30px rgba(0, 0, 0, .35); margin-top: 26px; }

/* quiz: the argan-oil hair macro, darkened */
.screen--quiz::before {
  background:
    linear-gradient(180deg, rgba(18, 13, 10, .55) 0%, rgba(18, 13, 10, .35) 30%, rgba(18, 13, 10, .88) 58%, var(--espresso) 80%),
    url("scenes/hair-macro.jpg?v=2") center 20% / cover no-repeat, var(--espresso);
}
/* lookbook: soft blurred campaign light behind the cards */
.screen--choose::before {
  background:
    linear-gradient(180deg, rgba(18, 13, 10, .7), rgba(18, 13, 10, .92)),
    url("scenes/hero-product.jpg") center / cover no-repeat, var(--espresso);
  filter: saturate(1.1);
}
/* reward: the fixing-mist still */
.screen--reward::before {
  background:
    linear-gradient(180deg, rgba(18, 13, 10, .25) 0%, rgba(18, 13, 10, .1) 30%, rgba(18, 13, 10, .72) 70%, rgba(18, 13, 10, .92) 100%),
    url("scenes/fixing-still.jpg") center / cover no-repeat, var(--espresso);
}
.screen--reward { justify-content: flex-end; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.screen--reward .gift { transform: scale(.85); }

/* CTA: the campaign photo above the sheet */
.screen--cta .stage-scene { translate: -50% -22%; }
.screen--cta .stage-scene::after { background: linear-gradient(180deg, rgba(18, 13, 10, .55) 0%, rgba(18, 13, 10, 0) 25%, rgba(18, 13, 10, 0) 62%, var(--espresso) 80%); }

/* ---------- voice-only narration ---------- */
.caption, .caption-slot .caption { display: none; }
body.has-cc .caption { display: flex; }
body.has-cc .caption-slot .caption { display: flex; }
.caption-slot { min-height: 0; margin: 0; }
body.has-cc .caption-slot { margin: 0 14px 12px; }

.voice-orb {
  position: absolute; top: calc(env(safe-area-inset-top) + 50px); left: 50%; translate: -50% 0;
  display: flex; gap: 3px; align-items: center; height: 18px; padding: 0 2px;
  opacity: 0; transition: opacity .35s;
}
.voice-orb i { width: 3px; height: 4px; border-radius: 2px; background: var(--butter); }
body.is-speaking .voice-orb { opacity: 1; }
body.is-speaking .voice-orb i { animation: orb 1.1s ease-in-out infinite; }
.voice-orb i:nth-child(2) { animation-delay: .12s !important; }
.voice-orb i:nth-child(3) { animation-delay: .24s !important; }
.voice-orb i:nth-child(4) { animation-delay: .36s !important; }
.voice-orb i:nth-child(5) { animation-delay: .48s !important; }
@keyframes orb { 0%, 100% { height: 4px; } 50% { height: 18px; } }
/* the wordmark breathes while she speaks */
body.is-speaking .topbar__logo { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

.cc {
  position: absolute; inset-inline-end: 14px; top: calc(env(safe-area-inset-top) + 12px);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  font-family: var(--latin); font-weight: 600; font-size: 1rem; color: var(--ivory);
  background: rgba(246, 238, 225, .1); border: 1px solid rgba(246, 238, 225, .18);
}
.cc[aria-pressed="true"] { background: var(--ivory); color: var(--espresso); }

/* without captions, freed space goes back to the content */
.screen { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.has-cc .screen { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.screen--quiz { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.screen--choose { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.screen--result .row { margin-bottom: calc(44px + env(safe-area-inset-bottom)); }
.screen--cta, .screen--cta:has(.routine:not([hidden])) { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.screen--welcome #welcomeNext { bottom: calc(52px + env(safe-area-inset-bottom)); }
#startBtn { bottom: calc(60px + env(safe-area-inset-bottom)); }

/* ---------- lookbook as a 3D coverflow ---------- */
.models { perspective: 1100px; padding-top: 14px; padding-bottom: 20px; scroll-padding: 0 14%; }
.model-card, .model-card:last-child:nth-child(3n + 1) {
  flex-basis: 70%;
  transform: perspective(1100px) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  opacity: var(--op, 1);
  transition: transform .15s linear, opacity .15s linear, box-shadow .3s;
  will-change: transform;
}
.model-card:first-child { margin-inline-start: 8%; }
.model-card:last-child { margin-inline-end: 8%; }
.model-card__name { font-size: 2.1rem; }
.swipe-hint { margin: -6px 24px 0; color: var(--ivory-dim); font-size: .85rem; text-align: start; }

/* reward: the photo stays as atmosphere; a dark veil keeps the code readable over the bottle */
.screen--reward::before {
  background:
    radial-gradient(120% 70% at 50% 62%, rgba(18, 13, 10, .82), rgba(18, 13, 10, .35) 70%),
    linear-gradient(180deg, rgba(18, 13, 10, .2) 0%, rgba(18, 13, 10, .55) 100%),
    url("scenes/fixing-still.jpg") center / cover no-repeat, var(--espresso);
}

/* =====================================================================
   Reward — gold scratch card (replaces the gift box)
   ===================================================================== */
.screen--reward { justify-content: center; gap: 14px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.screen--reward::before { background: radial-gradient(120% 80% at 50% 45%, #2A1C12 0%, var(--espresso) 70%); }
/* two slow golden light beams behind the card */
.reward-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.reward-glow i { position: absolute; left: 50%; top: 46%; width: 140%; height: 46%; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 220, 142, .28), transparent); filter: blur(20px); animation: glow 7s ease-in-out infinite alternate; }
.reward-glow i + i { width: 80%; height: 80%; background: radial-gradient(closest-side, rgba(201, 164, 92, .22), transparent); animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes glow { to { transform: scale(1.18) rotate(8deg); opacity: .7; } }

.reward__kicker { margin: 0; color: var(--butter); font-weight: 600; font-size: .95rem; }
.reward__title { font-size: 2.2rem; margin: 0 0 8px; }
.screen--reward.is-active .reward__kicker { animation: riseIn .8s cubic-bezier(.2, .8, .2, 1) .1s both; }
.screen--reward.is-active .reward__title { animation: riseIn .8s cubic-bezier(.2, .8, .2, 1) .25s both; }

.scratch { position: relative; width: min(86%, 360px); aspect-ratio: 1.58; perspective: 1000px; }
.scratch__card {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden; transform-style: preserve-3d;
  transform: rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 220, 142, .35);
}
.screen--reward.is-active .scratch__card { animation: cardIn 1.1s cubic-bezier(.2, .9, .2, 1) .35s both, float 5s ease-in-out 1.5s infinite; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateX(38deg) scale(.9); } }
@keyframes float { 50% { translate: 0 -6px; } }

.scratch__inside {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(120% 120% at 30% 0%, #FFF8EA, #F1E4CC); color: var(--espresso);
}
.scratch__logo { height: 18px; width: auto; opacity: .85; margin-bottom: 4px; }
.scratch__label { font-size: .9rem; color: #7A5A22; }
.scratch__code { font-family: var(--latin); font-weight: 600; font-size: 2.6rem; letter-spacing: .1em; direction: ltr; line-height: 1.1; }
.scratch__note { font-size: .8rem; opacity: .6; }
.scratch__foil { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .7s ease; }
/* a sheen sweeps across the foil until she starts scratching */
.scratch__card::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg);
  animation: foilSheen 3.2s ease-in-out infinite 1.6s;
}
@keyframes foilSheen { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.scratch__hint {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; color: #5C4114;
  background: rgba(255, 248, 230, .55); border: 1px solid rgba(255, 255, 255, .7);
  animation: hintPulse 1.8s ease-in-out infinite; transition: opacity .3s;
}
.scratch__hint.is-gone { opacity: 0; animation: none; }
@keyframes hintPulse { 50% { transform: scale(1.05); } }
.scratch.is-revealed .scratch__foil { opacity: 0; pointer-events: none; }
.scratch.is-revealed .scratch__card::after { animation: none; display: none; }
.scratch.is-revealed .scratch__code { animation: codePop .7s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes codePop { from { transform: scale(.8); opacity: .3; } }
.burst { position: absolute; inset: -60% -30%; width: 160%; height: 220%; pointer-events: none; z-index: 3; }

.reward__reveal { margin-top: 8px; border: 0; background: none; color: var(--ivory-dim); text-decoration: underline; font-size: .9rem; cursor: pointer; padding: 8px; }
.reward__actions { display: flex; gap: 10px; width: min(86%, 360px); margin-top: 10px; animation: riseIn .6s cubic-bezier(.2, .8, .2, 1) both; }
.reward__actions .btn { flex: 1; }
.reward__actions[hidden] { display: none !important; }

.reward__actions .btn { white-space: nowrap; }
