/* gamesbymike.studio: the game's own colours - near-black stone, warm gold titles, bone-white text. */
:root {
  --bg: #0d0b09;
  --panel: #17130f;
  --panel-hi: #211a13;
  --text: #e9e1d4;
  --muted: #a89c8a;
  --gold: #c9a06a;
  --gold-hi: #e2bd84;
  --ember: #c4572a;
  --line: #3a3026;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.lb-open { overflow: hidden; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

.bar { padding: 20px 24px; }
.bar img { display: block; height: auto; width: 180px; }

main { padding: 0 16px; }

.home .bar { position: absolute; top: 0; left: 0; right: 0; z-index: 1; }
.home main { padding: 0; }

h1, h2, h3 { color: var(--gold); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; }

/* Every home section is centred on a common column, its heading under a short gold rule. */
.home main > section:not(.hero) { max-width: 1200px; margin: 0 auto; padding: 72px 16px 0; }
.home main > section > h2, .anywhere h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 32px;
}
.home main > section > h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* The title: the game's name, its tagline and the pitch over the menu's backdrop. */
.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 16px 56px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(196, 87, 42, 0.18), transparent 60%),
    linear-gradient(to bottom, rgba(13, 11, 9, 0.5), rgba(13, 11, 9, 0.78) 70%, var(--bg)),
    url("img/backdrop.jpg") center / cover no-repeat;
}
.hero .icon { width: 132px; height: auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.8)); }
.hero h1 {
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  margin: 12px 0 8px;
  letter-spacing: 0.12em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}
.hero .tagline { font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-style: italic; margin: 0 0 14px; }
.hero .pitch { max-width: 640px; color: var(--muted); margin: 0 0 28px; }

.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.badge {
  display: inline-block;
  text-decoration: none;
  margin: 0;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(13, 11, 9, 0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.watch {
  margin-top: 28px;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d06535, #9c3f1c);
  color: #fff4e6;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(196, 87, 42, 0.35);
}
.watch::before { content: "\25B6"; margin-right: 10px; font-size: 0.8em; }
.watch:hover { color: #fff; filter: brightness(1.1); }

video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #000;
}

/* The trailer is as wide as the window allows while it and its controls still fit the window's height. */
.home main > section.trailer { max-width: min(1132px, calc((100vh - 64px) * 16 / 9 + 32px)); padding-top: 24px; }
.trailer video { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 160, 106, 0.15); }

/* The Box's story, read like a book's opening. */
.lore p { max-width: 720px; margin: 0 auto 18px; font-size: 1.12rem; text-align: center; }
.lore p:first-of-type::first-letter { color: var(--gold); font-size: 1.6em; font-weight: 600; }

/* What the player does: one card each, three across on a PC, two on a tablet, one on a phone. */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  position: relative;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--panel-hi), var(--panel));
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--gold));
}
.card:hover { transform: translateY(-3px); border-color: rgba(201, 160, 106, 0.5); }
.card .number { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ember); font-weight: 700; }
.card h3 { font-size: 1.1rem; margin: 6px 0 10px; }
.card p { margin: 0; color: var(--muted); }

/* The screenshots: a mosaic whose first shot is twice the size, each opening full screen. */
.shots { display: grid; gap: 12px; grid-template-columns: 1fr; }
.shots a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 2868 / 1320;
}
.shots img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, filter 0.4s ease; }
.shots .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.shots a:hover img, .shots a:focus-visible img { transform: scale(1.05); filter: brightness(1.08); }
.shots a:hover .caption, .shots a:focus-visible .caption { opacity: 1; transform: none; }
@media (hover: none) { .shots .caption { opacity: 1; transform: none; } }
@media (min-width: 700px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shots a:first-child { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .shots { grid-template-columns: repeat(3, 1fr); }
  .shots a:first-child { grid-row: span 2; aspect-ratio: auto; }
}

/* A screenshot opened full screen over a dark backdrop. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 64px;
  background: rgba(5, 4, 3, 0.94);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; text-align: center; }
.lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { margin-top: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; }
.lightbox button {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 48px;
  height: 48px;
  background: rgba(23, 19, 15, 0.9);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover { border-color: var(--gold); color: var(--text); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox { padding: 64px 8px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* The iPhone preview beside where the game plays. */
.anywhere { display: grid; gap: 28px; align-items: center; }
.anywhere h2 { text-align: left; margin-bottom: 14px; }
.anywhere p { color: var(--muted); margin: 0; }
@media (min-width: 900px) {
  .anywhere { grid-template-columns: 1.4fr 1fr; gap: 40px; }
}

/* The numbers. */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: center; }
.fact { padding: 22px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact .value { display: block; font-size: 2.8rem; font-weight: 700; line-height: 1; color: var(--gold); }
.fact .label { display: block; margin-top: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }

.closing { text-align: center; }
.closing p { max-width: 620px; margin: 0 auto 24px; font-size: 1.1rem; }

.doc { max-width: 720px; margin: 0 auto; padding: 40px 0 24px; }
.doc h1 { font-size: 1.9rem; margin: 0 0 24px; }
.doc h2 { font-size: 1.15rem; margin: 36px 0 8px; }
.doc h3 { font-size: 1.05rem; margin: 32px 0 8px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 24px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-bottom: 8px; }
footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .shots img, .shots .caption { transition: none; }
}
