/* ============================================================
   PFun Store NFT — 3D hero module (first screen of /nft/)
   Companion to nft.css / nft.js (DxsxtNFT). Every rule lives
   under .dxh so it cannot leak into, or be broken by, the host.
   ============================================================ */

.dxh{
  --dxh-text:#F5F5F7;
  --dxh-muted:#A1A1A6;
  --dxh-muted-2:#86868B;
  --dxh-muted-l:#6E6E73;
  --dxh-hair:rgba(255,255,255,.10);
  --dxh-gold:#FFB340;
  --dxh-gold-text:#FFCF8A;
  --dxh-gold-grad:linear-gradient(174deg,#FFF6E6 4%,#FFDDA6 38%,#F5B65C 78%,#E39A33 100%);
  --dxh-accent:#2997FF;
  --dxh-metal-body:#090B11;
  --dxh-metal-top:#171E2B;
  --dxh-ease:cubic-bezier(.22,1,.36,1);
  --dxh-sans:"Geist","Noto Sans TC",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --dxh-mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --dxh-gutter:clamp(16px,5vw,40px);
  --dxh-max:1200px;
  --dxh-offset:64px;              /* height of the host's sticky header */
  --dxh-card:clamp(150px,22vh,220px);   /* card width; scales with the viewport height so the scene fits one screen */

  color-scheme:dark;
  color:var(--dxh-text);
  font-family:var(--dxh-sans);
  -webkit-font-smoothing:antialiased;
  background:#000;
}
.dxh *,.dxh *::before,.dxh *::after{box-sizing:border-box}
:where(.dxh) button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;margin:0;padding:0}
:where(.dxh) a{color:inherit;text-decoration:none}
:where(.dxh) img,:where(.dxh) video{display:block;max-width:100%}
.dxh :focus-visible{outline:2px solid var(--dxh-accent);outline-offset:3px;border-radius:8px}
.dxh-wrap{max-width:var(--dxh-max);margin:0 auto;padding:0 var(--dxh-gutter)}

/* ---------- the scene ---------- */
.dxh-hero{
  position:relative;overflow:hidden;isolation:isolate;
  min-height:calc(100svh - var(--dxh-offset));
  display:flex;flex-direction:column;
  padding:clamp(24px,4vh,44px) 0 0;
}
.dxh-bg{position:absolute;inset:0;z-index:-1;overflow:hidden;background:#05070B}
.dxh-bg-img{
  position:absolute;left:50%;top:50%;width:max(100%,177.8vh);height:max(100%,56.25vw);
  transform:translate(-50%,-50%) scale(1.04);object-fit:cover;filter:saturate(1.05) brightness(.9);
  animation:dxh-drift 40s ease-in-out infinite alternate;
}
@keyframes dxh-drift{from{transform:translate(-50%,-50%) scale(1.04)}to{transform:translate(-49%,-51%) scale(1.10)}}
.dxh-veil{
  position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(180deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.58) 26%,rgba(0,0,0,.26) 48%,rgba(0,0,0,.12) 58%,rgba(0,0,0,.38) 80%,#000 100%),
    radial-gradient(60% 45% at 50% 62%,rgba(255,179,64,.16),transparent 70%);
}
.dxh-dust{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:screen}

/* copy block (top, centred) */
.dxh-top{position:relative;z-index:2;text-align:center;padding:0 var(--dxh-gutter)}
/* soft dark pool behind the copy so it stays readable over the light beams */
.dxh-top::before{
  content:"";position:absolute;left:50%;top:50%;width:min(120%,1100px);height:150%;transform:translate(-50%,-50%);z-index:-1;pointer-events:none;
  background:radial-gradient(50% 50% at 50% 50%,rgba(0,0,0,.74) 0%,rgba(0,0,0,.5) 40%,rgba(0,0,0,.18) 68%,transparent 100%)
}
.dxh-eyebrow{
  margin:0;font-family:var(--dxh-mono);font-size:12.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--dxh-gold-text);
  display:inline-flex;align-items:center;gap:10px;text-shadow:0 1px 8px rgba(0,0,0,.9)
}
.dxh-eyebrow::before,.dxh-eyebrow::after{content:"";width:28px;height:1px;background:linear-gradient(90deg,transparent,rgba(255,207,138,.8))}
.dxh-eyebrow::after{transform:scaleX(-1)}
.dxh-h1{
  margin:12px 0 0;font-size:clamp(34px,5.4vw,66px);line-height:1.02;font-weight:750;letter-spacing:-.03em;
  text-wrap:balance;text-shadow:0 8px 40px rgba(0,0,0,.6)
}
.dxh-h1 span{display:block}
.dxh-h1 em{
  font-style:normal;display:block;
  background:var(--dxh-gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 6px 24px rgba(255,179,64,.22))
}
.dxh-lede{margin:14px auto 0;max-width:64ch;font-size:clamp(15px,1.35vw,18px);line-height:1.55;color:#E9E9ED;text-wrap:pretty;text-shadow:0 1px 2px rgba(0,0,0,.95),0 3px 16px rgba(0,0,0,.85)}
.dxh-cta{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:20px}

/* buttons (same family as nft.css .dxn-btn) */
.dxh-btn{
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:50px;padding:0 24px;border-radius:999px;font-size:15.5px;font-weight:650;overflow:hidden;
  border:1px solid rgba(255,207,138,.38);color:#1A1200;
  background:var(--dxh-gold-grad);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7),inset 0 -1px 0 rgba(0,0,0,.25),0 10px 30px rgba(255,179,64,.22);
  transition:transform .15s var(--dxh-ease),box-shadow .15s var(--dxh-ease)
}
.dxh-btn:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 14px 36px rgba(255,179,64,.3)}
.dxh-btn:active{transform:scale(.98)}
.dxh-btn--ghost{
  color:var(--dxh-text);background:rgba(10,10,12,.55);border:1px solid var(--dxh-hair);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:none;font-weight:600
}
.dxh-btn--ghost:hover{border-color:rgba(255,255,255,.28);box-shadow:none}
.dxh-btn svg{width:16px;height:16px;flex:none}

/* ---------- the card fan ---------- */
.dxh-fan{
  position:relative;z-index:1;flex:1 1 auto;min-height:calc(var(--dxh-card) * 1.6);
  margin-top:clamp(8px,2vh,24px);
  perspective:1500px;perspective-origin:50% 28%;
  touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab;
}
.dxh-fan.is-drag{cursor:grabbing}
.dxh-ring{position:absolute;inset:0;transform-style:preserve-3d}
.dxh-card{
  position:absolute;left:50%;top:50%;width:var(--dxh-card);aspect-ratio:440/614;
  transform-style:preserve-3d;will-change:transform,opacity;
  border-radius:calc(var(--dxh-card) * .07);
  box-shadow:0 30px 60px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06);
  background:#0d0f14;overflow:hidden;
  transition:box-shadow .4s var(--dxh-ease);
}
.dxh-card img{width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
.dxh-card .dxh-glow{
  position:absolute;inset:-2px;border-radius:inherit;pointer-events:none;opacity:0;
  box-shadow:0 0 0 1.5px rgba(255,207,138,.9),0 0 40px rgba(255,179,64,.55),0 30px 80px rgba(255,179,64,.25);
  transition:opacity .4s var(--dxh-ease)
}
.dxh-card .dxh-sheen{
  position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;
  background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.22) 45%,rgba(255,255,255,.05) 52%,transparent 66%);
  background-size:220% 100%;background-position:120% 0;
}
.dxh-card.is-focus .dxh-glow{opacity:1}
.dxh-card.is-focus .dxh-sheen{opacity:1;animation:dxh-sheen 5.5s var(--dxh-ease) infinite}
@keyframes dxh-sheen{0%,55%{background-position:120% 0}85%,100%{background-position:-40% 0}}
.dxh-card.is-hidden{visibility:hidden}
.dxh-floor{
  position:absolute;left:50%;bottom:6%;width:min(70%,760px);height:26px;transform:translateX(-50%);
  border-radius:50%;background:radial-gradient(50% 50% at 50% 50%,rgba(255,179,64,.35),transparent 70%);filter:blur(6px);pointer-events:none
}

/* caption row under the fan */
.dxh-cap{
  position:relative;z-index:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:14px;
  width:min(100% - 2*var(--dxh-gutter),480px);margin:0 auto;
}
.dxh-arrow{
  width:44px;height:44px;border-radius:999px;border:1px solid var(--dxh-hair);background:rgba(10,10,12,.55);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:grid;place-items:center;color:var(--dxh-text);
  transition:border-color .2s,background .2s
}
.dxh-arrow:hover{border-color:rgba(255,207,138,.5);background:rgba(255,179,64,.12)}
.dxh-arrow svg{width:16px;height:16px}
.dxh-cur{text-align:center;min-width:0}
.dxh-cur-no{font-family:var(--dxh-mono);font-size:12.5px;letter-spacing:.1em;color:var(--dxh-gold);display:flex;justify-content:center;gap:10px;font-variant-numeric:tabular-nums}
.dxh-cur-no b{font-weight:600}
.dxh-cur-no i{font-style:normal;color:var(--dxh-muted-2)}
.dxh-cur-no i::before{content:"·";margin-right:10px}
.dxh-cur-name{display:block;font-size:clamp(17px,1.6vw,21px);font-weight:650;letter-spacing:-.01em;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dxh-cur-row{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:5px;flex-wrap:wrap}
.dxh-cur-skill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:rgba(255,179,64,.16);color:var(--dxh-gold-text);font-size:12.5px;font-weight:500}
.dxh-cur-skill i{font-style:normal;color:var(--dxh-muted-2)}
.dxh-inspect{color:var(--dxh-text);font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 4px}
.dxh-inspect:hover{color:var(--dxh-gold-text)}
.dxh-inspect svg{width:14px;height:14px}
.dxh-hint{margin:8px 0 0;text-align:center;font-size:12px;color:var(--dxh-muted-l);padding:0 var(--dxh-gutter) 16px}

/* ---------- trailer ---------- */
.dxh-trailer{padding:clamp(48px,7vw,88px) 0 0}
.dxh-trailer-in{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:center}
@media (min-width:900px){.dxh-trailer-in{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:48px}}
.dxh-video{
  position:relative;border-radius:24px;overflow:hidden;aspect-ratio:16/9;background:#000;
  border:1px solid rgba(255,179,64,.32);box-shadow:0 30px 80px rgba(0,0,0,.6),0 0 60px rgba(255,179,64,.10)
}
.dxh-video video{width:100%;height:100%;object-fit:cover}
.dxh-trailer h2{margin:10px 0 0;font-size:clamp(24px,2.8vw,34px);font-weight:700;letter-spacing:-.02em;line-height:1.15;text-wrap:balance}
.dxh-trailer p{margin:12px 0 0;color:var(--dxh-muted);font-size:15.5px;line-height:1.6;max-width:44ch}
.dxh-trailer .dxh-cta{justify-content:flex-start;margin-top:20px}
.dxh-trailer .dxh-eyebrow{color:var(--dxh-muted-2)}
.dxh-trailer .dxh-eyebrow::before,.dxh-trailer .dxh-eyebrow::after{display:none}

/* ---------- breakpoints ---------- */
@media (max-width:1100px){.dxh{--dxh-card:clamp(140px,20vh,180px)}}
@media (max-width:760px){
  .dxh{--dxh-card:min(150px,38vw)}
  .dxh-hero{padding-top:22px}
  .dxh-h1{font-size:clamp(32px,10.5vw,44px)}
  .dxh-lede{font-size:15px;max-width:34ch}
  .dxh-cta{margin-top:18px}
  .dxh-btn{min-height:46px;padding:0 20px;font-size:14.5px}
  .dxh-fan{perspective:1100px;min-height:calc(var(--dxh-card) * 1.75)}
  .dxh-cap{grid-template-columns:40px minmax(0,1fr) 40px;gap:8px}
  .dxh-arrow{width:40px;height:40px}
}
@media (max-height:640px) and (min-width:761px){
  .dxh{--dxh-card:150px}
  .dxh-lede{display:none}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .dxh-bg-img{animation:none}
  .dxh-card.is-focus .dxh-sheen{animation:none;opacity:0}
  .dxh-card{transition:none}
}
