/* The store's home page: the game's night valley runs live behind the page (home.js), and every part of the story
   you scroll past lights one more lamp in it, and one more light on the Hanukkah lamp in the corner. */
body.home { --night: #0a0918; --glass: #120f26b8; --glass2: #1b1636d0; --ember: #ff9a3c; background: var(--night); overflow-x: hidden; }

/* ---------- the sky: picture, live game, veil ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0b0d22; }
.sky .poster, .sky .live { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* the game keeps a 16:9 picture: the frame is cut to that shape and covers the window, like the poster */
.sky .live iframe { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(100vh, 56.25vw); transform: translate(-50%, -50%); border: 0; }
.sky .poster { object-fit: cover; transform: scale(calc(1.06 + var(--hp, 0) * .08)); transform-origin: 50% 60%; transition: opacity 1.4s; }
.sky .live { opacity: 0; transition: opacity 1.6s ease; pointer-events: none; }
.sky.on .live { opacity: 1; }
.sky.on .poster { opacity: 0; }
/* darker where the text is, and more so once the story is over */
.sky .veil { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 45%, transparent 30%, #05040ecc 100%),
    linear-gradient(180deg, #05040e99 0%, transparent 22%, transparent 70%, #05040ee6 100%);
  box-shadow: inset 0 0 0 100vmax rgba(5, 4, 14, var(--dim, 0)); transition: box-shadow .3s; }
/* sparks drifting up from the lamps */
.sky .motes { position: absolute; inset: 0; pointer-events: none; }
.sky .motes i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 8px 2px #ff9a3c88;
  opacity: 0; animation: rise linear infinite; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx, 20px), -105vh); opacity: 0; } }

main, footer.bottom { position: relative; z-index: 2; }

/* ---------- top bar ---------- */
body.home header.top { position: fixed; inset: 0 0 auto; z-index: 20; padding: 0; transition: background .4s, backdrop-filter .4s, border-color .4s; border-bottom: 1px solid transparent; }
body.home header.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 1180px; }
body.home header.top.solid { background: #0a0918c0; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: #ffb35c26; }
body.home header.top .brand { opacity: 0; transform: translateY(-4px); transition: opacity .4s, transform .4s; }
body.home header.top.solid .brand { opacity: 1; transform: none; }
body.home header.top nav a { color: #e9dcc4; text-shadow: 0 1px 6px #000a; }

/* ---------- the opening ---------- */
.hero { position: relative; z-index: 0; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px 16px 120px;
  opacity: calc(1 - var(--hp, 0) * 1.5); transform: translateY(calc(var(--hp, 0) * -60px)); }
.hero .kicker { font-size: 15px; letter-spacing: .06em; font-weight: 700; color: #f2d8a4; text-transform: uppercase; opacity: 0; animation: up 1s .2s forwards; }
.hero::before { content: ''; position: absolute; inset: 12% 18% 10%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, #05040e99, #05040e00); }
.hero .title { font-family: 'Frank Ruhl Libre', serif; font-weight: 900; line-height: .95; margin: 14px 0 10px; font-size: clamp(64px, 13vw, 168px); color: #ffe7b0;
  text-shadow: 0 0 40px #ff9a3c99, 0 0 90px #ff7a1a55, 0 6px 24px #000c; }
[dir=ltr] .hero .title { font-size: clamp(54px, 8.5vw, 120px); }
.hero .title .w { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(18px) scale(.97); animation: kindle 1.6s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero .title .w:nth-child(1) { animation-delay: .35s; }
.hero .title .w:nth-child(2) { animation-delay: .7s; }
@keyframes kindle { 60% { opacity: 1; filter: blur(0); text-shadow: 0 0 70px #ffc46a, 0 0 140px #ff8a2a; } 100% { opacity: 1; filter: blur(0); transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .verse { font-family: 'Frank Ruhl Libre', serif; font-size: clamp(18px, 2.4vw, 24px); color: #e8d2a6; margin: 0 0 18px; opacity: 0; animation: up 1s 1.3s forwards; }
.hero .lead { text-wrap: balance; max-width: 640px; margin: 0 auto 28px; font-size: clamp(17px, 1.7vw, 19px); color: #f1e6d2; text-shadow: 0 2px 12px #000; opacity: 0; animation: up 1s 1.55s forwards; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: up 1s 1.8s forwards; }
.hero .cta .btn { min-width: 170px; font-size: 18px; padding: 13px 30px; border-radius: 14px; text-align: center; }
.hero .fine { opacity: 0; animation: up 1s 2s forwards; }
/* on a phone or a tablet (home.js, platform/sdk/phone.js): the game is for a computer, said before the buttons */
.hero .phonenote { display: flex; gap: 10px; align-items: flex-start; max-width: 460px; margin: 0 auto 16px; padding: 11px 14px; text-align: start;
  font-size: 15px; line-height: 1.5; color: #fff4dc; background: #2a1e44e6; border: 1px solid #ffb35c88; border-radius: 14px; box-shadow: 0 6px 24px #0008;
  opacity: 0; animation: up 1s 1.7s forwards; }
.hero .phonenote b { color: #ffe2a0; }
.hero .phonenote i { font-style: normal; font-size: 22px; line-height: 1.1; }
.fine { font-size: 14px; color: #cbbfa8; margin: 16px 0 0; text-wrap: balance; }
.fine a { color: #ffe2a0; }
/* the account link in the top bar: a chip, so a signed-out visitor finds the way in */
body.home header.top nav a.acctlink { border: 1px solid #ffb35c70; border-radius: 99px; padding: 3px 14px; background: #0a091866; backdrop-filter: blur(6px); font-weight: 700; color: #ffe2a0; }
body.home header.top nav a.acctlink:hover { border-color: #ffc777; background: #ffb35c22; }
.btn.ghost { background: #ffffff10; border-color: #ffe2a066; backdrop-filter: blur(6px); }
.btn.ghost:hover { background: #ffffff20; }
.btn.glow { box-shadow: 0 0 0 0 #ffb35c88, 0 8px 30px #ff9a3c44; animation: halo 2.8s ease-in-out infinite; }
@keyframes halo { 50% { box-shadow: 0 0 0 8px #ffb35c00, 0 8px 40px #ff9a3c66; } }
.btn { transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #e9dcc4; text-decoration: none; font-size: 14px; opacity: 0; animation: up 1s 2.4s forwards; }
.cue i { width: 2px; height: 44px; background: linear-gradient(#ffe2a0, transparent); position: relative; overflow: hidden; }
.cue i::after { content: ''; position: absolute; inset-inline: 0; top: -40%; height: 40%; background: #fff6d8; animation: drip 1.8s ease-in infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------- the seven nights ---------- */
.night { position: relative; min-height: 135vh; display: flex; align-items: center; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.night[data-side=l] { justify-content: flex-end; } /* rtl: flex-end is the left */
.night .card { width: min(470px, 40vw); --e: 0; }
.arch { position: relative; margin: 0 0 22px; aspect-ratio: 16 / 12; border-radius: 50% 50% 18px 18px / 30% 30% 18px 18px; overflow: hidden;
  clip-path: circle(calc(var(--e) * 115%) at 50% 96%);
  box-shadow: 0 0 0 1px #ffe2a055, 0 0 60px #ff9a3c33, 0 30px 80px #000a; background: #000; }
.arch::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px #ffe2a040, inset 0 -80px 80px -40px #000a; }
.arch img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(calc(1.22 - var(--e) * .22 + var(--x, 0) * .06)) translateY(calc(var(--x, 0) * -14px)); }
.arch figcaption { position: absolute; bottom: 12px; inset-inline-start: 16px; font-size: 12px; letter-spacing: .12em; color: #f6e6c4cc; text-shadow: 0 1px 4px #000; }
.night .txt > * { opacity: calc(var(--e) * 2.2 - var(--i, 0) * .35); transform: translateY(calc((1 - min(1, var(--e) * 1.6)) * 26px)); }
.night .txt > :nth-child(1) { --i: 1; } .night .txt > :nth-child(2) { --i: 1.5; } .night .txt > :nth-child(3) { --i: 2; } .night .txt > :nth-child(4) { --i: 2.5; }
.kick { font-size: 14px; letter-spacing: .08em; color: #e8cf9c; }
.kick b { color: var(--ember); font-weight: 800; }
.night h2 { font-size: clamp(36px, 5vw, 60px); margin: 4px 0 10px; color: #ffe7b0; text-shadow: 0 0 30px #ff9a3c55, 0 4px 18px #000; }
.night p { font-size: 17px; color: #f1e6d2; margin: 0 0 14px; text-shadow: 0 2px 10px #000, 0 0 2px #000; }
.free { display: inline-block; font-size: 13px; font-weight: 800; color: #1a1206; background: linear-gradient(90deg, #ffe2a0, #ffb35c); border-radius: 99px; padding: 3px 12px; }
.night .txt { padding: 18px 20px 6px; border-radius: 16px; background: linear-gradient(180deg, #0a0918a8, #0a091870); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- glass panels ---------- */
.panel, .buy { position: relative; max-width: 1080px; margin: 0 auto 120px; padding: clamp(22px, 4vw, 44px); }
.panel { background: var(--glass); border: 1px solid #ffb35c33; border-radius: 26px; backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 30px 90px #0009; width: calc(100% - 32px); }
.panel h2, .buy h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 0 0 10px; color: #ffe7b0; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* hear it: the game's own dialogue box over a still of the cellar */
.voice .vhead { max-width: 640px; }
.vstage { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 8; margin-top: 18px; box-shadow: 0 0 0 1px #ffe2a033, 0 24px 60px #000a; background: #000; }
.vstage img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05); transform: scale(1.03); transition: transform 8s linear; }
.vstage.playing img { transform: scale(1.12); }
.vstage .dlg { position: absolute; inset-inline: 12%; top: 5%; padding: 14px 22px 16px; color: #f2eee6; border-radius: 14px;
  background: linear-gradient(180deg, #1a1d3ae8, #0e1028f2); border: 1px solid #ffffff2a; box-shadow: 0 14px 30px #0008; backdrop-filter: blur(6px);
  font-size: clamp(15px, 1.9vw, 21px); line-height: 1.5; min-height: 3.4em; }
.vstage .dlg .who { display: block; font-weight: 800; font-size: .72em; letter-spacing: .06em; color: #ffb35c; margin-bottom: 2px; }
.play { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 86px; height: 86px; border-radius: 50%; border: 1px solid #ffe2a0aa; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, #ffc76a, #b06a14); box-shadow: 0 0 0 10px #ffb35c22, 0 0 50px #ff9a3c99; display: grid; place-items: center; transition: transform .2s, opacity .4s; }
.play:hover { transform: translate(-50%, -50%) scale(1.06); }
.play svg { width: 38px; height: 38px; fill: #2a1604; }
.play .i-stop, .vstage.playing .play .i-play { display: none; }
.vstage.playing .play .i-stop { display: block; }
.vstage.playing .play { width: 52px; height: 52px; top: auto; bottom: 18px; left: 18px; transform: none; box-shadow: 0 0 30px #ff9a3c77; }
.vstage.playing .play svg { width: 22px; height: 22px; }
.bars { position: absolute; bottom: 30px; left: 84px; display: flex; gap: 4px; align-items: flex-end; height: 26px; opacity: 0; transition: opacity .3s; }
.vstage.playing .bars { opacity: 1; }
.bars i { width: 4px; height: 30%; background: #ffd27a; border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.2s; } .bars i:nth-child(3) { animation-delay: -.5s; } .bars i:nth-child(4) { animation-delay: -.1s; }
.bars i:nth-child(5) { animation-delay: -.7s; } .bars i:nth-child(6) { animation-delay: -.35s; } .bars i:nth-child(7) { animation-delay: -.6s; }
@keyframes eq { 50% { height: 100%; } }

/* in numbers */
.stats { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto 120px; padding: 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats div { text-align: center; padding: 26px 12px; border-radius: 20px; background: linear-gradient(180deg, #ffb35c14, #ffffff05); border: 1px solid #ffb35c2a; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stats b { display: block; font-family: 'Frank Ruhl Libre', serif; font-size: clamp(54px, 7vw, 84px); line-height: 1; color: #ffe2a0; text-shadow: 0 0 30px #ff9a3c88; }
.stats span { display: block; margin-top: 8px; color: #e9dcc4; font-size: 15px; }

/* before buying */
.before .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0 8px; }
.before .pt { padding: 22px; border-radius: 18px; background: #ffffff08; border: 1px solid #ffffff14; }
.before .pt svg { width: 56px; height: 42px; color: #ffb35c; filter: drop-shadow(0 0 10px #ff9a3c66); }
.before h3 { margin: 8px 0 6px; font-size: 24px; }
.before p { margin: 0; color: #eadfcb; }
.center { text-align: center; margin: 22px 0 0; }

/* the eighth light: the price */
.buy { text-align: center; padding-top: 30vh; }
.buy .buyhead p { font-size: 19px; color: #f1e6d2; text-shadow: 0 2px 10px #000; margin: 0 0 26px; }
.buy .kick { font-size: 15px; }
.buy h2 { font-size: clamp(44px, 7vw, 92px); text-shadow: 0 0 50px #ff9a3c88, 0 4px 20px #000; }
.plans { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; max-width: 860px; margin: 0 auto; text-align: start; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 22px; background: var(--glass); border: 1px solid #ffb35c33;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 80px #0009; }
.plan.best { background: linear-gradient(180deg, #3a2410d8, #1b1636e0); border-color: #ffb35c99; box-shadow: 0 0 0 1px #ffb35c44, 0 0 80px #ff9a3c44, 0 30px 80px #000a; }
.plan h3 { margin: 0; font-size: 24px; }
.plan ul { margin: 0; padding-inline-start: 20px; flex: 1; color: #eadfcb; }
.plan .btn { text-align: center; }
.plan .fine { margin: 4px 0 0; }
.ribbon { position: absolute; top: -12px; inset-inline-end: 22px; font-size: 13px; font-weight: 800; color: #1a1206; background: linear-gradient(90deg, #ffe2a0, #ffb35c); padding: 3px 12px; border-radius: 99px; }
.price { font-size: 42px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.was { font-size: .5em; font-weight: 400; color: var(--dim); }

/* questions and contact */
.faq details { border-bottom: 1px solid #ffffff18; padding: 14px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber); font-size: 22px; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 8px 0 0; color: #e6dccb; }
.contact ul { padding-inline-start: 20px; }
body.home footer.bottom { margin-top: 0; border-top-color: #ffffff14; }

/* ---------- the Hanukkah lamp ---------- */
.menorah { position: fixed; z-index: 15; bottom: 18px; left: 22px; width: 210px; opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.menorah.show { opacity: 1; transform: none; }
.menorah svg { width: 100%; display: block; filter: drop-shadow(0 4px 10px #000c); }
.menorah .cups { position: absolute; inset: 0 0 auto; height: 50%; }
.menorah .cup { position: absolute; bottom: 0; width: 20px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; transform: translateX(-50%); }
.menorah .cup::before { content: ''; position: absolute; left: 50%; bottom: 0; width: 10px; height: 7px; margin-left: -5px; border-radius: 1px 1px 4px 4px; background: linear-gradient(#ffe7a8, #b98a3c); }
.menorah .cup::after { content: ''; position: absolute; left: 50%; bottom: 7px; width: 1.5px; height: 5px; margin-left: -.75px; background: #3a2a1a; }
.menorah .cup i { position: absolute; left: 50%; bottom: 9px; width: 12px; height: 20px; margin-left: -6px; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fffbe6 0, #ffd36a 32%, #ff8a1e 70%, #ff6a0000 100%); filter: drop-shadow(0 0 6px #ffb84a) drop-shadow(0 0 14px #ff8a1e);
  transform-origin: 50% 100%; transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.menorah .cup.lit i { transform: scale(1); animation: flick 2.2s ease-in-out infinite; }
.menorah .cup.sham { bottom: 6px; }
.menorah .cup:hover i { transform: scale(.55); }
.menorah .cup.lit:hover i { transform: scale(1.15); }
@keyframes flick { 30% { transform: scale(.94, 1.06) skewX(2deg); } 60% { transform: scale(1.04, .95) skewX(-2deg); } }
.mlabel { text-align: center; font-size: 14px; font-weight: 700; color: #f2dfb6; margin-top: 2px; text-shadow: 0 1px 6px #000; min-height: 1.4em; }

/* ---------- small screens, and visitors who prefer less motion ---------- */
@media (max-width: 860px) {
  body.home header.top nav > a:not(.acctlink) { display: none; }
  .night { min-height: auto; padding: 18vh 16px; justify-content: center !important; }
  .night .card { width: 100%; max-width: 560px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .before .two, .plans { grid-template-columns: 1fr; }
  .menorah { left: 10px; width: 130px; bottom: 8px; }
  .menorah .mlabel { display: none; }
  .buy { padding-top: 14vh; }
  .vstage { aspect-ratio: 4 / 3; }
  .vstage .dlg { inset-inline: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  .night .card { --e: 1 !important; }
  .hero { opacity: 1; transform: none; }
  .hero .title .w, .hero > * { opacity: 1 !important; filter: none !important; transform: none !important; }
  .reveal { opacity: 1; transform: none; }
  .sky .motes { display: none; }
}
