:root{
  --ink: #f4f7fb;
  --gold: #ffb44a;
  --gold-soft: #ffd79a;
  --cyan: #9fd8ff;
  --bg: #04060a;
  --pane-hero: 90vh;
  --pane-a: 130vh;
  --pane-b: 110vh;
  --pane-final: 130vh;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: auto; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.locked{ overflow: hidden; }

/* ---------- הבמה ---------- */

#stage{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: var(--bg);
}

.vignette{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.65) 0%, transparent 26%, transparent 62%, rgba(0,0,0,.8) 100%);
}

/* ---------- מסך טעינה ---------- */

.loader{
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .9s ease, visibility .9s;
}
.loader.done{ opacity: 0; visibility: hidden; }

.loader-mark{
  font-size: clamp(18px, 3.6vw, 26px);
  font-weight: 300;
  letter-spacing: .34em;
  color: var(--ink);
  opacity: .92;
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe{ 0%,100%{ opacity:.5 } 50%{ opacity:1 } }

.loader-bar{
  width: min(240px, 52vw);
  height: 2px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
  border-radius: 2px;
}
.loader-bar span{
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(to left, var(--cyan), var(--gold));
  transition: width .35s ease;
}

/* ---------- סרגל עליון ---------- */

.topbar{
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  padding: clamp(18px, 3vw, 34px) clamp(20px, 5vw, 60px);
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.brand{
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 600;
  letter-spacing: .22em;
  color: rgba(255,255,255,.94);
  text-shadow: 0 2px 24px rgba(0,0,0,.9);
}

/* ---------- מסלול הגלילה ---------- */

#track{ position: relative; z-index: 10; }

.pane{ position: relative; }
#paneHero{ height: var(--pane-hero); }
#paneA{ height: var(--pane-a); }
#paneB{ height: var(--pane-b); }
#paneFinal{ height: var(--pane-final); }

.sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 clamp(20px, 6vw, 80px);
}

.pane.scrub{ pointer-events: none; }

/* ---------- כותרת ראשית ---------- */

.hero-inner{
  text-align: center;
  will-change: opacity, transform;
}

.headline{
  margin: 0;
  font-weight: 800;
  font-size: clamp(30px, 6.2vw, 76px);
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-shadow: 0 6px 50px rgba(0,0,0,.95), 0 1px 3px rgba(0,0,0,.9);
}
.headline .line{
  display: block;
  opacity: 0;
  transform: translateY(26px);
  animation: rise .95s cubic-bezier(.22,.8,.3,1) forwards;
}
.headline .line:nth-child(1){ animation-delay: .12s; }
.headline .line:nth-child(2){ animation-delay: .26s; }
.headline .line:nth-child(3){ animation-delay: .40s; }

.headline .glow{
  position: relative;
  display: inline-block;
  margin-top: .08em;
  padding: 0 .1em .12em;
  font-style: italic;
  letter-spacing: .01em;
  background: linear-gradient(105deg, #ff8a3d 0%, var(--gold) 28%, #fff3dd 50%, var(--gold) 72%, #ff8a3d 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(255,160,60,.4));
  animation: rise .95s cubic-bezier(.22,.8,.3,1) forwards,
             shimmer-text 4.5s ease-in-out 1.6s infinite;
}
@keyframes shimmer-text{
  0%, 100%{ background-position: 0% 0; }
  50%{ background-position: 100% 0; }
}
.headline .glow::after{
  content: "";
  position: absolute;
  bottom: -.06em;
  inset-inline: 6%;
  height: clamp(3px, .45vw, 5px);
  border-radius: 99px;
  background: linear-gradient(to left, transparent, var(--gold) 22%, #ff8a3d 78%, transparent);
  box-shadow: 0 0 18px rgba(255,160,60,.55);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  animation: draw-line .9s cubic-bezier(.22,.8,.3,1) 1.05s forwards;
}
@keyframes draw-line{ to{ transform: scaleX(1) } }

@keyframes rise{ to{ opacity:1; transform:none } }
/* כניסה שלא נועלת את המאפיינים אחרי סיום, כדי שהריחוף ימשיך לעבוד */
@keyframes riseIn{ from{ opacity:0; transform: translateY(24px) } }

.cta{
  position: relative;
  margin-top: clamp(28px, 5vh, 52px);
  padding: clamp(17px, 2.2vw, 24px) clamp(38px, 5vw, 64px);
  font-family: inherit;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: .02em;
  color: #140b02;
  background: linear-gradient(to left, var(--gold-soft), var(--gold) 55%, #ff8a3d);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 46px rgba(255,150,50,.32), 0 2px 10px rgba(0,0,0,.5);
  animation: riseIn .95s cubic-bezier(.22,.8,.3,1) .58s backwards;
  transition: transform .35s cubic-bezier(.22,.8,.3,1), box-shadow .35s ease;
}
.cta:hover,
.cta:focus-visible{
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(255,150,50,.45), 0 2px 10px rgba(0,0,0,.5);
  outline: none;
}
.cta:active{ transform: translateY(-1px) scale(.985); }
.cta::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60%;
  inset-inline-start: -80%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.5), transparent);
  animation: sheen 3.2s ease-in-out 1.8s infinite;
}
@keyframes sheen{
  0%{ transform: translateX(0) }
  45%,100%{ transform: translateX(-300%) }
}
.cta-label{ position: relative; z-index: 1; }

/* ---------- בחירת מגדר ---------- */

.final-inner{
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,.8,.3,1);
}
.final-inner.in{ opacity: 1; transform: none; }

.cta-kicker{
  margin: 0 0 clamp(22px, 4vh, 38px);
  font-size: clamp(19px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: .01em;
  text-shadow: 0 4px 40px rgba(0,0,0,.95);
}

.choice{
  display: flex;
  gap: clamp(12px, 2.2vw, 22px);
  justify-content: center;
  flex-wrap: wrap;
}

.pick{
  position: relative;
  min-width: clamp(140px, 22vw, 210px);
  padding: clamp(15px, 1.9vw, 21px) clamp(26px, 3.4vw, 46px);
  font-family: inherit;
  font-size: clamp(17px, 2.1vw, 23px);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  background: rgba(10,14,20,.42);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color .35s ease, border-color .35s ease, transform .35s cubic-bezier(.22,.8,.3,1), box-shadow .35s ease;
}
.pick::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, var(--gold), #ff8a3d);
  opacity: 0;
  transition: opacity .35s ease;
}
.pick-label{ position: relative; z-index: 1; }

.pick:hover,
.pick:focus-visible{
  transform: translateY(-3px);
  border-color: transparent;
  color: #140b02;
  box-shadow: 0 18px 50px rgba(255,150,50,.34);
  outline: none;
}
.pick:hover::before,
.pick:focus-visible::before{ opacity: 1; }
.pick:active{ transform: translateY(-1px) scale(.985); }

/* ---------- נגן ---------- */

.player{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2,3,6,.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .45s ease;
}
.player[hidden]{ display: none; }
.player.in{ opacity: 1; }

#playerCanvas{
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

/* ---------- שאלת המטרה ---------- */

.goal{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vh, 30px);
  padding: 0 clamp(20px, 6vw, 80px) clamp(36px, 7vh, 80px);
  background: linear-gradient(to top, rgba(2,3,6,.88) 0%, rgba(2,3,6,.45) 45%, transparent 75%);
  opacity: 0;
  transition: opacity .8s ease;
}
.goal[hidden]{ display: none; }
.goal.in{ opacity: 1; }

.goal-q{
  margin: 0;
  font-size: clamp(22px, 3.6vw, 40px);
  font-weight: 800;
  text-shadow: 0 4px 40px rgba(0,0,0,.95);
  opacity: 0;
  transform: translateY(22px);
}
.goal.in .goal-q{
  animation: rise .8s cubic-bezier(.22,.8,.3,1) .15s forwards;
}

.goal-list{
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 16px);
  width: min(560px, 100%);
}

.goal-pick{
  padding: clamp(14px, 1.8vh, 19px) clamp(20px, 3vw, 34px);
  font-family: inherit;
  font-size: clamp(15px, 1.9vw, 20px);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  background: rgba(10,14,20,.55);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 18px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(22px);
  transition: border-color .3s ease, background .3s ease, color .3s ease, box-shadow .3s ease;
}
.goal.in .goal-pick{ animation: rise .8s cubic-bezier(.22,.8,.3,1) forwards; }
.goal.in .goal-pick:nth-child(1){ animation-delay: .3s; }
.goal.in .goal-pick:nth-child(2){ animation-delay: .42s; }
.goal.in .goal-pick:nth-child(3){ animation-delay: .54s; }

.goal-pick:hover,
.goal-pick:focus-visible{
  border-color: var(--gold);
  box-shadow: 0 10px 40px rgba(255,150,50,.22);
  outline: none;
}
.goal-pick.selected{
  background: linear-gradient(to left, var(--gold-soft), var(--gold) 55%, #ff8a3d);
  border-color: transparent;
  color: #140b02;
  font-weight: 800;
}

/* ---------- עמוד ההצעה ---------- */

.offer{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vh, 44px) clamp(18px, 5vw, 60px);
  background: rgba(2,3,6,.93);
  overflow-y: auto;
  opacity: 0;
  transition: opacity .7s ease;
}
.offer[hidden]{ display: none; }
.offer.in{ opacity: 1; }

.offer-card{
  width: min(680px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3.4vh, 34px);
  text-align: center;
}

.offer-title{
  margin: 0;
  font-size: clamp(24px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(to left, var(--gold-soft), var(--gold) 55%, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(255,160,60,.25));
}
.offer.in .offer-title{ animation: riseIn .8s cubic-bezier(.22,.8,.3,1) .1s backwards; }

.offer-video{
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.3);
  border-radius: 20px;
}
.offer.in .offer-video{ animation: riseIn .8s cubic-bezier(.22,.8,.3,1) .24s backwards; }

.play-badge{
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(255,180,74,.1);
  border: 1px solid rgba(255,180,74,.4);
  border-radius: 50%;
}
.play-badge svg{ margin-inline-end: -4px; }

.offer-video-note{
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: .06em;
  color: rgba(255,255,255,.55);
}

.offer-buy{
  display: inline-block;
  padding: clamp(17px, 2.2vw, 23px) clamp(48px, 7vw, 84px);
  font-size: clamp(18px, 2.4vw, 25px);
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  color: #140b02;
  background: linear-gradient(to left, var(--gold-soft), var(--gold) 55%, #ff8a3d);
  border-radius: 999px;
  box-shadow: 0 14px 46px rgba(255,150,50,.32);
  transition: transform .35s cubic-bezier(.22,.8,.3,1), box-shadow .35s ease;
}
.offer.in .offer-buy{ animation: riseIn .8s cubic-bezier(.22,.8,.3,1) .38s backwards; }
.offer-buy:hover,
.offer-buy:focus-visible{
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(255,150,50,.45);
  outline: none;
}
.offer-buy:active{ transform: translateY(-1px) scale(.985); }

.offer-back{
  padding: 10px 18px;
  font-family: inherit;
  font-size: clamp(14px, 1.7vw, 17px);
  font-weight: 600;
  color: rgba(255,255,255,.66);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255,255,255,.3);
  transition: color .3s ease, text-decoration-color .3s ease;
}
.offer.in .offer-back{ animation: riseIn .8s cubic-bezier(.22,.8,.3,1) .5s backwards; }
.offer-back:hover,
.offer-back:focus-visible{
  color: var(--ink);
  text-decoration-color: var(--gold);
  outline: none;
}

.player-loading{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: #04060a;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  letter-spacing: .18em;
  transition: opacity .45s ease;
}
.player-loading.hide{ opacity: 0; pointer-events: none; }

.player-loading .ring{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.14);
  display: grid;
  place-items: center;
}
.player-loading .ring i{
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  margin: -2px;
  animation: spin .9s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg) } }

@media (max-width: 620px){
  :root{ --pane-a: 105vh; --pane-b: 90vh; --pane-final: 115vh; }
  .choice{ flex-direction: column; align-items: stretch; }
  .pick{ width: min(320px, 78vw); margin: 0 auto; }
}

/* במובייל הלופ ממשיך להתנגן מאחורי עמוד ההצעה */
@media (max-width: 820px){
  .offer{
    align-items: flex-end;
    background: linear-gradient(to top,
      rgba(2,3,6,.94) 46%,
      rgba(2,3,6,.62) 70%,
      rgba(2,3,6,.18) 90%,
      transparent);
  }
  .offer-card{ padding-top: 34vh; }
}

@media (prefers-reduced-motion: reduce){
  .headline .line, .cta{ animation: none; opacity: 1; transform: none; }
  .cta::after, .headline .glow::after{ animation: none; }
  .headline .glow::after{ transform: none; }
}
