/* IMPOSSIBLE REALMS — the home page (docs/web/home1). One look, the game's own: night navy, banner red and torch gold
   from the key art; Kanit for every Thai word, Pixelify Sans (the logo's face) only for Latin labels and numbers.
   Layout: a full-bleed key-art opening, then bands that alternate night / deeper night, content in a 1120px column. */
:root {
  color-scheme: dark;
  --night: #0a0e1f; --deep: #070a17; --panel: #121a36; --line: #26325f;
  --gold: #f4c542; --gold-dk: #a97a14; --banner: #b8322a; --sky: #8fb8ff;
  --ink: #eef0fa; --mute: #a3acd0;
  --f-body: Kanit, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-pixel: 'Pixelify Sans', Kanit, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 16px/1.6 var(--f-body); }
a { color: var(--sky); text-decoration: none; } a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0; }
h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 700; }
.eyebrow { font: 700 13px/1 var(--f-pixel); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.lead { color: var(--mute); max-width: 62ch; margin: 10px 0 0; }

/* the bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(7, 10, 23, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.bar img { height: 34px; width: auto; display: block; }
.bar nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; } .bar nav::-webkit-scrollbar { display: none; }
.bar nav a { color: var(--ink); padding: 6px 12px; border-radius: 8px; white-space: nowrap; font-weight: 500; } .bar nav a:hover { background: var(--panel); text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn.gold { background: linear-gradient(#ffdb6a, #e3a51b); color: #2a1a00; box-shadow: 0 3px 0 var(--gold-dk), 0 10px 26px rgba(244, 197, 66, .25); } .btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { border-color: rgba(255, 255, 255, .35); color: var(--ink); background: rgba(7, 10, 23, .45); } .btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.bar .btn { padding: 7px 16px; }

/* the opening: the key art itself */
.hero { position: relative; min-height: clamp(460px, 72vh, 720px); display: flex; align-items: flex-end; background: var(--deep) url(img/keyart.jpg) center 35% / cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 10, 23, .15) 0%, rgba(7, 10, 23, .1) 40%, rgba(10, 14, 31, .92) 82%, var(--night) 100%); }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-block: 48px 40px; }
.hero .logo { width: min(440px, 78vw); height: auto; display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.hero p.tag { font-size: clamp(18px, 2.6vw, 23px); font-weight: 500; max-width: 34ch; margin: 14px 0 22px; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; } .hero .btn.gold { font-size: 19px; padding: 14px 30px; }
.hero small { display: block; margin-top: 12px; color: var(--mute); }

/* the numbers of this world */
.facts { background: var(--deep); border-block: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0 auto; padding-block: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.facts li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.facts b { font: 700 clamp(30px, 4.4vw, 42px)/1.1 var(--f-body); color: var(--gold); font-variant-numeric: tabular-nums; }
.facts span { color: var(--mute); font-size: 14px; }

section.band { padding-block: 64px; } section.band.alt { background: var(--deep); }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }

/* ways to play */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.way { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; display: grid; gap: 6px; align-content: start; }
.way .k { font: 700 12px/1 var(--f-pixel); letter-spacing: .12em; color: var(--banner); text-transform: uppercase; }
.way h3 { font-size: 19px; color: var(--ink); } .way p { margin: 0; color: var(--mute); font-size: 15px; }

/* classes */
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cls { display: grid; justify-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 14px; background: linear-gradient(180deg, var(--panel), var(--deep)); border: 1px solid var(--line); color: var(--ink); text-align: center; }
.cls:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.cls img { height: 92px; width: auto; image-rendering: pixelated; max-width: 100%; }
.cls b { font-weight: 600; } .cls span { color: var(--mute); font-size: 13px; line-height: 1.35; }
@media (prefers-reduced-motion: no-preference) { .cls { transition: transform .15s, border-color .15s; } }

/* the phone and the world */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.phone { justify-self: center; width: min(300px, 80vw); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 34px; padding: 10px; background: #1b2244; box-shadow: 0 0 0 2px #313d74, 0 24px 60px rgba(0, 0, 0, .55); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; display: block; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checks li::before { content: ''; width: 18px; height: 18px; margin-top: 4px; border-radius: 5px; background: var(--gold); box-shadow: inset 0 0 0 4px #2a1a00; }
.parade { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: end; margin-top: 22px; }
.parade img { height: 56px; width: auto; image-rendering: pixelated; }
.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-top: 22px; }
.map { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.map:hover { border-color: var(--sky); text-decoration: none; } .map em { font: 600 14px/1.6 var(--f-body); font-style: normal; color: var(--gold); white-space: nowrap; }

/* updates */
.news { display: grid; gap: 12px; }
.news article { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.news time { font: 600 15px/1.4 var(--f-body); color: var(--gold); }
.news h3 { font-size: 18px; margin-bottom: 4px; } .news p { margin: 0; color: var(--mute); }

/* guide */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.g { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.g:hover { border-color: var(--gold); text-decoration: none; } .g b { font-size: 17px; } .g span { color: var(--mute); font-size: 14.5px; }

/* community + faq */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.todo { margin-top: 12px; font-size: 13.5px; color: var(--mute); border: 1px dashed var(--gold-dk); border-radius: 10px; padding: 8px 12px; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; } summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; } summary::after { content: '+'; color: var(--gold); font: 700 20px/1 var(--f-pixel); } details[open] summary::after { content: '–'; }
details p { margin: 8px 0 0; color: var(--mute); }

.final { text-align: center; padding-block: 72px; background: radial-gradient(600px 260px at 50% 100%, rgba(184, 50, 42, .35), transparent 70%), var(--deep); border-top: 1px solid var(--line); }
.final h2 { margin-bottom: 18px; }
footer { padding-block: 26px; color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }

@media (max-width: 760px) {
  .split, .two { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .news article { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bar nav { display: none; }
  section.band { padding-block: 48px; }
}

/* the trailer, the language link, the Facebook button (2026-10-14) */
.lang { color: var(--mute); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; white-space: nowrap; font-size: 14px; } .lang:hover { color: var(--gold); border-color: var(--gold); text-decoration: none; }
.trailer { padding-block: 56px; } .video { position: relative; max-width: 960px; margin: 22px auto 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); background: #000; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.btn.fb { background: #1877f2; color: #fff; border-color: #1877f2; } .btn.fb:hover { filter: brightness(1.08); }
.btn.fb svg { width: 18px; height: 18px; fill: currentColor; }
