/* Metro Mystery — studio home page only. Builds on site.css tokens. */
:root {
  --lm: #b48cff;   /* LetterMatrix violet */
  --wd: #4db5ff;   /* Word Dropper blue (player 1) */
  --wd2: #ff6b8a;  /* Word Dropper pink (player 2) */
  --dk: #46d39a;   /* Deckthello felt green */
  --gg: #ffd37a;   /* Gather gold */
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); overflow: hidden;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(31, 111, 209, .28), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(217, 84, 26, .24), transparent 55%),
    radial-gradient(ellipse at 60% 100%, rgba(180, 140, 255, .14), transparent 60%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); max-width: 12ch; margin-bottom: .35em; }
.hero h1 .hl { position: relative; color: var(--gold); }
.hero h1 .hl::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .18em; background: linear-gradient(90deg, var(--ice), var(--ember)); border-radius: 3px; z-index: -1; opacity: .9; }
.hero .lede { margin: 0 0 1.6em; max-width: 34em; font-size: 1.15rem; color: var(--muted); text-shadow: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 30px; list-style: none; margin: 32px 0 0; padding: 0; }
.stats li { display: flex; align-items: center; gap: 10px; }
.stats b { font: 600 2.2rem/1 var(--display); color: var(--ink); min-width: 1.2ch; }
.stats li:nth-child(1) b { color: var(--ice); }
.stats li:nth-child(3) b { color: var(--ember); }
.stats span { font-size: .85rem; line-height: 1.3; color: var(--muted); font-weight: 700; }

.hero-stage { position: relative; aspect-ratio: 1 / .86; }
.window { position: absolute; inset: 8% 4% 10% 6%; border-radius: 14px; overflow: hidden; border: 1px solid #39405c; background: #0d1018;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.02); transform: rotate(-2.5deg); }
.window-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #161a28; border-bottom: 1px solid #262c42; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b6b; }
.window-bar i:nth-child(2) { background: #ffd37a; }
.window-bar i:nth-child(3) { background: #7ddc8a; }
.window-bar span { margin-left: 10px; font: 500 .8rem var(--display); color: var(--muted); }
.window img { width: 100%; height: calc(100% - 30px); object-fit: cover; image-rendering: pixelated; }

.float { position: absolute; animation: bob 5s ease-in-out infinite; will-change: transform; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }
.tile { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 10px; font: 600 1.7rem var(--display); color: #1b1230;
  background: linear-gradient(180deg, #e3d4ff, var(--lm)); box-shadow: 0 6px 0 #6b4bb3, 0 14px 26px rgba(0,0,0,.45); transform: rotate(var(--r)); }
.t1 { --r: -10deg; left: 0; top: 4%; }
.t2 { --r: 6deg; left: 11%; top: -2%; animation-delay: -.8s; }
.t3 { --r: -4deg; left: 22%; top: 5%; animation-delay: -1.6s; }
.t4 { --r: 9deg; left: 33%; top: 0; animation-delay: -2.4s; }
.pcard { width: 70px; height: 98px; border-radius: 9px; background: #fbfaf5; color: #151826; box-shadow: 0 16px 30px rgba(0,0,0,.5); padding: 6px 8px; display: flex; flex-direction: column; justify-content: space-between; transform: rotate(var(--r)); }
.pcard b { font: 600 1.4rem/1 var(--display); }
.pcard span { align-self: flex-end; font-size: 1.8rem; line-height: 1; }
.pcard.red { color: #d63a4a; }
.c1 { --r: 12deg; right: -2%; bottom: 12%; animation-delay: -1s; }
.c2 { --r: -8deg; right: 9%; bottom: 2%; animation-delay: -2.2s; }
.phone { --r: -14deg; left: -3%; bottom: 6%; width: 56px; height: 100px; border-radius: 12px; background: #20263a; border: 3px solid #39405c; box-shadow: 0 16px 30px rgba(0,0,0,.5); transform: rotate(var(--r)); animation-delay: -3s; }
.phone span { position: absolute; inset: 14px 8px; border-radius: 4px; background: linear-gradient(160deg, var(--gold), var(--ember)); }
.sprite { width: 76px; height: 76px; image-rendering: pixelated; filter: drop-shadow(0 8px 14px rgba(0,0,0,.7)); }
.s1 { right: 2%; top: 0; animation-delay: -1.3s; }
.s2 { right: 20%; top: -6%; animation-delay: -3.4s; width: 64px; height: 64px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: #0d1019; padding: 14px 0; }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: slide 30s linear infinite; font: 600 clamp(1.2rem, 2.6vw, 1.7rem) var(--display); text-transform: uppercase; letter-spacing: .08em; }
.marquee-track span:nth-of-type(5n+1) { color: var(--lm); }
.marquee-track span:nth-of-type(5n+2) { color: var(--wd); }
.marquee-track span:nth-of-type(5n+3) { color: var(--dk); }
.marquee-track span:nth-of-type(5n+4) { color: var(--gg); }
.marquee-track span:nth-of-type(5n) { color: var(--ember); }
.marquee-track i { font-style: normal; color: #3a4260; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- play now ---------- */
.play-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 24px; margin-bottom: 28px; }
.play-head h2 { margin: 0; }
.moods { display: flex; flex-wrap: wrap; gap: 8px; }
.mood { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 800 .92rem var(--body); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.mood:hover { color: var(--ink); border-color: #4a5375; }
.mood.on { background: var(--ink); color: #0a0c13; border-color: var(--ink); }

.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.g { --accent: var(--ice); position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .25s ease, filter .25s ease; }
.g:hover { color: var(--ink); transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 50px -12px color-mix(in srgb, var(--accent) 45%, transparent); }
.g.dim { opacity: .28; filter: grayscale(.8); transform: scale(.98); }
.g-deck { --accent: var(--dk); }
.g-lm { --accent: var(--lm); }
.g-wd { --accent: var(--wd); }
.g-gg { --accent: var(--gg); }
.g-info { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.g-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.g-title h3 { margin: 0; font-size: 1.5rem; }
.tag { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.g-info p { margin: 0; color: var(--muted); font-size: .98rem; flex: 1; }
.play { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-weight: 800; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); transition: background .2s, color .2s; }
.play i { font-style: normal; transition: transform .2s; }
.g:hover .play { background: var(--accent); color: #0a0c13; }
.g:hover .play i { transform: translateX(4px); }
.none { margin-top: 18px; text-align: center; }

/* mini scenes */
.scene { position: relative; height: 230px; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.combo { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border-radius: 8px; font: 600 1rem var(--display); background: rgba(10,12,19,.8); border: 1px solid var(--accent); color: var(--ink); opacity: 0; transform: translateY(-6px) scale(.95); transition: opacity .25s, transform .25s; }
.combo b { color: var(--accent); }
.scene.pop .combo { opacity: 1; transform: none; }

/* Deckthello */
.scene-deck { background: radial-gradient(ellipse at center, #1d5a44, #0f2b22 75%); }
.scene-deck .board { display: grid; grid-template-columns: repeat(5, 34px); grid-template-rows: repeat(4, 46px); gap: 6px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.22); }
.scene-deck .cell { border-radius: 5px; border: 1px dashed rgba(255,255,255,.14); display: grid; place-items: center; font: 600 .9rem/1 var(--display); }
.scene-deck .cell.card { border: 0; background: #fbfaf5; color: #151826; box-shadow: 0 3px 0 #c9c4b3; animation: deal .35s ease-out; }
.scene-deck .cell.card.red { color: #d63a4a; }
.scene-deck .cell.win { box-shadow: 0 0 0 2px var(--dk), 0 0 18px var(--dk); }
@keyframes deal { from { transform: translateY(-30px) rotate(-12deg); opacity: 0; } }

/* LetterMatrix */
.scene-lm { background: linear-gradient(180deg, #1b1236, #0e0b1c); }
.scene-lm .well { display: grid; grid-template-columns: repeat(7, 28px); grid-auto-rows: 28px; gap: 3px; padding: 6px; border: 2px solid #3d2d6b; border-top: 0; border-radius: 0 0 8px 8px; height: 200px; align-content: end; position: relative; }
.scene-lm .lt { position: absolute; width: 28px; height: 28px; border-radius: 5px; display: grid; place-items: center; font: 600 .95rem var(--display); color: #1b1230; background: linear-gradient(180deg, #e3d4ff, var(--lm)); box-shadow: 0 3px 0 #6b4bb3; transition: top .5s cubic-bezier(.5,0,.75,0), background .2s, transform .3s, opacity .3s; }
.scene-lm .lt.hit { background: linear-gradient(180deg, #fff3c4, var(--gold)); box-shadow: 0 0 14px var(--gold); }
.scene-lm .lt.gone { transform: scale(1.4); opacity: 0; }

/* Word Dropper */
.scene-wd { background: linear-gradient(180deg, #0f2238, #0b1424); }
.scene-wd .grid { display: grid; grid-template-columns: repeat(6, 30px); grid-template-rows: repeat(5, 30px); gap: 5px; padding: 10px; border-radius: 12px; background: #1d3e8a; box-shadow: inset 0 -5px 0 #142d68; }
.scene-wd .slot { border-radius: 50%; background: #0b1424; display: grid; place-items: center; font: 600 .9rem var(--display); color: #fff; }
.scene-wd .slot.p1 { background: var(--wd); color: #06233d; animation: drop .45s cubic-bezier(.3,0,.6,1.4); }
.scene-wd .slot.p2 { background: var(--wd2); color: #3d0614; animation: drop .45s cubic-bezier(.3,0,.6,1.4); }
.scene-wd .slot.win { box-shadow: 0 0 0 2px #fff, 0 0 16px var(--wd); }
@keyframes drop { from { transform: translateY(-160px); } }

/* Gather */
.scene-gg { background: radial-gradient(ellipse at 50% 30%, #3a2a10, #15110a 75%); }
.scene-gg .tv { position: relative; width: 210px; height: 120px; border-radius: 10px; border: 6px solid #2a2f44; background: linear-gradient(160deg, #2b1d4d, #121a36); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 0 40px rgba(255,211,122,.18); }
.scene-gg .tv::after { content: ""; position: absolute; bottom: -18px; left: 50%; width: 60px; height: 10px; margin-left: -30px; border-radius: 0 0 6px 6px; background: #2a2f44; }
.scene-gg .code { font: 500 .8rem var(--display); color: var(--muted); letter-spacing: .1em; }
.scene-gg .code b { font-size: 1.5rem; color: var(--gg); letter-spacing: .16em; }
.scene-gg .joined { font-size: .8rem; font-weight: 800; color: var(--ink); }
.scene-gg .joined b { color: var(--gg); }
.scene-gg .phones { position: absolute; inset: 0; pointer-events: none; }
.scene-gg .ph { position: absolute; width: 16px; height: 28px; border-radius: 4px; background: #20263a; border: 2px solid #4a5375; animation: join .4s ease-out both; }
.scene-gg .ph::after { content: ""; position: absolute; inset: 3px 2px; border-radius: 2px; background: var(--c, var(--gg)); }
@keyframes join { from { transform: scale(0) translateY(10px); opacity: 0; } }

/* ---------- Dual Fuse feature ---------- */
.df { position: relative; overflow: hidden; padding-bottom: 0; border-top: 1px solid var(--line); }
.df-bg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,19,.55), rgba(10,12,19,.92) 70%, var(--bg)), url("/assets/dualfuse/keyart.webp") center top / cover; image-rendering: pixelated; }
.df-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.df-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.df-logo { width: min(400px, 100%); filter: drop-shadow(0 10px 30px rgba(0,0,0,.8)); margin: 4px 0 -4px; }
.df-copy h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.df-copy p { margin: 0; color: #d0d6e4; }
.df-facts { display: flex; gap: 12px; list-style: none; padding: 0; margin: 4px 0 6px; }
.df-facts li { padding: 10px 16px; border-radius: 12px; background: rgba(22,26,40,.85); border: 1px solid var(--line); }
.df-facts li:nth-child(odd) b { color: var(--ice); }
.df-facts li:nth-child(even) b { color: var(--ember); }
.df-facts b { display: block; font: 600 1.7rem/1 var(--display); }
.df-facts span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.df-shots { position: relative; aspect-ratio: 16 / 12; }
.df-shots img { position: absolute; width: 82%; border-radius: 12px; border: 1px solid #39405c; box-shadow: 0 24px 60px rgba(0,0,0,.6); image-rendering: pixelated; transition: transform .3s ease; }
.shot-a { left: 0; top: 0; transform: rotate(-2deg); z-index: 1; }
.shot-b { right: 0; bottom: 0; transform: rotate(2.5deg); }
.df-shots:hover .shot-a { transform: rotate(-3deg) translate(-8px, -6px); }
.df-shots:hover .shot-b { transform: rotate(3.5deg) translate(8px, 6px); z-index: 2; }
.parade { position: relative; margin-top: clamp(40px, 6vw, 64px); padding: 14px 0 22px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.parade-track { display: flex; gap: 22px; width: max-content; animation: slide 40s linear infinite; }
.parade-track img { width: 72px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.parade-track img:nth-child(odd) { animation: hop 1.2s ease-in-out infinite; }
.parade-track img:nth-child(even) { animation: hop 1.2s ease-in-out -.6s infinite; }
@keyframes hop { 50% { transform: translateY(-6px); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .df-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 520px; width: 100%; margin-inline: auto; }
}
@media (max-width: 720px) {
  .games { grid-template-columns: 1fr; }
  .scene { height: 210px; }
  .tile { width: 42px; height: 42px; font-size: 1.3rem; }
  .pcard { width: 54px; height: 76px; }
  .sprite { width: 56px; height: 56px; }
  .df-facts li { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .marquee-track, .parade-track, .parade-track img { animation: none !important; }
}
.home .nav-links a { white-space: nowrap; }
@media (max-width: 420px) { .home .brand { font-size: 1.05rem; } .home .nav-links a { padding: 8px 9px; } }
