/* Mobile Logic Games: the home page and the site's own plain pages (About, Contact, Privacy, 404). The header and
   the footer are shell.css; each game's colours are themes.css (written by the build from site/games.mjs).
   The home page follows the approved design (arts/Mobile Logic Games Landing Page.png): a deep dark page, one wide
   hero picture, big slanted type, and the games as large banners. No script. */

@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 900; font-display: swap; src: url(fonts/montserrat-black-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0B0D14;
  --bg-2: #101014;
  --surface: #1C1C24;
  --text: #F5F5F7;
  --dim: #B5B5C4;
  --purple: #713DE8;
  --line: rgba(245, 245, 247, 0.14);
  --gutter: clamp(16px, 5.2vw, 56px);
  --wrap: 1192px;
  --sans: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Montserrat", "Lexend", "Arial Black", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: #C9B4FF; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid #B79BFF; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: #fff; text-wrap: balance; }
p { margin: 0 0 1em; }
[id] { scroll-margin-top: 20px; }

/* ------------------------------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1.1875rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn .ico { flex: none; stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

.btn-primary {
  min-width: 240px; color: #fff;
  background: linear-gradient(180deg, #8658F3, #5C2DD8);
  border-color: rgba(196, 170, 255, 0.6);
  box-shadow: 0 12px 32px rgba(113, 61, 232, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { color: #fff; }

/* ============================================================================================ hero
   One wide picture behind real text. The picture's left third is dark on purpose: the words stand there. It fades
   into the page at the bottom. */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  display: flex; align-items: center;
  min-height: clamp(520px, 46vw, 820px);
  padding: 104px var(--gutter) clamp(28px, 4vw, 56px);
}
.hero-art { position: absolute; inset: 0; z-index: -2; display: block; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(11, 13, 20, 0) 58%, rgba(11, 13, 20, 0.72) 86%, var(--bg) 100%),
    linear-gradient(to right, rgba(11, 13, 20, 0.5), rgba(11, 13, 20, 0) 44%);
}
.hero-copy { width: min(100%, var(--wrap)); margin: 0 auto; }
.hero h1 {
  font: italic 900 clamp(3.5rem, 7.45vw, 6.75rem)/0.97 var(--display);
  letter-spacing: -0.012em; text-transform: uppercase; color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.hero h1 span { display: block; width: fit-content; }
/* PLAY. in gold; the padding keeps the slanted last letter inside the gradient's box */
.hero h1 .hero-gold {
  padding-right: 0.12em; margin-right: -0.12em;
  background: linear-gradient(180deg, #FFD466 8%, #FFB32E 52%, #F58A0B 96%);
  -webkit-background-clip: text; background-clip: text;
  color: #FFBB45; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.35));
}
.hero-lead { max-width: 20.5em; margin: clamp(18px, 2.2vw, 30px) 0 0; font-size: clamp(1.0625rem, 1.75vw, 1.375rem); line-height: 1.36; color: var(--text); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }
.hero .btn-primary { margin-top: clamp(20px, 2.3vw, 30px); }

/* a phone: the picture first (its lantern and boxes), the words under it, lapping over its dark foot */
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding: 0 0 4px; }
  .hero-art { position: relative; inset: auto; height: min(80vw, 380px); }
  .hero-art img { object-position: 62% 50%; }
  .hero::after { display: none; }
  .hero-art::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, rgba(11, 13, 20, 0.62) 0, rgba(11, 13, 20, 0) 26%, rgba(11, 13, 20, 0) 52%, rgba(11, 13, 20, 0.86) 84%, var(--bg) 100%);
  }
  .hero-copy { position: relative; margin-top: -76px; padding: 0 var(--gutter); }
  .hero h1 { font-size: clamp(3.25rem, 17.2vw, 5rem); }
  .hero-lead { max-width: 24em; }
  .hero .btn-primary { min-width: min(100%, 260px); }
}

/* =========================================================================================== games */
.games { padding: clamp(36px, 4.6vw, 52px) clamp(16px, 3.7vw, 40px) 0; }
.section-title {
  display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.6vw, 28px);
  margin: 0 0 clamp(22px, 2.8vw, 30px);
  font: 600 clamp(1.375rem, 2.75vw, 1.8125rem)/1 var(--sans); letter-spacing: 0.13em; text-transform: uppercase; color: var(--text);
}
.section-title::before, .section-title::after { content: ""; flex: none; width: min(80px, 14vw); height: 1px; background: linear-gradient(to right, rgba(245, 245, 247, 0), rgba(245, 245, 247, 0.55)); }
.section-title::after { background: linear-gradient(to left, rgba(245, 245, 247, 0), rgba(245, 245, 247, 0.55)); }
.game-list { display: grid; gap: clamp(18px, 2.4vw, 26px); max-width: var(--wrap); margin: 0 auto; }

/* One game: its art fills the banner from the right at full height, and fades into the game's dark colour on the
   left, where the words are. The colours come from .game-<id> (themes.css). */
.game-banner {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(292px, 28.6vw, 344px);
  border-radius: clamp(18px, 2.2vw, 24px);
  border: 1px solid rgba(var(--g-glow), 0.6);
  background: var(--g-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 44px rgba(var(--g-glow), 0.07);
}
.game-banner-art {
  position: absolute; top: 0; right: 0; z-index: -2;
  height: 100%; width: auto; max-width: none; aspect-ratio: 1942 / 809;
  object-fit: cover; object-position: 100% 50%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
  mask-image: linear-gradient(to right, transparent 0, #000 30%);
}
/* a little of the game's colour behind the words, as in the design */
.game-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 120% at 0% 50%, rgba(var(--g-glow), 0.1), rgba(var(--g-glow), 0) 62%),
    linear-gradient(to right, var(--g-surface) 0, color-mix(in srgb, var(--g-surface) 78%, transparent) 40%, transparent 66%);
}
.game-banner-body { display: grid; gap: clamp(14px, 1.9vw, 22px); width: min(100%, 660px); padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3.3vw, 40px); }
.game-banner-head { display: flex; align-items: center; gap: clamp(16px, 2.7vw, 30px); }
.game-icon {
  flex: none; width: clamp(92px, 11.9vw, 124px); height: auto; aspect-ratio: 1; border-radius: 22.5%;
  box-shadow: 0 0 0 2px rgba(var(--g-glow), 0.8), 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 34px rgba(var(--g-glow), 0.28);
}
.game-banner h3 { margin: 0 0 clamp(8px, 1vw, 12px); font: 700 clamp(1.75rem, 4vw, 2.75rem)/1.08 var(--sans); letter-spacing: -0.01em; color: #fff; }
.game-banner-head p { margin: 0; max-width: 24em; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.4; color: var(--text); }
.game-features { display: flex; flex-wrap: wrap; gap: 12px clamp(16px, 3.4vw, 44px); margin: 0; padding: 0 0 0 clamp(0px, 3vw, 34px); list-style: none; }
.game-features li { display: flex; align-items: center; gap: 14px; font-size: 0.875rem; line-height: 1.3; color: var(--text); }
.game-features .ico { flex: none; width: 32px; height: 32px; color: var(--g-accent); }
.game-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px clamp(16px, 2.8vw, 30px); padding-left: clamp(0px, 0.6vw, 6px); }

.btn-game {
  min-height: 46px; padding: 0 24px 0 30px; font-size: 1.0625rem;
  color: var(--g-on-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--g-accent) 80%, #fff), var(--g-accent) 46%, var(--g-accent-deep));
  box-shadow: 0 10px 24px rgba(var(--g-glow), 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-game:hover { color: var(--g-on-accent); }

/* The stores' own badges, as provided, never restyled beyond their size: Apple's first, then Google's. A store
   that is not live for a game is dimmed and inert, with "Coming soon" under it. */
.stores { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 18px; margin: 0; }
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; flex: none; border-radius: 8px; line-height: 0; text-decoration: none; }
.badge img { display: block; height: 46px; width: auto; max-width: none; }
a.badge { transition: transform 0.15s ease; }
a.badge:hover { transform: translateY(-1px); }
.badge-off { cursor: default; user-select: none; }
.badge-off .badge-art { display: block; background: #000; border-radius: 8px; line-height: 0; }
.badge-off img { opacity: 0.45; }
.badge-off .soon { font: 500 0.75rem/1.2 var(--sans); color: var(--dim); }

/* a phone or an upright tablet: the banner stands upright. The picture on top, the words under it. */
@media (max-width: 900px) {
  .game-banner { display: block; min-height: 0; }
  .game-banner-art {
    position: relative; display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-position: 88% 50%;
    -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  }
  .game-banner::before { background: radial-gradient(120% 60% at 50% 100%, rgba(var(--g-glow), 0.1), rgba(var(--g-glow), 0) 70%); }
  .game-banner-body { position: relative; width: 100%; margin-top: -34px; padding: 0 clamp(18px, 4vw, 32px) 24px; gap: 18px; }
  .game-banner-head p { max-width: 34em; }
  .game-features { padding-left: 0; }
  .game-actions { padding-left: 0; }
}
@media (max-width: 600px) {
  .game-banner-art { aspect-ratio: 16 / 9; }
  .game-banner-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px 16px; }
  .game-banner-head > div { display: contents; }
  .game-banner h3 { margin: 0; }
  .game-banner-head p { grid-column: 1 / -1; max-width: none; }
  .game-icon { width: 72px; }
  .game-features { display: grid; gap: 10px; }
  .game-features br { display: none; }
  .game-features .ico { width: 28px; height: 28px; }
  .btn-game { flex: 1 1 100%; min-height: 50px; }
  .badge img { height: 44px; }
}

/* ====================================================================================== about strip */
.about-strip { padding: clamp(56px, 6.6vw, 84px) var(--gutter) clamp(28px, 4vw, 48px); text-align: center; }
.about-strip h2 { margin: 0 0 16px; font: 600 clamp(1.5rem, 3.1vw, 1.9375rem)/1.2 var(--sans); letter-spacing: -0.005em; }
.about-strip p { max-width: 41em; margin: 0 auto; color: var(--dim); font-size: 1rem; line-height: 1.6; }

/* ===================================================================================== plain pages */
.page { max-width: calc(46rem + 2 * var(--gutter)); margin: 0 auto; padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(24px, 5vw, 48px); }
.page-head { padding-bottom: 8px; }
.page-head h1 { margin: 14px 0 18px; font: 700 clamp(2rem, 5.4vw, 3rem)/1.1 var(--sans); letter-spacing: -0.015em; }
.page-head .lede { margin: 0; font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.5; color: var(--text); }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--dim); }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "\203A"; margin: 0 8px; color: #7B7B8C; }
.crumbs a { display: inline-block; padding: 6px 0; color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.prose { color: #D8D8E0; }
.prose h2 { margin: 2.1em 0 0.6em; font: 600 1.375rem/1.25 var(--sans); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose .mlg-game-links { margin: 0.4em 0 0; padding: 0; }
.prose .mlg-game-links li { margin: 0; }
.prose .meta { margin: 2.6em 0 0; color: var(--dim); font-size: 0.875rem; }
