/* ── Trick or Treat ─────────────────────────────────────────────────────
   A corridor at midnight, not a modal: the product's own board laid down as
   the floor, candles hanging in the dark, and a stone arch you look through.
   Namespaced under #hw; every token falls back to a literal so the block
   survives being moved to another page. */

#hw{
  --hw-gold:var(--gold,#ecd27a); --hw-gold-br:var(--gold-br,#f9e78d); --hw-gold-dp:var(--gold-dp,#ca9e48);
  --hw-pump:#ff8a1f; --hw-ember:#ff5a12; --hw-violet:#7b3fd4;
  --hw-slate:#1d2748;
  --hw-serif:var(--serif,'Quattrocento',Georgia,serif);
  --hw-sans:var(--sans,'Poppins',system-ui,sans-serif);
  --hw-ease:cubic-bezier(.23,1,.32,1);
  position:fixed; inset:0; z-index:200; display:none; overflow:hidden;
  font-family:var(--hw-sans); color:#fff; -webkit-font-smoothing:antialiased;
}
#hw.is-open{display:block}
#hw *{box-sizing:border-box}
#hw button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
#hw p{margin:0;line-height:1.5}

/* ── the corridor ─────────────────────────────────────────────────────── */
/* the hall itself: a rendered plate, so the chess floor, the statues, the candles
   and the pumpkins are all real depth rather than stacked gradients */
#hw picture{position:absolute;inset:0;display:block}
#hw .hw-hall{position:absolute;inset:-2%;width:104%;height:104%;object-fit:cover;object-position:50% 54%;
  opacity:0;transform:scale(1.03);
  transition:opacity 900ms var(--hw-ease),transform 12s linear;
  filter:brightness(1.02) saturate(1.02) contrast(1.04)}
#hw.is-open .hw-hall{opacity:1;transform:scale(1.07)}
#hw .hw-sky{position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(72% 54% at 50% 46%, transparent 0%, rgba(3,2,8,.42) 74%, rgba(2,1,6,.76) 100%),
    linear-gradient(180deg,rgba(11,7,24,.34) 0%,transparent 24%,transparent 72%,rgba(3,2,8,.58) 100%);
  opacity:0;transition:opacity 700ms var(--hw-ease)}
#hw.is-open .hw-sky{opacity:1}
/* candlelight never sits still */
#hw .hw-flicker{position:absolute;inset:0;pointer-events:none;mix-blend-mode:screen;
  background:radial-gradient(52% 40% at 50% 62%, rgba(255,150,50,.10), transparent 72%);
  animation:hw-glow 5.4s ease-in-out infinite}
@keyframes hw-glow{0%,100%{opacity:.5}50%{opacity:1}}
#hw.is-open .hw-sky{opacity:1}

/* the chess board, laid down as the flagstones */




#hw .hw-stars{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* candles hanging in the hall */






/* the carved army, standing in the hall as statues.
   Real cut-outs of the product's own pieces, knocked out of the detail cards. */


 
/* cobwebs in the top corners */




/* ── the arch you look through ────────────────────────────────────────── */
#hw .hw-wrap{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:clamp(10px,2.4vw,30px);overflow:auto}
#hw .hw-arch{position:relative;margin:auto;width:min(880px,100%);text-align:center;
  padding:clamp(58px,8.5vh,112px) clamp(18px,4vw,64px) clamp(26px,4vh,48px);
  border-radius:50% 50% 10px 10px/32% 32% 1% 1%;
  background:
    radial-gradient(82% 62% at 50% 36%, rgba(10,7,22,.72), rgba(4,3,10,.90) 76%),
    linear-gradient(180deg,rgba(26,16,50,.42),rgba(3,2,8,.88));
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
  box-shadow:inset 0 0 0 1px rgba(236,210,122,.44),
             inset 0 0 0 8px rgba(236,210,122,.075),
             inset 0 0 110px rgba(123,63,212,.2),
             0 40px 90px rgba(0,0,0,.6);
  opacity:0;transform:translateY(26px) scale(.985);
  transition:opacity 620ms var(--hw-ease),transform 620ms var(--hw-ease)}
#hw.is-open .hw-arch{opacity:1;transform:none;transition-delay:160ms}
/* keystone at the crown */
#hw .hw-arch::before{content:"";position:absolute;left:50%;top:0;width:clamp(42px,4.6vw,60px);
  height:clamp(20px,2.4vw,30px);translate:-50% 0;pointer-events:none;
  background:linear-gradient(180deg,var(--hw-gold-br),var(--hw-gold-dp));
  clip-path:polygon(24% 0,76% 0,100% 100%,0 100%);opacity:.8}
/* lanterns flanking the doorway */
#hw .hw-arch__lamp{position:absolute;top:36%;width:clamp(14px,1.5vw,20px);height:clamp(14px,1.5vw,20px);
  border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,#fff0c8,#ff9d2e 48%,rgba(255,100,20,0) 72%);
  filter:blur(1px);animation:hw-lamp 3.6s ease-in-out infinite}
#hw .hw-arch__lamp.l{left:clamp(10px,2vw,28px)}
#hw .hw-arch__lamp.r{right:clamp(10px,2vw,28px);animation-delay:1.2s}
@keyframes hw-lamp{0%,100%{opacity:.5;transform:scale(.94)}50%{opacity:1;transform:scale(1.06)}}

/* ── type ─────────────────────────────────────────────────────────────── */
#hw .hw-sigil{display:block;width:clamp(36px,3.8vw,50px);height:auto;margin:0 auto clamp(10px,1.4vw,16px);
  filter:drop-shadow(0 0 16px rgba(255,138,31,.65));
  animation:hw-sigil 4.2s ease-in-out infinite}
@keyframes hw-sigil{0%,100%{filter:drop-shadow(0 0 14px rgba(255,138,31,.5))}
                    50%{filter:drop-shadow(0 0 26px rgba(255,150,40,.95))}}
#hw .hw-eyebrow{display:flex;align-items:center;justify-content:center;gap:clamp(8px,1.4vw,14px);
  font-size:clamp(9.5px,.9vw,12px);letter-spacing:.3em;text-transform:uppercase;
  color:var(--hw-gold);font-weight:600}
#hw .hw-eyebrow::before,#hw .hw-eyebrow::after{content:"";width:clamp(16px,4vw,54px);height:1px;flex:0 0 auto;
  background:linear-gradient(90deg,transparent,var(--hw-gold-dp))}
#hw .hw-eyebrow::after{background:linear-gradient(90deg,var(--hw-gold-dp),transparent)}
#hw .hw-title{font-family:var(--hw-serif);font-weight:400;line-height:.92;margin:clamp(8px,1.2vw,14px) 0 0;
  font-size:clamp(42px,7.4vw,96px);color:var(--hw-gold-br);text-wrap:balance;
  text-shadow:0 0 36px rgba(236,210,122,.26)}
#hw .hw-title b{font-weight:400;display:block;color:var(--hw-pump);font-style:italic;
  text-shadow:0 0 12px rgba(255,138,31,.55),0 0 48px rgba(255,90,18,.5)}
#hw .hw-orn{display:block;width:clamp(180px,26vw,340px);height:auto;
  margin:clamp(10px,1.4vw,18px) auto 0;overflow:visible;
  stroke:var(--hw-gold-dp);fill:none;stroke-width:1.2;stroke-linecap:round;opacity:.92}
#hw .hw-orn .d{fill:var(--hw-gold);stroke:none}
#hw .hw-sub{margin:clamp(12px,1.6vw,18px) auto 0;max-width:52ch;font-weight:300;color:#cbc3da;
  font-size:clamp(13.5px,1.15vw,17px)}
#hw .hw-sub b{color:var(--hw-gold);font-weight:400}

/* step machine */
#hw .hw-step{display:none}
#hw .hw-step.on{display:block;animation:hw-in 520ms var(--hw-ease) both}
@keyframes hw-in{from{opacity:0;transform:translateY(16px)}}

/* ── the gate ─────────────────────────────────────────────────────────── */
#hw .hw-form{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;
  margin:clamp(18px,2.4vw,28px) auto 0;max-width:600px}
#hw .hw-input{flex:1 1 260px;min-width:0;height:54px;padding:0 18px;border-radius:3px;
  background:rgba(10,7,20,.72);border:1px solid rgba(236,210,122,.3);color:#fff;
  font-family:var(--hw-serif);font-size:16px;outline:0;
  transition:border-color 180ms,box-shadow 180ms}
#hw .hw-input::placeholder{color:#7d7594;font-family:var(--hw-sans);font-size:14px}
#hw .hw-input:focus{border-color:var(--hw-gold);box-shadow:0 0 0 3px rgba(236,210,122,.12)}
#hw .hw-input[aria-invalid="true"]{border-color:#ff6b5a}
#hw .hw-err{margin-top:10px;font-size:12.5px;color:#ff9083;min-height:17px}
#hw .hw-fine{margin-top:12px;font-size:11.5px;color:#6f6786;max-width:46ch;margin-inline:auto}

/* the page's hexagon button, cast in pumpkin */
#hw .hw-cta{--hex:polygon(9% 0,91% 0,100% 50%,91% 100%,9% 100%,0 50%);
  position:relative;z-index:0;isolation:isolate;display:inline-grid;place-items:center;
  flex:0 0 auto;width:clamp(190px,19vw,240px);height:54px;
  font-family:var(--hw-serif);font-size:clamp(17px,1.5vw,21px);color:#fff3df;
  background:linear-gradient(140deg,#ffd899,var(--hw-pump) 42%,#7e3404 70%,#ffc078);
  clip-path:var(--hex);
  filter:drop-shadow(0 0 20px rgba(255,138,31,.4));
  transition:transform 180ms var(--hw-ease),filter 180ms var(--hw-ease)}
#hw .hw-cta::before{content:"";position:absolute;inset:2px;z-index:-1;clip-path:var(--hex);pointer-events:none;
  background:radial-gradient(62% 130% at 50% -25%,rgba(255,160,60,.34),transparent 68%),
             linear-gradient(180deg,#3a1a06 0%,#1c0c02 55%,#331404 100%)}
#hw .hw-cta:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){
  #hw .hw-cta:hover{transform:translateY(-2px);filter:drop-shadow(0 0 30px rgba(255,138,31,.7))}
}

/* ── the doors ────────────────────────────────────────────────────────── */
#hw .hw-doors{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(10px,2.2vw,34px);
  max-width:600px;margin:clamp(18px,2.4vw,28px) auto 0;perspective:1400px}
#hw .hw-door{position:relative;display:block;padding:0;border:0;background:none;cursor:pointer;
  transition:transform 260ms var(--hw-ease)}
#hw .hw-door[disabled]{cursor:default}
/* a door built out of spans ignores aspect-ratio until the spans are blocks */
#hw .hw-door span,#hw .hw-door svg{display:block}
#hw .hw-door__stage{position:relative}
/* a pool of candlelight on the flagstones, so the doors stand on something */
#hw .hw-door__stage::after{content:"";position:absolute;left:2%;right:2%;bottom:-8%;height:16%;
  border-radius:50%;pointer-events:none;
  background:radial-gradient(50% 100% at 50% 50%,rgba(255,150,50,.26),transparent 72%);
  filter:blur(7px)}
#hw .hw-door__frame{position:relative;aspect-ratio:1/1.5;border-radius:50% 50% 5px 5px/22% 22% 2% 2%;
  background:linear-gradient(180deg,#1d1330,#0e0817);
  box-shadow:0 0 0 2px rgba(236,210,122,.24),0 24px 48px rgba(0,0,0,.66);
  overflow:hidden;transform-style:preserve-3d}
#hw .hw-door__glow{position:absolute;inset:0;border-radius:inherit;opacity:0;
  background:radial-gradient(60% 52% at 50% 58%, #fff3d0, rgba(255,190,90,.72) 34%, rgba(255,120,20,.2) 66%, transparent 78%);
  transition:opacity 520ms var(--hw-ease)}
#hw .hw-door__leaf{position:absolute;inset:0;border-radius:inherit;transform-origin:left center;
  background:
    repeating-linear-gradient(90deg,rgba(0,0,0,.26) 0 1px,transparent 1px 13%),
    linear-gradient(180deg,#5d3c21 0%,#3e2714 46%,#291a0e 100%);
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.4),inset 0 22px 42px rgba(0,0,0,.44);
  transition:transform 900ms cubic-bezier(.62,.02,.26,1),filter 900ms var(--hw-ease)}
#hw .hw-door.is-open .hw-door__leaf{transform:rotateY(-104deg);filter:brightness(.42)}
#hw .hw-door.is-open .hw-door__glow{opacity:1}
#hw .hw-door__band{position:absolute;left:-2%;right:-2%;height:7px;
  background:linear-gradient(180deg,#92804f,#4b3d22);box-shadow:0 1px 0 rgba(0,0,0,.5)}
#hw .hw-door__band.a{top:25%} #hw .hw-door__band.b{top:67%}
#hw .hw-door__ring{position:absolute;left:50%;top:44%;width:26%;aspect-ratio:1;translate:-50% 0;
  border-radius:50%;border:3px solid #9b8757;box-shadow:0 2px 0 rgba(0,0,0,.45)}
#hw .hw-door__num{position:absolute;left:50%;top:9%;translate:-50% 0;font-family:var(--hw-serif);
  font-size:clamp(14px,1.8vw,22px);color:#dcc890;text-shadow:0 1px 0 rgba(0,0,0,.6)}
#hw .hw-door__seep{position:absolute;left:8%;right:8%;bottom:0;height:10px;border-radius:50%;
  background:radial-gradient(50% 100% at 50% 100%,rgba(255,150,40,.9),transparent 72%);
  filter:blur(3px);animation:hw-seep 3.2s ease-in-out infinite}
@keyframes hw-seep{0%,100%{opacity:.45}50%{opacity:.95}}
#hw .hw-pump{position:absolute;left:50%;bottom:-13%;width:36%;translate:-50% 0;pointer-events:none;
  filter:drop-shadow(0 0 16px rgba(255,130,25,.55));transition:filter 260ms var(--hw-ease)}
#hw .hw-door__cap{margin-top:clamp(34px,3.6vw,44px);font-family:var(--hw-serif);
  font-size:clamp(12px,1.05vw,15px);color:#b4abc6;letter-spacing:.06em}
@media (hover:hover) and (pointer:fine){
  #hw .hw-door:not([disabled]):hover{transform:translateY(-8px)}
  #hw .hw-door:not([disabled]):hover .hw-door__frame{box-shadow:0 0 0 2px var(--hw-gold),0 30px 60px rgba(0,0,0,.72)}
  #hw .hw-door:not([disabled]):hover .hw-pump{filter:drop-shadow(0 0 28px rgba(255,150,40,1))}
}
#hw .hw-door:focus-visible{outline:2px solid var(--hw-gold);outline-offset:6px;border-radius:8px}
#hw .hw-door.is-dim{opacity:.34;filter:grayscale(.5)}
#hw .hw-door__peek{position:absolute;left:50%;top:46%;translate:-50% -50%;z-index:2;
  font-family:var(--hw-serif);font-size:clamp(17px,2.2vw,28px);color:#42280a;opacity:0;
  transition:opacity 420ms var(--hw-ease) 420ms}
#hw .hw-door.is-open .hw-door__peek{opacity:1}

/* ── the prize ────────────────────────────────────────────────────────── */
#hw .hw-pct{font-family:var(--hw-serif);line-height:.86;margin-top:clamp(6px,1vw,12px);
  font-size:clamp(76px,13vw,168px);
  background:linear-gradient(180deg,#fff4d2,var(--hw-pump) 54%,#a94605);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 0 36px rgba(255,138,31,.5))}
#hw .hw-pct small{font-size:.3em;letter-spacing:.06em}
#hw .hw-code{display:inline-flex;align-items:center;gap:12px;margin-top:16px;padding:11px 18px;
  border:1px dashed rgba(236,210,122,.5);border-radius:4px;background:rgba(236,210,122,.06);
  font-family:var(--hw-serif);font-size:clamp(17px,2vw,26px);color:var(--hw-gold-br);letter-spacing:.08em}
#hw .hw-copy{font-family:var(--hw-sans);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:#a79cc0;border:1px solid rgba(255,255,255,.18);border-radius:3px;padding:6px 10px;
  transition:color 160ms,border-color 160ms}
#hw .hw-copy:hover{color:#fff;border-color:rgba(255,255,255,.44)}
#hw .hw-prize .hw-cta{margin-top:clamp(18px,2.4vw,26px)}

#hw .hw-close{position:absolute;top:clamp(12px,2vw,26px);right:clamp(12px,2vw,26px);z-index:8;
  width:42px;height:42px;display:grid;place-items:center;border-radius:50%;
  color:#8d85a2;transition:color 160ms,background 160ms}
#hw .hw-close:hover{color:#fff;background:rgba(255,255,255,.08)}
#hw .hw-skip{display:block;margin:16px auto 0;font-size:12px;color:#746c8a;text-decoration:underline;
  text-underline-offset:3px}
#hw .hw-skip:hover{color:#b4abc6}

/* the pill that brings the prize back */
#hw-pill{position:fixed;left:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));
  transition:bottom 280ms cubic-bezier(.23,1,.32,1);
  z-index:120;display:none;align-items:center;gap:10px;
  padding:10px 16px;border-radius:999px;cursor:pointer;
  font-family:var(--sans,system-ui);font-size:13px;color:#2a1605;font-weight:600;
  background:linear-gradient(180deg,#ffc078,#ff8a1f);
  box-shadow:0 10px 26px rgba(0,0,0,.5);border:0;
  animation:hw-pop 520ms cubic-bezier(.23,1,.32,1) both}
#hw-pill.on{display:inline-flex}
#hw-pill.is-up{bottom:calc(74px + env(safe-area-inset-bottom,0px))}
@keyframes hw-pop{from{opacity:0;transform:translateY(16px)}}

@media(max-width:760px){
  /* the arch would otherwise fill a phone edge to edge and hide the hall, so it
     narrows and lets more of the corridor read through it */
  #hw .hw-arch{width:91%;border-radius:50% 50% 8px 8px/20% 20% 1% 1%;
    padding:clamp(44px,7.5vh,74px) 14px 24px;
    background:
      radial-gradient(86% 64% at 50% 38%, rgba(9,6,20,.62), rgba(4,3,10,.84) 78%),
      linear-gradient(180deg,rgba(26,16,50,.34),rgba(3,2,8,.8));
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
  #hw .hw-doors{gap:8px}
  #hw .hw-door__cap{margin-top:26px;font-size:11px}
  #hw .hw-form{flex-direction:column}
  #hw .hw-input{flex:0 0 auto;width:100%;height:52px}
  #hw .hw-cta{width:100%}
  #hw .hw-arch__lamp{display:none}
}
@media (prefers-reduced-motion:reduce){
  #hw *,#hw *::before,#hw *::after{animation:none!important;transition-duration:1ms!important}
  }
