/* Maggie Software - shared styles */

:root {
  --bg: #0e1017;
  --bg-raised: #161925;
  --bg-card: #1b1f2d;
  --line: #2a3042;
  --text: #e8e4da;
  --text-dim: #a9a597;
  --text-faint: #767365;
  --gold: #d9b56c;
  --gold-strong: #e8c682;
  --gold-ink: #1a1508;
  --accent-red: #c9544a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

  /* Buttons and gold tints */
  --btn: #d9b56c;
  --btn-hover: #e8c682;
  --btn-ink: #1a1508;
  --tint: rgba(217, 181, 108, 0.12);
  --tint-border: rgba(217, 181, 108, 0.3);
  --tint-hover: rgba(217, 181, 108, 0.6);
  --ghost-bg: rgba(255, 255, 255, 0.03);

  /* Surfaces */
  --header-bg: rgba(14, 16, 23, 0.86);
  --media-bg: #07080c;
  --hero-glow-1: rgba(217, 181, 108, 0.16);
  --hero-glow-2: rgba(90, 110, 180, 0.12);
  --cta-glow: rgba(217, 181, 108, 0.14);
  --logo-ring: rgba(217, 181, 108, 0.18);
  --placeholder-a: #1a1e2c;
  --placeholder-b: #0f1119;
  --placeholder-stripe: rgba(255, 255, 255, 0.025);

  /* Game page hero (text over a screenshot) */
  --hero-fade: linear-gradient(180deg, rgba(7, 8, 12, 0.25) 0%, rgba(7, 8, 12, 0.35) 40%, rgba(14, 16, 23, 0.96) 88%, var(--bg) 100%);
  --hero-side: linear-gradient(90deg, rgba(7, 8, 12, 0.75) 0%, rgba(7, 8, 12, 0) 65%);
  --hero-title-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  --hero-lede: #cfcabd;
  --fact-bg: rgba(14, 16, 23, 0.7);

  color-scheme: dark;
  --wrap: 1160px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Light theme. It follows the browser / system setting unless the header's theme button has chosen one
   (site.js sets data-theme="light" or "dark" on <html>). Keep the two blocks below the same. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f3ec;
    --bg-raised: #fbf9f4;
    --bg-card: #ffffff;
    --line: #e2dccf;
    --text: #1f1d18;
    --text-dim: #545046;
    --text-faint: #7d786b;
    --gold: #8a6418;
    --gold-strong: #6c4c0c;
    --gold-ink: #ffffff;
    --shadow: 0 18px 44px rgba(60, 48, 20, 0.16);

    --btn: #8a6418;
    --btn-hover: #73520f;
    --btn-ink: #ffffff;
    --tint: rgba(138, 100, 24, 0.09);
    --tint-border: rgba(138, 100, 24, 0.28);
    --tint-hover: rgba(138, 100, 24, 0.55);
    --ghost-bg: rgba(255, 255, 255, 0.7);

    --header-bg: rgba(246, 243, 236, 0.88);
    --media-bg: #14161d;
    --hero-glow-1: rgba(217, 181, 108, 0.28);
    --hero-glow-2: rgba(90, 110, 180, 0.14);
    --cta-glow: rgba(217, 181, 108, 0.22);
    --logo-ring: rgba(138, 100, 24, 0.18);
    --placeholder-a: #ece6d9;
    --placeholder-b: #e2dbcc;
    --placeholder-stripe: rgba(0, 0, 0, 0.03);

    --hero-fade: linear-gradient(180deg, rgba(246, 243, 236, 0.1) 0%, rgba(246, 243, 236, 0.3) 40%, rgba(246, 243, 236, 0.95) 88%, var(--bg) 100%);
    --hero-side: linear-gradient(90deg, rgba(246, 243, 236, 0.92) 0%, rgba(246, 243, 236, 0.7) 40%, rgba(246, 243, 236, 0) 70%);
    --hero-title-shadow: 0 2px 24px rgba(255, 255, 255, 0.7);
    --hero-lede: #3d3a32;
    --fact-bg: rgba(255, 255, 255, 0.8);

    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-raised: #fbf9f4;
  --bg-card: #ffffff;
  --line: #e2dccf;
  --text: #1f1d18;
  --text-dim: #545046;
  --text-faint: #7d786b;
  --gold: #8a6418;
  --gold-strong: #6c4c0c;
  --gold-ink: #ffffff;
  --shadow: 0 18px 44px rgba(60, 48, 20, 0.16);

  --btn: #8a6418;
  --btn-hover: #73520f;
  --btn-ink: #ffffff;
  --tint: rgba(138, 100, 24, 0.09);
  --tint-border: rgba(138, 100, 24, 0.28);
  --tint-hover: rgba(138, 100, 24, 0.55);
  --ghost-bg: rgba(255, 255, 255, 0.7);

  --header-bg: rgba(246, 243, 236, 0.88);
  --media-bg: #14161d;
  --hero-glow-1: rgba(217, 181, 108, 0.28);
  --hero-glow-2: rgba(90, 110, 180, 0.14);
  --cta-glow: rgba(217, 181, 108, 0.22);
  --logo-ring: rgba(138, 100, 24, 0.18);
  --placeholder-a: #ece6d9;
  --placeholder-b: #e2dbcc;
  --placeholder-stripe: rgba(0, 0, 0, 0.03);

  --hero-fade: linear-gradient(180deg, rgba(246, 243, 236, 0.1) 0%, rgba(246, 243, 236, 0.3) 40%, rgba(246, 243, 236, 0.95) 88%, var(--bg) 100%);
  --hero-side: linear-gradient(90deg, rgba(246, 243, 236, 0.92) 0%, rgba(246, 243, 236, 0.7) 40%, rgba(246, 243, 236, 0) 70%);
  --hero-title-shadow: 0 2px 24px rgba(255, 255, 255, 0.7);
  --hero-lede: #3d3a32;
  --fact-bg: rgba(255, 255, 255, 0.8);

  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-strong); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.55rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

.lede { font-size: 1.18rem; color: var(--text-dim); max-width: 62ch; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--btn); color: var(--btn-ink); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--text); font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
}
.brand:hover { color: var(--text); text-decoration: none; }
.site-header .wrap { gap: 8px; }
.brand { margin-right: auto; }
.nav { order: 1; }

.theme-toggle {
  order: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
  font: 500 0.82rem var(--sans);
}
.theme-toggle:hover { color: var(--text); border-color: var(--gold); }
.theme-toggle svg { display: block; }
.nav-toggle { order: 3; }
@media (max-width: 760px) { .theme-toggle .label { display: none; } .theme-toggle { padding: 8px 10px; } }
.brand img { width: 42px; height: 42px; border-radius: 50%; }

.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  color: var(--text-dim); font-size: 0.95rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-card); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 8px 10px; cursor: pointer;
}
.nav-toggle svg { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 10px; padding: 12px 14px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--ghost-bg); }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* ---------- Home hero ---------- */

.home-hero {
  position: relative; overflow: hidden;
  padding: 120px 0 110px;
  background:
    radial-gradient(1100px 500px at 80% -10%, var(--hero-glow-1), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, var(--hero-glow-2), transparent 60%),
    var(--bg);
}
.home-hero h1 { max-width: 16ch; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero-logo {
  width: clamp(220px, 26vw, 320px); height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--logo-ring), var(--shadow);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-logo { order: -1; width: 200px; }
}
.home-hero .lede { margin-top: 18px; }

/* ---------- Game cards ---------- */

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }

.game-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.game-card:hover { transform: translateY(-4px); border-color: var(--tint-hover); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.game-card .art { aspect-ratio: 16 / 9; background: var(--media-bg); overflow: hidden; }
.game-card .art img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card h3 { font-size: 2rem; margin-bottom: 4px; }
.game-card p { color: var(--text-dim); margin: 0; }
.game-card .more { margin-top: auto; padding-top: 18px; color: var(--gold); font-weight: 600; }

.tag {
  display: inline-block; align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--tint); color: var(--gold); border: 1px solid var(--tint-border);
  margin-bottom: 8px;
}

.placeholder-art {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, var(--placeholder-stripe) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--placeholder-a), var(--placeholder-b));
  color: var(--text-faint); font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.08em;
}

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.about-grid .values { display: grid; gap: 18px; }
.value {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.value h3 { font-size: 1.35rem; margin-bottom: 6px; }
.value p { margin: 0; color: var(--text-dim); font-size: 0.97rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Game page hero ---------- */

.game-hero {
  position: relative; min-height: min(86vh, 760px);
  display: flex; align-items: flex-end;
  padding: 140px 0 80px;
  background: var(--bg);
  overflow: hidden;
}
.game-hero .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  transform: scale(1.03);
}
.game-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    var(--hero-fade),
    var(--hero-side);
}
.game-hero .wrap { position: relative; z-index: 1; width: 100%; }
.game-hero h1 {
  font-size: clamp(3.4rem, 10vw, 7rem); letter-spacing: 0.02em; margin-bottom: 0.15em;
  text-shadow: var(--hero-title-shadow);
}
.game-hero .tagline { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.9rem); color: var(--text); max-width: 34ch; margin-bottom: 0.6em; }
.game-hero .lede { color: var(--hero-lede); }

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.fact {
  font-size: 0.85rem; color: var(--text-dim);
  padding: 7px 14px; border-radius: 999px; background: var(--fact-bg); border: 1px solid var(--line);
}
.fact strong { color: var(--text); font-weight: 600; }

/* ---------- Trailer ---------- */

.trailer {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--media-bg); aspect-ratio: 16 / 9;
}
.trailer video { display: block; width: 100%; height: 100%; background: var(--media-bg); }
/* Portrait (phone) video: shown beside its text, phone-sized */
.trailer.portrait { aspect-ratio: 9 / 16; max-width: 380px; width: 100%; justify-self: center; border-radius: 30px; }
.trailer.portrait video { object-fit: cover; }

/* ---------- Story ---------- */

.story { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.story blockquote {
  margin: 0; padding: 28px 32px;
  font-family: var(--serif); font-size: 1.45rem; line-height: 1.45; font-style: italic;
  border-left: 3px solid var(--gold); background: var(--bg-raised); border-radius: 0 var(--radius) var(--radius) 0;
}
.shot {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--media-bg);
}
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.feature {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px;
}
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--tint); color: var(--gold); margin-bottom: 16px;
}
.feature h3 { font-size: 1.45rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); margin: 0; font-size: 0.97rem; }

/* ---------- Split rows ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 88px; }
.split.flip .text { order: 2; }
.split ul { padding-left: 1.1em; color: var(--text-dim); margin: 0; }
.split li { margin-bottom: 0.45em; }
.split li strong { color: var(--text); font-weight: 600; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.flip .text { order: 0; }
}

/* ---------- Classes ---------- */

.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.class {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 18px 16px;
}
.class .letter {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--gold); margin-bottom: 12px;
}
.class h3 { font-size: 1.3rem; margin-bottom: 4px; }
.class p { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Places ---------- */

.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.place {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
}
.place h3 { font-size: 1.25rem; margin-bottom: 2px; }
.place p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.place .lvl { color: var(--gold); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery a {
  display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: var(--media-bg); position: relative;
}
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.35s ease, opacity 0.2s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 12px 9px; font-size: 0.82rem; color: #ddd8cb;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* Portrait (phone) screenshots */
.gallery.tall { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery.tall img { aspect-ratio: 9 / 16; }
.shot.phone { max-width: 340px; width: 100%; justify-self: center; border-radius: 30px; }
.shot.phone img { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; }

/* Numbered steps (How to play) */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { position: relative; padding-left: 52px; color: var(--text-dim); counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--gold);
}
.steps strong { color: var(--text); font-weight: 600; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(4, 5, 8, 0.94);
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 120px); border-radius: 8px; box-shadow: var(--shadow); }
.lightbox .caption { color: #c9c4b6; font-size: 0.95rem; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.06); color: #e8e4da;
  border: 1px solid #2a3042; border-radius: 999px; width: 48px; height: 48px;
  font-size: 1.4rem; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { border-color: #d9b56c; }
.lightbox .close { top: 18px; right: 18px; }
.lightbox .prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 760px) {
  .lightbox .prev, .lightbox .next { top: auto; bottom: 18px; transform: none; }
}

/* ---------- Call to action ---------- */

.cta {
  text-align: center;
  background:
    radial-gradient(800px 300px at 50% 0%, var(--cta-glow), transparent 70%),
    var(--bg);
}
.cta .lede { margin: 0 auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Press kit ---------- */

.press-grid { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.factsheet {
  position: sticky; top: 92px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.factsheet dl { margin: 0; display: grid; gap: 14px; }
.factsheet dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.factsheet dd { margin: 2px 0 0; color: var(--text); }
.press-body h2 { font-size: 2rem; margin-top: 1.6em; }
.press-body h2:first-child { margin-top: 0; }
.press-body ul { color: var(--text-dim); padding-left: 1.1em; }
.press-body li { margin-bottom: 0.4em; }
@media (max-width: 900px) {
  .press-grid { grid-template-columns: 1fr; gap: 32px; }
  .factsheet { position: static; }
}

.page-head { padding: 110px 0 40px; }
.page-head + section { border-top: 0; padding-top: 24px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--text-faint); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--text-dim); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 72px 0; }
  .home-hero { padding: 84px 0 80px; }
  .game-hero { padding: 120px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ==========================================================================
   Place'm pages (<body class="placem">): a brighter, app-like look taken from the game -
   navy and blue from the app icon, the game's green, rounded type, softer corners,
   and the studio logo as a faint watermark. Light and dark like the rest of the site.
   ========================================================================== */

.placem {
  --bg: #0b1224;
  --bg-raised: #111b33;
  --bg-card: #142039;
  --line: #22325a;
  --text: #eef3ff;
  --text-dim: #a8b5d4;
  --text-faint: #7182a8;
  --gold: #5ee09a;          /* accent: eyebrows, links, icons */
  --gold-strong: #86ecb5;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --serif: "Outfit", "Inter", system-ui, sans-serif;

  --btn: #2fc774;
  --btn-hover: #44d987;
  --btn-ink: #ffffff;
  --tint: rgba(94, 224, 154, 0.12);
  --tint-border: rgba(94, 224, 154, 0.32);
  --tint-hover: rgba(94, 224, 154, 0.6);
  --ghost-bg: rgba(255, 255, 255, 0.04);

  --header-bg: rgba(11, 18, 36, 0.86);
  --media-bg: #070c19;
  --hero-glow-1: rgba(70, 130, 230, 0.22);
  --hero-glow-2: rgba(94, 224, 154, 0.10);
  --cta-glow: rgba(70, 130, 230, 0.22);
  --logo-ring: rgba(94, 224, 154, 0.2);

  --hero-fade: linear-gradient(180deg, rgba(11, 18, 36, 0.1) 0%, rgba(11, 18, 36, 0.25) 45%, rgba(11, 18, 36, 0.95) 88%, var(--bg) 100%);
  --hero-side: linear-gradient(90deg, rgba(11, 18, 36, 0.85) 0%, rgba(11, 18, 36, 0.4) 45%, rgba(11, 18, 36, 0) 70%);
  --hero-title-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --hero-lede: #c9d4ee;
  --fact-bg: rgba(11, 18, 36, 0.7);

  --watermark-opacity: 0.06;
}

/* Keep the two light blocks the same. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .placem {
    --bg: #eef3fb;
    --bg-raised: #f6f9fe;
    --bg-card: #ffffff;
    --line: #d5dfef;
    --text: #0f1b33;
    --text-dim: #4a5a7b;
    --text-faint: #7686a5;
    --gold: #128a4c;
    --gold-strong: #0b6e3b;
    --shadow: 0 16px 40px rgba(30, 60, 120, 0.14);

    --btn: #1fae62;
    --btn-hover: #179a55;
    --btn-ink: #ffffff;
    --tint: rgba(31, 174, 98, 0.10);
    --tint-border: rgba(31, 174, 98, 0.3);
    --tint-hover: rgba(31, 174, 98, 0.55);
    --ghost-bg: rgba(255, 255, 255, 0.8);

    --header-bg: rgba(238, 243, 251, 0.88);
    --media-bg: #0b1224;
    --hero-glow-1: rgba(70, 130, 230, 0.20);
    --hero-glow-2: rgba(31, 174, 98, 0.10);
    --cta-glow: rgba(70, 130, 230, 0.18);
    --logo-ring: rgba(31, 174, 98, 0.2);

    --hero-fade: linear-gradient(180deg, rgba(238, 243, 251, 0.05) 0%, rgba(238, 243, 251, 0.2) 45%, rgba(238, 243, 251, 0.95) 88%, var(--bg) 100%);
    --hero-side: linear-gradient(90deg, rgba(238, 243, 251, 0.94) 0%, rgba(238, 243, 251, 0.75) 40%, rgba(238, 243, 251, 0) 70%);
    --hero-title-shadow: 0 2px 24px rgba(255, 255, 255, 0.8);
    --hero-lede: #2c3a58;
    --fact-bg: rgba(255, 255, 255, 0.85);

    --watermark-opacity: 0.08;
  }
}
:root[data-theme="light"] .placem {
  --bg: #eef3fb;
  --bg-raised: #f6f9fe;
  --bg-card: #ffffff;
  --line: #d5dfef;
  --text: #0f1b33;
  --text-dim: #4a5a7b;
  --text-faint: #7686a5;
  --gold: #128a4c;
  --gold-strong: #0b6e3b;
  --shadow: 0 16px 40px rgba(30, 60, 120, 0.14);

  --btn: #1fae62;
  --btn-hover: #179a55;
  --btn-ink: #ffffff;
  --tint: rgba(31, 174, 98, 0.10);
  --tint-border: rgba(31, 174, 98, 0.3);
  --tint-hover: rgba(31, 174, 98, 0.55);
  --ghost-bg: rgba(255, 255, 255, 0.8);

  --header-bg: rgba(238, 243, 251, 0.88);
  --media-bg: #0b1224;
  --hero-glow-1: rgba(70, 130, 230, 0.20);
  --hero-glow-2: rgba(31, 174, 98, 0.10);
  --cta-glow: rgba(70, 130, 230, 0.18);
  --logo-ring: rgba(31, 174, 98, 0.2);

  --hero-fade: linear-gradient(180deg, rgba(238, 243, 251, 0.05) 0%, rgba(238, 243, 251, 0.2) 45%, rgba(238, 243, 251, 0.95) 88%, var(--bg) 100%);
  --hero-side: linear-gradient(90deg, rgba(238, 243, 251, 0.94) 0%, rgba(238, 243, 251, 0.75) 40%, rgba(238, 243, 251, 0) 70%);
  --hero-title-shadow: 0 2px 24px rgba(255, 255, 255, 0.8);
  --hero-lede: #2c3a58;
  --fact-bg: rgba(255, 255, 255, 0.85);

  --watermark-opacity: 0.08;
}

/* Rounded, app-style type and shapes */
.placem h1, .placem h2, .placem h3 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; }
.placem .game-hero h1 { letter-spacing: -0.02em; }
.placem .game-hero .tagline { font-weight: 500; max-width: 26ch; }
.placem .btn { padding: 14px 26px; font-weight: 600; }
.placem .btn-primary { box-shadow: 0 6px 18px rgba(31, 174, 98, 0.35); }
.placem .gallery a { border-radius: 18px; }
.placem .feature .icon { border-radius: 14px; }
.placem .steps li::before { border-radius: 12px; font-family: var(--serif); }
.placem .factsheet { border-radius: var(--radius); }

/* The studio logo as a faint watermark behind the page (fixed, so it stays put while scrolling). */
.placem::before {
  content: "";
  position: fixed; z-index: -1; pointer-events: none;
  width: min(70vw, 620px); aspect-ratio: 1;
  right: max(-8vw, -120px); bottom: -10vh;
  background: url("../img/maggie-software-logo.png") center / contain no-repeat;
  opacity: var(--watermark-opacity);
  filter: grayscale(0.3);
}
.placem main, .placem .site-footer { position: relative; }
/* Let the watermark show through the plain sections; cards, hero and media keep their own backgrounds. */
.placem section:not(.game-hero) { background: transparent; }
.placem .cta { background: radial-gradient(800px 300px at 50% 0%, var(--cta-glow), transparent 70%); }
