/* QuestLife landing page (index.html). Dark only: it is the game's own palette. */
:root {
  color-scheme: dark;
  --bg: #0d0b2a;
  --bg2: #120f36;
  --surface: rgba(26, 24, 60, .72);
  --line: rgba(160, 150, 255, .16);
  --text: #eeeaff;
  --muted: #b3aed6;
  --violet: #8F89FF;
  --primary: #6C63FF;
  --gold: #e8c45a;
  --gold2: #f6dc8a;
  --xp: #FFD93D;
  --xpbar: #2EB8F5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Hero art: the shared 403x391 parts canvas. */
  --hero-ratio: 403 / 391;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--violet); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.gold {
  background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, #b8891d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  margin: 0 0 14px; color: var(--violet); font-weight: 700; font-size: .78rem;
  letter-spacing: .2em; text-transform: uppercase;
}
.sec-lede { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 18px 0 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
section { position: relative; }

/* ---------- Play buttons ---------- */
.play-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 18px; border-radius: 14px;
  background: #fff; color: #120f36; text-decoration: none; font-weight: 800; font-size: 1.15rem; line-height: 1.1;
  box-shadow: 0 10px 40px rgba(108, 99, 255, .45), 0 0 0 1px rgba(255,255,255,.4) inset;
  transition: transform .2s ease, box-shadow .2s ease;
}
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(108, 99, 255, .6); }
.play-btn svg { width: 26px; height: 26px; fill: var(--primary); flex: none; }
.play-btn small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.play-btn.small { padding: 8px 14px 8px 12px; font-size: .9rem; border-radius: 11px; box-shadow: none; }
.play-btn.small svg { width: 16px; height: 16px; }
.cta-note { color: var(--muted); font-size: .9rem; margin: 0; }
.cta-note span { margin: 0 8px; opacity: .5; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px;
  padding: 12px max(16px, calc((100% - 1120px) / 2)); transition: background .3s ease, box-shadow .3s ease;
}
.nav.solid { background: rgba(13, 11, 42, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav-brand { display: flex; align-items: center; gap: 9px; }
.nav-brand img { height: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 820px) { .nav-links { display: none; } .nav .play-btn { margin-left: auto; } }

/* ---------- 1. Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 96px 0 72px; overflow: hidden; }
.sky { position: absolute; inset: 0; background: #0d0b2a url(/questlife/img/sky.jpg) center 30% / cover no-repeat; }
.sky::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.stars { position: absolute; inset: 0; background-repeat: repeat; opacity: .8; }
.stars.s1 { background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 140px 90px, #fff, transparent), radial-gradient(1.2px 1.2px at 260px 160px, #e9e4ff, transparent); background-size: 300px 220px; animation: twinkle 5s ease-in-out infinite; }
.stars.s2 { background-image: radial-gradient(1px 1px at 80px 140px, #fff, transparent), radial-gradient(1.6px 1.6px at 200px 40px, #d8d0ff, transparent); background-size: 260px 260px; animation: twinkle 7s ease-in-out infinite 1.5s; }
.stars.s3 { background-image: radial-gradient(2px 2px at 50px 60px, #fff8d8, transparent); background-size: 420px 340px; animation: twinkle 9s ease-in-out infinite 3s; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
.hero-inner {
  position: relative; width: min(1120px, 100% - 32px); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(3rem, 7.4vw, 5.6rem); text-shadow: 0 4px 40px rgba(0,0,0,.35); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d9d4f5; max-width: 520px; margin: 22px 0 32px; }
.cta-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-copy > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 40px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* The demo card */
.demo {
  position: relative; border-radius: 26px; padding: 16px; background: rgba(18, 15, 54, .78);
  border: 1px solid rgba(180, 170, 255, .22); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04) inset;
  animation: rise 1s .2s cubic-bezier(.2,.7,.2,1) both; max-width: 470px; justify-self: end; width: 100%;
}
.demo-top { display: flex; align-items: center; gap: 14px; padding: 4px 4px 14px; }
.lvl { width: 58px; height: 58px; border-radius: 16px; display: grid; place-content: center; text-align: center;
  background: linear-gradient(160deg, #2b2670, #191545); border: 1px solid rgba(160,150,255,.35); }
.lvl-label { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lvl-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--violet); }
.lvl.pop { animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 40% { transform: scale(1.25); } }
.xp { flex: 1; }
.xp-row { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.xp-row span:first-child { color: var(--xp); letter-spacing: .1em; }
.xp-track { height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.xp-fill { height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, #1f8fd0, var(--xpbar) 60%, #9fe3ff);
  box-shadow: 0 0 14px rgba(46,184,245,.6); transition: width .7s cubic-bezier(.3,.9,.3,1); }

.stage { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #1a1838; }
.region { position: absolute; inset: 0; background-size: cover; background-position: center 82%; transition: opacity 1.2s ease; }
.region.next { opacity: 0; }
.actors { position: absolute; left: 50%; bottom: 13%; width: 62%; translate: -50% 0; aspect-ratio: var(--hero-ratio); }
.actors .hero-sprite { position: absolute; left: -6%; bottom: 0; width: 82%; }
.actors .pet-sprite { position: absolute; right: -4%; bottom: 3%; width: 36%; animation: petIdle 2.6s ease-in-out infinite; }
@keyframes petIdle { 50% { transform: translateY(-3%); } }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; left: 44%; top: 30%; padding: 4px 11px; border-radius: 999px; font-weight: 800; font-size: .9rem; white-space: nowrap;
  color: #1b1500; background: var(--xp); box-shadow: 0 6px 20px rgba(255,217,61,.45); animation: floatUp 1.5s ease-out forwards; }
.floater.stat { background: var(--c); color: #120f36; top: 42%; left: 52%; animation-delay: .12s; opacity: 0; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(20px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.05); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-60px); } }
.levelup { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255,217,61,.35), transparent 60%); }
.levelup.show { animation: lu 2.8s ease forwards; }
@keyframes lu { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }
.lu-title { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 800; color: #fff;
  text-shadow: 0 0 24px rgba(255,200,60,.9), 0 3px 0 #9a6d0c; animation: luPop .7s cubic-bezier(.2,1.6,.4,1) both; }
.levelup.show .lu-title { animation: luPop .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes luPop { from { transform: scale(.3); } }
.lu-sub { margin: 6px 0 0; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px var(--gold);
  animation: spark 1.2s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.jump { animation: jump .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes jump { 35% { transform: translateY(-16%); } }

.quests { display: grid; gap: 8px; margin-top: 14px; }
.quests-head { margin: 0 4px 2px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.quests-head span { font-size: .78rem; font-weight: 600; color: var(--muted); }
.quest {
  display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s, transform .15s;
  border-left: 3px solid var(--c);
}
.quest[data-stat="str"] { --c: #FF6B6B; } .quest[data-stat="int"] { --c: #8F89FF; } .quest[data-stat="vit"] { --c: #4ECDC4; }
.quest:hover:not(.done) { background: rgba(255,255,255,.08); transform: translateY(-1px); }
.quest:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.q-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); display: grid; place-content: center; transition: all .25s; }
.quest.done .q-check { background: var(--c); border-color: var(--c); }
.quest.done .q-check::after { content: ""; width: 10px; height: 6px; border: solid #120f36; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.quest.done { opacity: .6; cursor: default; }
.quest.done b { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.5); }
.q-text b { display: block; font-size: .95rem; }
.q-text i { display: block; font-style: normal; font-size: .76rem; color: var(--muted); }
.chip { font-size: .66rem; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.chip.str { --c: #FF6B6B; } .chip.int { --c: #8F89FF; } .chip.vit { --c: #4ECDC4; }
.q-xp { font-size: .78rem; font-weight: 800; color: var(--xp); }
.again { justify-self: center; margin-top: 4px; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(160,150,255,.4);
  background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.again:hover { background: rgba(160,150,255,.12); }

@media (max-width: 900px) {
  .hero { padding-top: 88px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .lede { margin-inline: auto; }
  .cta-row { align-items: center; }
  .demo { justify-self: center; }
  .scroll-cue { display: none; }
}

/* ---------- Hero sprite (parts stack) ---------- */
.hero-sprite { position: relative; aspect-ratio: var(--hero-ratio); }
.hero-sprite > img, .hero-sprite .part, .hero-sprite .head > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-sprite .head { position: absolute; inset: 0; }
.hero-sprite.walking { animation: bob .76s linear infinite; }
.hero-sprite.walking .arm { transform-origin: 32.5% 71.9%; animation: arm .76s linear infinite; }
.hero-sprite.walking .weapon { transform-origin: 53.1% 82.4%; animation: weapon .76s linear infinite; }
.hero-sprite.walking .head { transform-origin: 42.7% 73.1%; animation: head .76s linear infinite; }
@keyframes bob { 0%, 50%, 100% { transform: translateY(0); } 25%, 75% { transform: translateY(-1.8%); } }
@keyframes arm { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-6deg); } }
@keyframes weapon { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes head { 0%, 55%, 100% { transform: rotate(0); } 30% { transform: rotate(2deg) translateY(-.6%); } 80% { transform: rotate(-2deg) translateY(-.6%); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 2. Stats ---------- */
.stats-sec { padding: 110px 0 90px; text-align: center; }
.stats-sec .sec-lede { margin-inline: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 46px; }
.stat-card {
  position: relative; padding: 22px 18px 20px; border-radius: 20px; text-align: left; overflow: hidden;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 16%, #17143f), #131034 70%);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px color-mix(in srgb, var(--c) 25%, transparent); }
.stat-card::before { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); }
.stat-abbr { display: inline-block; font-weight: 900; letter-spacing: .12em; font-size: .8rem; color: var(--c); }
.stat-card h3 { margin: 8px 0 8px; font-size: 1.35rem; }
.stat-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.stat-grid .stat-card:nth-child(2) { transition-delay: .06s; } .stat-grid .stat-card:nth-child(3) { transition-delay: .12s; }
.stat-grid .stat-card:nth-child(4) { transition-delay: .18s; } .stat-grid .stat-card:nth-child(5) { transition-delay: .24s; }
@media (max-width: 960px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .stat-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------- 3. The Long Road ---------- */
.road-sec { padding: 90px 0 80px; }
.road { position: relative; height: clamp(260px, 34vw, 420px); margin-top: 46px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.road-track { position: absolute; inset: 0 auto 0 0; display: flex; height: 100%; width: max-content; animation: road 60s linear infinite; }
.road-track figure { position: relative; margin: 0; height: 100%; aspect-ratio: 560 / 506; background-size: cover; background-position: center 82%; }
.road-track figcaption { position: absolute; left: 50%; top: 12%; translate: -50% 0; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(13,11,42,.72); font-weight: 800; font-size: .85rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes road { to { transform: translateX(-50%); } }
.road-walker { position: absolute; left: 50%; bottom: 13%; height: 40%; aspect-ratio: 1.35; translate: -50% 0; }
.road-walker .hero-sprite { position: absolute; right: 0; bottom: 0; height: 100%; }
.road-walker .walk-pet { position: absolute; left: 0; bottom: 2%; height: 46%; transform: scaleX(-1); animation: petHop .38s ease-in-out infinite alternate; }
@keyframes petHop { to { translate: 0 -6%; } }
.milestones { list-style: none; padding: 0; margin: 28px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 18px; }
.milestones li { color: var(--muted); font-size: .92rem; padding-left: 14px; border-left: 2px solid var(--line); }
.milestones b { display: block; color: var(--text); font-family: var(--serif); font-size: 1.15rem; }
@media (max-width: 760px) { .milestones { grid-template-columns: repeat(2, 1fr); } .br-wide { display: none; } }

/* ---------- Features with phones ---------- */
.feature { padding: 90px 0; }
.feature-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: center; }
.feature-grid.flip { grid-template-columns: 1.2fr .8fr; }
.feature-grid.flip .phone { order: 2; }
.feature-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; margin: 18px 0 0; max-width: 540px; }
.phone {
  margin: 0; justify-self: center; width: min(300px, 78vw); padding: 10px; border-radius: 42px;
  background: linear-gradient(160deg, #3a3478, #17143c 40%, #0c0a22); box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 80px rgba(108,99,255,.25);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 33px; }
.phone.tilt-l.in { transform: perspective(1200px) rotateY(10deg) rotateZ(-2deg); }
.phone.tilt-r.in { transform: perspective(1200px) rotateY(-10deg) rotateZ(2deg); }
.game-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; max-width: 420px; }
.game-list li { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-radius: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.game-list b { font-family: var(--serif); font-size: 1.12rem; }
.game-list span { font-size: .72rem; font-weight: 900; letter-spacing: .12em; color: var(--c); }
@media (max-width: 860px) {
  .feature-grid, .feature-grid.flip { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .feature-grid.flip .phone { order: 0; }
  .feature-copy p:not(.eyebrow) { margin-inline: auto; }
  .game-list { margin-inline: auto; text-align: left; }
}

/* ---------- 5. Dungeon ---------- */
.dungeon-sec { padding: 60px 0 90px; text-align: center; }
.crypt { position: relative; width: min(1200px, 100%); margin: 0 auto; aspect-ratio: 3 / 1; min-height: 240px;
  background: url(/questlife/img/crypt.jpg) center / cover; overflow: hidden; }
/* Fade the hall's edges into the page. */
.crypt::after { content: ""; position: absolute; inset: -2px; pointer-events: none; box-shadow: inset 0 0 70px 50px var(--bg); }
.torch { position: absolute; top: 26%; width: 14%; aspect-ratio: 1; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,170,60,.75), rgba(255,120,30,.25) 40%, transparent 70%); animation: flicker 2.2s infinite; }
.torch.t1 { left: -1%; } .torch.t2 { right: -1%; animation-delay: .7s; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: scale(1); } 20% { opacity: .6; } 40% { opacity: 1; transform: scale(1.06); } 60% { opacity: .7; } 80% { opacity: .95; transform: scale(.97); } }
.duel { position: absolute; left: 50%; bottom: 9%; width: min(560px, 62%); translate: -50% 0; display: flex; align-items: flex-end; justify-content: space-between; }
.duel .hero-sprite { width: 46%; animation: lunge 2.4s ease-in-out infinite; }
.duel .boss { width: 48%; transform: scaleX(-1); animation: bossIdle 1.6s ease-in-out infinite; }
@keyframes lunge { 0%, 60%, 100% { transform: translateX(0); } 70% { transform: translateX(12%); } 78% { transform: translateX(6%); } }
@keyframes bossIdle { 50% { translate: 0 -2%; } 72% { filter: brightness(1.8) saturate(.4); } 76% { filter: none; } }
.dungeon-copy { margin-top: 18px; }
.dungeon-copy .sec-lede { margin-inline: auto; }

/* ---------- 7. Heroes ---------- */
.heroes-sec { padding: 90px 0; text-align: center; overflow: hidden; }
.heroes-sec .sec-lede { margin-inline: auto; }
.showcase { position: relative; width: min(760px, 100% - 32px); margin: 46px auto 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.sc-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08) inset; }
.sc-stage .hero-sprite { position: absolute; left: 50%; bottom: 13%; width: 54%; translate: -50% 0; }
.sc-stage .hero-sprite.swap { animation: swapIn .55s cubic-bezier(.2,1.4,.4,1); }
@keyframes swapIn { from { opacity: 0; transform: translateY(8%) scale(.9); } }
.sc-arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.05); cursor: pointer; display: grid; place-content: center; }
.sc-arrow:hover { background: rgba(255,255,255,.12); }
.sc-arrow svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-name { grid-column: 1 / -1; margin: 18px 0 0; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.sc-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
.sc-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); cursor: pointer; }
.sc-dots button[aria-current="true"] { background: var(--gold); width: 26px; border-radius: 5px; }
@media (max-width: 600px) { .showcase { grid-template-columns: 1fr; } .sc-arrow { display: none; } }

/* ---------- 8. Companions ---------- */
.pets-sec { padding: 90px 0; text-align: center; }
.pets-sec .sec-lede { margin-inline: auto; }
.pet-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 40px; }
.pet-grid button { position: relative; aspect-ratio: 1; padding: 6px; border-radius: 18px; border: 1px solid var(--line); cursor: pointer;
  background: radial-gradient(circle at 50% 70%, rgba(108,99,255,.18), rgba(255,255,255,.02) 70%); transition: transform .25s cubic-bezier(.2,1.4,.4,1), border-color .2s, background .2s; }
.pet-grid button img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pet-grid button:hover { transform: translateY(-6px) scale(1.06); border-color: rgba(232,196,90,.5); }
.pet-grid button[aria-pressed="true"] { border-color: var(--gold); background: radial-gradient(circle at 50% 70%, rgba(232,196,90,.3), rgba(255,255,255,.02) 70%); }
.pet-grid button.reveal { transition: opacity .6s ease, transform .6s cubic-bezier(.2,1.4,.4,1); }
.pet-grid button.hidden-pet img { filter: brightness(0) drop-shadow(0 0 1px rgba(160,150,255,.6)); opacity: .55; }
.pet-grid button.hidden-pet::after { content: "?"; position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--serif); font-size: 1.8rem; font-weight: 800; color: rgba(232,196,90,.85); }
.pet-more { margin: 18px 0 0; color: var(--gold); font-weight: 700; letter-spacing: .02em; }
.pet-card { min-height: 3.4em; margin: 14px auto 0; font-size: 1.1rem; }
.pet-card b { font-family: var(--serif); font-size: 1.3rem; }
.pet-card span { color: var(--muted); }
@media (max-width: 760px) { .pet-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Promises ---------- */
.promise-sec { padding: 80px 0 100px; text-align: center; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; text-align: left; }
.promise { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.promise h3 { margin: 14px 0 8px; font-size: 1.35rem; }
.promise p { margin: 0; color: var(--muted); }
.p-icon { display: grid; place-content: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(108,99,255,.18); }
.p-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) { .promise-grid { grid-template-columns: 1fr; } }

/* ---------- 10. Final ---------- */
.final { min-height: 92svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 110px 16px 60px; overflow: hidden; }
.final-bg { position: absolute; inset: 0; background: url(/questlife/img/regions/r16.jpg) center 30% / cover; }
.final-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), rgba(13,11,42,.35) 30%, rgba(13,11,42,.55) 70%, var(--bg)); }
.final-copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 640px; }
.final-emblem { width: 110px; height: auto; filter: drop-shadow(0 0 30px rgba(255,210,90,.55)); animation: hover 4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }
.final h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.lineup { position: relative; display: flex; align-items: flex-end; justify-content: center; margin-top: 30px; order: 2; width: min(900px, 100%); }
.lineup .hero-sprite { width: 16%; margin: 0 -3.4%; }
/* Back row smaller, so the crowd has depth. */
.lineup .hero-sprite:nth-child(odd) { width: 14%; margin-bottom: 1.5%; filter: brightness(.82); }
.final .cta-note { max-width: 520px; color: #d4cff0; }
@media (max-width: 600px) {
  .lineup { width: 118%; }
  .lineup .hero-sprite { width: 17%; margin: 0 -4%; }
  .lineup .hero-sprite:nth-child(odd) { width: 15%; }
  .crypt::after { box-shadow: inset 0 0 28px 16px var(--bg); }
  .hero .eyebrow { font-size: .68rem; letter-spacing: .12em; }
}

/* ---------- Footer ---------- */
.foot { padding: 34px 0 44px; border-top: 1px solid var(--line); }
.foot-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot img { height: auto; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.foot a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot a:hover { color: var(--text); }
.foot p { margin: 0; color: var(--muted); font-size: .85rem; width: 100%; }
@media (max-width: 640px) { .foot-inner { justify-content: center; text-align: center; } .foot nav { margin: 0; justify-content: center; } }

/* ---------- Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
