/* Fright Files — Immersion layer 2026-11-18
   Chapters-style staging for the adventures: beat-revealed prose, a Keeper
   consequence panel, living art, page-turn transitions. Presentation only —
   no story, graph, price or entitlement logic lives here. Dark vintage
   case-file look and the existing glass treatment are untouched. */

:root{--ff-gold:#e5b86d;--ff-gold-hi:#f6d391}

/* ---------- Beat-revealed prose ---------- */
.ff-para{display:block;opacity:0;transform:translateY(10px);animation:ff-para-in .55s ease forwards;animation-delay:var(--ffd,0s)}
.ff-para + .ff-para{margin-top:.85em}
.ff-para.ff-opening{border-left:2px solid rgba(229,184,109,.55);padding-left:14px}
.ff-para.ff-fast{animation-duration:.12s!important;animation-delay:0s!important}
@keyframes ff-para-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- The Keeper's consequence beat panel ---------- */
.ff-beat{display:flex;gap:12px;align-items:flex-start;border:1px solid #a18b66;border-radius:12px;padding:12px 16px;margin:18px 0 6px;background:linear-gradient(145deg,rgba(21,38,63,.86),rgba(13,25,43,.86));backdrop-filter:blur(12px);box-shadow:0 14px 40px #0007;font:13px/1.65 system-ui,sans-serif;color:#eadfc6;transition:opacity .6s ease}
.ff-beat img.ff-keeper-face{width:44px;height:56px;flex:none;object-fit:cover;object-position:center 25%;border-radius:8px;border:1px solid #a48653;animation:ff-breathe 7s ease-in-out infinite}
.ff-beat .ff-beat-head{font:800 10px/1.5 system-ui,sans-serif;letter-spacing:.16em;color:var(--ff-gold);text-transform:uppercase;margin-bottom:3px}
.ff-beat .ff-beat-line{opacity:0;animation:ff-para-in .5s ease forwards;animation-delay:var(--ffd,0s)}
.ff-beat .ff-beat-line b{color:#f2d59e}
.ff-beat.ff-beat-out{opacity:0}

/* ---------- Choice registration + staged entrance ---------- */
#choices .choice{transition:opacity .45s ease,transform .45s ease,filter .25s ease,background .25s ease,border-color .25s ease}
#choices .choice.ff-chosen{border-color:var(--ff-gold-hi);background:rgba(96,72,30,.78);box-shadow:0 0 0 1px var(--ff-gold-hi),0 12px 32px #0009;transform:scale(1.015)}
#choices .choice.ff-dim{opacity:.42}
#choices .choice.ff-pre{opacity:0;transform:translateY(12px)}
#choices .choice.ff-choice-in{opacity:1;transform:none}

/* ---------- Page-turn transition ---------- */
.ff-turn-in{animation:ff-turn .6s ease}
@keyframes ff-turn{from{opacity:.25;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ---------- Living art ---------- */
@keyframes ff-drift{from{transform:scale(1.02) translateY(0)}to{transform:scale(1.09) translateY(-6px)}}
@keyframes ff-breathe{0%,100%{transform:scale(1);filter:drop-shadow(0 0 6px rgba(225,182,119,.18))}50%{transform:scale(1.025);filter:drop-shadow(0 0 14px rgba(225,182,119,.38))}}
.sceneart{animation:ff-drift 26s ease-in-out infinite alternate}
.ff-drift{animation:ff-drift 26s ease-in-out infinite alternate}
.ff-keeper-live{animation:ff-breathe 7s ease-in-out infinite}
.hero img,.scene-hero img,.hero-visual img{animation:ff-drift 30s ease-in-out infinite alternate}

/* ---------- Stage frame: scene art with its section chip ---------- */
.ff-stage-wrap{position:relative}
.ff-stage-chip{position:absolute;top:10px;left:10px;z-index:3;padding:5px 11px;border-radius:50px;border:1px solid #a78955;background:rgba(10,18,32,.78);backdrop-filter:blur(8px);color:#f7d8a1;font:800 10px/1.4 system-ui,sans-serif;letter-spacing:.14em;pointer-events:none}
.ff-stage-wrap.ff-dim-art img{filter:brightness(.78) saturate(.92)}
.ff-stage-wrap img{transition:filter .8s ease}

/* ---------- Hub case cards: gentle entrance ---------- */
.casecard{animation:ff-card-in .6s ease backwards}
@keyframes ff-card-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ---------- Sound toggle ---------- */
.ff-snd-btn{position:fixed;right:14px;bottom:14px;z-index:80;width:48px;height:48px;border-radius:50%;border:1px solid #a48653;background:rgba(14,26,45,.88);backdrop-filter:blur(10px);color:#f2d59e;font-size:20px;line-height:1;cursor:pointer;box-shadow:0 8px 24px #000a;display:flex;align-items:center;justify-content:center}
.ff-snd-btn:focus-visible{outline:3px solid #f6d391;outline-offset:3px}
body.playing-case .ff-snd-btn{bottom:86px}

/* ---------- Reduced motion: everything settles instantly ---------- */
@media (prefers-reduced-motion:reduce){
 .ff-para,.ff-beat .ff-beat-line{opacity:1!important;transform:none!important;animation:none!important}
 .ff-turn-in,.casecard{animation:none!important}
 .sceneart,.ff-drift,.ff-keeper-live,.ff-beat img.ff-keeper-face,.hero img,.scene-hero img,.hero-visual img{animation:none!important}
 #choices .choice{transition:none!important}
 #choices .choice.ff-pre{opacity:1;transform:none}
 .ff-beat{transition:none}
}
