/* ============================================================
   DECK HERO — styles only for the cinematic scroll hero.
   Requires site.css first. Visual language unchanged from the approved Deck.
   ============================================================ */
html.deck-page{scrollbar-width:none}html.deck-page::-webkit-scrollbar{display:none}

.cinematic{position:relative;height:var(--deck-h,520vh)}
@media (orientation:portrait){.cinematic{height:var(--deck-h-portrait,var(--deck-h,520vh))}}
.sticky{position:sticky;top:0;height:100vh;width:100%;overflow:hidden;background:#f3f3f1}
#hero-canvas{position:absolute;inset:0;width:100%;height:100%}
.poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:none}
.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(255,255,255,.55) 0%,transparent 18%,transparent 82%,rgba(255,255,255,.6) 100%)}
.overlay{position:absolute;inset:0;z-index:10;pointer-events:none}
.reveal-line{position:absolute;max-width:64vw;white-space:nowrap;font-weight:700;font-size:clamp(2.1rem,4.4vw,4.2rem);line-height:1.02;letter-spacing:-.035em;color:var(--ink);opacity:0;transform:translateY(40px) scale(.98);filter:none;transition:opacity .35s ease,transform .5s cubic-bezier(.16,1,.3,1);will-change:opacity,transform}
.reveal-line.on{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}
.reveal-line em{font-style:normal;color:var(--acc)}
.reveal-line small{display:block;font-weight:400;font-size:clamp(.95rem,1.15vw,1.1rem);letter-spacing:0;line-height:1.5;color:var(--ink-dim);margin-top:18px;white-space:normal;max-width:36ch}
.reveal-line::after{content:"";display:block;width:0;height:2px;margin-top:22px;background:var(--ink);transition:width .9s cubic-bezier(.16,1,.3,1) .25s}
.reveal-line.on::after{width:56px}
.reveal-line.p-tr::after,.reveal-line.p-br::after{margin-left:auto}
.reveal-line.center::after,.reveal-line.p-bc::after{margin:22px auto 0}
.reveal-line.p-bl{left:5%;bottom:12%;text-align:left}
.reveal-line.opener{font-size:clamp(1.9rem,3.6vw,3.5rem);max-width:36vw}
.reveal-line.p-tl{left:5%;top:14%;text-align:left}
.reveal-line.p-tr{right:5%;top:14%;text-align:right}
.reveal-line.p-br{right:5%;bottom:12%;text-align:right}
.reveal-line.p-tr small,.reveal-line.p-br small{margin-left:auto}
.reveal-line.p-bc{left:50%;bottom:7%;transform:translate(-50%,40px) scale(.98);text-align:center;font-size:clamp(1.8rem,3.4vw,3.2rem)}
.reveal-line.p-bc.on{transform:translate(-50%,0) scale(1)}
.reveal-line.p-bc small{margin:14px auto 0}
.reveal-line.center{left:50%;top:50%;max-width:92vw;text-align:center;transform:translate(-50%,calc(-50% + 40px)) scale(.98);font-size:clamp(2.6rem,6.4vw,6rem)}
.reveal-line.center.on{transform:translate(-50%,-50%) scale(1)}
.reveal-line.center small{margin:18px auto 0}
.reveal-line .deck-cta{display:flex;gap:10px;justify-content:center;margin-top:30px;pointer-events:auto;white-space:normal}
.reveal-line .deck-cta .btn{font-size:15px;padding:13px 22px}

/* card labels on the grid stop */
.tags{position:absolute;inset:0;z-index:11;pointer-events:none}
.tag{position:absolute;font-size:12px;font-weight:500;color:var(--muted);background:#fff;border:1px solid var(--line);padding:10px 14px;border-radius:10px;box-shadow:0 10px 30px -18px rgba(0,0,0,.35);opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .7s cubic-bezier(.16,1,.3,1)}
.tag b{display:block;font-weight:600;font-size:20px;letter-spacing:-.03em;color:var(--ink);margin-top:2px}
.tags.on .tag{opacity:1;transform:none}
.tags.on .tag:nth-child(2){transition-delay:.1s}.tags.on .tag:nth-child(3){transition-delay:.2s}.tags.on .tag:nth-child(4){transition-delay:.3s}

.progress{position:absolute;left:32px;right:32px;bottom:76px;height:2px;background:rgba(14,14,14,.08);z-index:12;border-radius:2px}
.progress-fill{height:100%;width:0%;background:var(--ink);border-radius:2px}
.scroll-hint{position:absolute;bottom:88px;left:50%;transform:translateX(-50%);z-index:12;font-size:12px;color:var(--muted);animation:bob 2s ease-in-out infinite;transition:opacity .4s}
@keyframes bob{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(5px)}}

/* beat dots + skip */
.dots{position:absolute;right:32px;top:50%;transform:translateY(-50%);z-index:13;display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}
.dots button{width:10px;height:10px;border-radius:50%;border:1px solid rgba(14,14,14,.35);background:transparent;cursor:pointer;padding:0;transition:background .25s,transform .25s}
.dots button:hover{transform:scale(1.25)}
.dots button.on{background:var(--ink);border-color:var(--ink)}
.dots button:focus-visible{outline-offset:4px}
.skip{position:absolute;right:32px;bottom:92px;z-index:13;font-size:13px;color:var(--muted);text-decoration:none;border-bottom:1px solid var(--line);padding-bottom:2px}
.skip:hover{color:var(--ink);border-color:var(--ink)}
@media (max-width:760px){.dots{right:14px}.skip{right:16px;bottom:100px}}

/* frame loader */
.loader{position:absolute;top:70px;right:32px;z-index:12;display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted);transition:opacity .6s}
.loader i{display:block;width:90px;height:2px;background:rgba(14,14,14,.08);border-radius:2px;overflow:hidden}
.loader b{display:block;height:100%;width:0;background:var(--ink);transition:width .2s linear}
.loader.done{opacity:0}
@media (max-width:760px){.loader{top:58px;right:16px}}

/* static beats list: used for reduced-motion, no-JS and frame-load failure */
.beats-static{display:none;list-style:none;margin:0;padding:0}
.beats-static li{padding:22px 0;border-top:1px solid var(--line)}
.beats-static li:last-child{border-bottom:1px solid var(--line)}
.beats-static b{display:block;font-weight:600;font-size:1.3rem;letter-spacing:-.03em;margin-bottom:6px}
.beats-static p{color:var(--ink-dim);max-width:60ch}
.beats-static-wrap{display:none;background:var(--bg);padding:48px 32px 0}
.beats-static-wrap .wrap{max-width:900px}

/* Demo pages whose footage fills the frame: give headlines a soft panel so they read over cards */
html.deck-panel .reveal-line{background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:22px 26px 24px;border-radius:16px;box-shadow:0 20px 50px -30px rgba(0,0,0,.35)}
html.deck-panel .reveal-line.center{background:rgba(255,255,255,.86);padding:34px 40px 36px}
html.deck-panel .reveal-line::after{margin-top:18px}
@media (max-width:760px){html.deck-panel .reveal-line{padding:16px 18px 18px;border-radius:12px}}

/* Fallback mode: static hero, no scrubbing */
html.deck-static .cinematic{height:auto}
html.deck-static .sticky{position:relative;height:min(78vh,720px)}
html.deck-static #hero-canvas,html.deck-static .progress,html.deck-static .scroll-hint,html.deck-static .dots,html.deck-static .skip,html.deck-static .loader,html.deck-static .tags{display:none}
html.deck-static .poster{display:block}
html.deck-static .reveal-line{display:none}
html.deck-static .reveal-line.opener{display:block;opacity:1;transform:none;filter:none}
html.deck-static .reveal-line.opener::after{width:56px}
html.deck-static .beats-static,html.deck-static .beats-static-wrap{display:block}
@media (prefers-reduced-motion:reduce){
  .reveal-line{transition:none}
  .scroll-hint{animation:none}
}

/* ---------- Mobile ---------- */
@media (max-width:760px){
  .reveal-line{max-width:88vw;white-space:normal;font-size:clamp(1.9rem,8.6vw,2.6rem)}
  .reveal-line.p-bl,.reveal-line.p-tl{left:16px}.reveal-line.p-tr,.reveal-line.p-br{right:16px}
  .reveal-line.p-tl,.reveal-line.p-tr{top:84px}.reveal-line.p-bl,.reveal-line.p-br{bottom:90px}
  .reveal-line.p-bc{bottom:80px;font-size:clamp(1.6rem,7vw,2.2rem)}
  .reveal-line.center{font-size:clamp(2.2rem,10vw,3rem)}.reveal-line .deck-cta{flex-direction:column;align-items:center}
  .tag{font-size:10px;padding:7px 9px;border-radius:8px}.tag b{font-size:14px}
  .progress{left:16px;right:16px}
  .beats-static-wrap{padding:32px 20px 0}
}

/* Motion art direction: fixed copy rail, clear stage, restrained chapter changes. */
.deck-polished .sticky{background:#f1ecdf}
.deck-polished .poster{display:block;opacity:1;transition:opacity .3s}
.deck-polished.deck-ready:not(.deck-static) .poster{opacity:0;pointer-events:none}
.deck-polished .motion-caption{position:absolute;left:5%;top:18%;width:29%;display:flex;justify-content:space-between;z-index:12;border-top:1px solid #28281f35;padding-top:14px;font-size:10px;letter-spacing:.17em;color:#56594b}
.deck-polished .motion-caption b{font-weight:600;color:#262a22}
.deck-polished .reveal-line{left:5%;right:auto;top:30%;bottom:auto;width:30%;max-width:30%;white-space:normal;text-align:left;font-size:clamp(1.8rem,3.2vw,3.6rem);line-height:1.07;letter-spacing:-.05em;padding:0;background:none;box-shadow:none;backdrop-filter:none;filter:none;transform:translateY(15px);transition:opacity .24s ease,transform .42s cubic-bezier(.2,.7,.2,1);visibility:hidden}
.deck-polished .reveal-line.on{transform:none;visibility:visible}
.deck-polished .reveal-line small{font-size:clamp(.9rem,1.12vw,1.05rem);line-height:1.65;max-width:33ch;margin:22px 0 0;color:#55594e;letter-spacing:0}
.deck-polished .reveal-line::after{margin:24px 0 0;height:1px;background:#6c7759;transition:width .45s ease}
.deck-polished .reveal-line em{color:#687454}
.deck-polished .deck-cta{justify-content:flex-start;flex-wrap:wrap;margin-top:24px;gap:8px}
.deck-polished .deck-cta .btn{padding:12px 17px;font-size:13px}
.deck-polished .dots{right:auto;left:5%;top:auto;bottom:20%;transform:none;flex-direction:row;gap:6px}
.deck-polished .dots button{width:34px;height:28px;border:0;border-radius:0;background:linear-gradient(#6c775955,#6c775955) center/100% 2px no-repeat;transform:none}
.deck-polished .dots button.on{background:linear-gradient(#35402e,#35402e) center/100% 3px no-repeat}
.deck-polished .dots button:hover{background-size:100% 4px}
.deck-polished .vignette{background:linear-gradient(90deg,#f5f1e7 0%,#f5f1e7ed 25%,transparent 48%);z-index:1}
.deck-12 #hero-canvas,.deck-12 .poster{inset:21% 3% auto auto;width:59%;height:auto;aspect-ratio:1600/894;border-radius:24px;object-fit:contain;background:#e6ddc9}
.deck-12 .vignette{display:none}
.deck-polished .progress{height:1px}
.deck-polished .scroll-hint{animation:none;letter-spacing:.1em;text-transform:uppercase;font-size:9px}
.deck-polished.deck-static .reveal-line.opener{visibility:visible}
.deck-polished.deck-static .motion-caption{display:none}
@media (orientation:portrait){
  .deck-polished .sticky{height:100svh}
  .deck-polished #hero-canvas,.deck-polished .poster{inset:8% 0 auto;width:100%;height:49%;border-radius:0;object-fit:contain;background:#e6ddc9}
  .deck-polished .vignette{display:none}
  .deck-polished .motion-caption{left:6%;top:57%;width:88%;padding-top:10px;font-size:9px}
  .deck-polished .reveal-line{left:6%;top:62%;width:86%;max-width:86%;font-size:clamp(1.6rem,6.7vw,2.5rem);line-height:1.08}
  .deck-polished .reveal-line small{font-size:clamp(.8rem,2.9vw,1rem);margin-top:12px;line-height:1.45;max-width:48ch}
  .deck-polished .reveal-line::after{display:none}
  .deck-polished .dots{left:6%;bottom:11%;gap:5px}
  .deck-polished .scroll-hint,.deck-polished .progress{display:none}
  .deck-polished .skip{bottom:12%;right:6%}
  .deck-polished .deck-cta{flex-direction:row;align-items:flex-start;margin-top:12px}
  .deck-polished .deck-cta .btn{font-size:11px;padding:10px 12px}
  .deck-polished.deck-static .sticky{height:90svh;min-height:660px}
  .deck-polished.deck-static .poster{height:58%;background:#eee7d8}
  .deck-polished.deck-static .reveal-line.opener{top:68%}
}
@media (prefers-reduced-motion:reduce){.deck-polished .reveal-line,.deck-polished .poster{transition:none}}

/* Avoid backdrop recomposition over the moving canvas. */
.deck-page .topbar.solid{backdrop-filter:none;-webkit-backdrop-filter:none;background:#f4f0e7}

.portfolio-preview .switcher{display:none!important}
