/* Minor Planet Games — studio site.
   Studio frame: capsule/studio_palettes/«Minor Planet — База» in the game repo.
   Game block: the game's own palette («Par Under Review (ар-деко)»).
   No hairlines: areas are separated by space and by fills, not by 1px rules. */

@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  /* studio */
  --bg: #111318;
  --bg-raised: #191c23;
  --marble: #aba69c;
  --marble-dim: #8f8a80;
  --ivory: #f7f4ed;
  --sphere: #f4f8ff;
  --tint: rgba(247, 244, 237, 0.08);
  /* game */
  --pur-bg: #0e1b2e;
  --pur-raised: #14253d;
  --pur-cream: #fff6e0;
  --pur-text: #d9d3c4;

  --display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--marble);
  font: 400 1.1875rem/1.6 var(--body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ivory); text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgba(247, 244, 237, 0.35); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .button:focus-visible, .shots a:focus-visible { outline: 2px solid var(--sphere); outline-offset: 3px; }
::selection { background: var(--sphere); color: var(--bg); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--ivory); color: var(--bg); padding: 6px 12px; z-index: 10; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ivory); letter-spacing: 0.01em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.eyebrow, .mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--marble-dim);
}
.lead { font-size: clamp(1.25rem, 2.1vw, 1.45rem); line-height: 1.5; }
.note { color: var(--marble-dim); font-size: 1rem; }

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.02em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg-raised); }
.nav { display: flex; gap: clamp(14px, 3vw, 28px); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a { color: var(--marble); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }

/* Studio intro: text left, the figure right, standing on the bottom edge of the block */
.intro { overflow: clip; }
.intro .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: clamp(24px, 4vw, 48px); align-items: end; }
.intro-text { align-self: center; padding: clamp(24px, 5vw, 64px) 0; }
.intro h1 { margin-bottom: 16px; }
.intro .lead { margin: 0; }
/* the figure fills only the middle of its square (columns 242–787 of 1024): pull the square right
   so the figure, not the empty canvas, lines up with the right edge of the content */
.intro-mark { align-self: end; margin-right: -23%; }
.intro-mark img { width: 100%; aspect-ratio: 1; }
@media (prefers-reduced-motion: no-preference) {
  .intro-mark img { animation: arrive 1.4s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(2%); } to { opacity: 1; transform: none; } }
}

/* Game block */
.game { background: var(--pur-bg); color: var(--pur-text); }
.game a:not(.button) { color: var(--pur-cream); }
.game-hero {
  text-align: center;
  padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 64px);
  background:
    linear-gradient(to bottom, rgba(14, 27, 46, 0) 55%, var(--pur-bg)),
    url("../img/par-under-review/hero-2560.webp") center bottom / cover no-repeat,
    var(--pur-bg);
}
.game-logo { margin: 0 auto; width: min(100%, 620px); }
.game-logo img { width: 100%; }
.game-meta {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pur-cream); opacity: 0.75; margin: 20px 0 14px;
}
.game-pitch { max-width: 34em; margin: 0 auto 28px; font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; color: var(--pur-cream); }
.game-media { padding-bottom: clamp(56px, 8vw, 96px); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.shots a { display: block; background: var(--pur-raised); overflow: hidden; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease, opacity .2s; }
.shots a:hover img { transform: scale(1.03); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; min-height: 46px;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--ivory); background: var(--tint);
  transition: background-color .2s, color .2s;
}
.button:hover { background: rgba(247, 244, 237, 0.16); }
.button--primary { background: var(--ivory); color: var(--bg); }
.button--primary:hover { background: var(--sphere); }
.game .button { color: var(--pur-cream); background: rgba(255, 246, 224, 0.12); }
.game .button:hover { background: rgba(255, 246, 224, 0.2); }
.game .button--primary { background: var(--pur-cream); color: var(--pur-bg); }
.game .button--primary:hover { background: #fffbef; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-title { margin-bottom: clamp(20px, 3vw, 32px); }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
.contact h3 { margin-bottom: 6px; }
.contact p { margin: 0; overflow-wrap: anywhere; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* Footer */
.site-footer { padding: 24px 0 48px; color: var(--marble-dim); font-size: 1rem; }

/* Screenshot viewer */
.viewer { padding: 0; border: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; background: rgba(8, 10, 14, 0.94); color: var(--ivory); }
.viewer::backdrop { background: transparent; }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-width: min(94vw, 1920px); max-height: 86dvh; width: auto; height: auto; }
.viewer button {
  position: absolute; border: 0; background: var(--tint); color: var(--ivory);
  font: 400 1.5rem/1 var(--body); width: 48px; height: 48px; cursor: pointer;
}
.viewer button:hover { background: rgba(247, 244, 237, 0.18); }
.viewer .v-close { top: 16px; right: 16px; }
.viewer .v-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.viewer .v-next { right: 16px; top: 50%; transform: translateY(-50%); }
.viewer .v-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--marble); }

/* Press kit */
.press-head { padding: clamp(16px, 4vw, 40px) 0 clamp(40px, 6vw, 72px); }
.press-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.press-head h1 { margin: 12px 0 18px; }
.press-logo { background: radial-gradient(closest-side, rgba(14, 27, 46, 0.9), transparent); }
.press-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.factsheet { position: sticky; top: 24px; padding: 24px; background: var(--bg-raised); }
.factsheet h2 { font-size: 1.3rem; margin-bottom: 6px; }
.factsheet dl { margin: 0; }
.factsheet dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--marble-dim); margin-top: 16px; }
.factsheet dd { margin: 2px 0 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.factsheet .button { width: 100%; margin-top: 24px; }
.press-main > section { margin-bottom: clamp(56px, 7vw, 88px); }
.press-main > section:last-child { margin-bottom: 0; }
.press-main h2 { margin-bottom: 20px; }
.press-main h3 { font-size: 0.85rem; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivory); margin: 32px 0 8px; }
.prose { max-width: 38em; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--ivory); font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid a { display: block; background: var(--bg-raised); overflow: hidden; }
.grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.grid a:hover img { transform: scale(1.03); }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.files li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; background: var(--bg-raised); }
.files .mono { white-space: nowrap; }

/* Narrow screens */
@media (max-width: 860px) {
  .intro .wrap { grid-template-columns: 1fr; gap: 0; }
  .intro-text { padding: 8px 0 24px; }
  .intro-mark { width: min(300px, 80%); margin: 0 auto; }
  .press-head .wrap { grid-template-columns: 1fr; }
  .press-layout { grid-template-columns: 1fr; }
  .factsheet { position: static; }
  .contact { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  body { font-size: 1.125rem; }
  .brand span { display: none; }
  .grid { grid-template-columns: 1fr; }
  .files li { flex-direction: column; gap: 2px; }
  .game .actions .button { flex: 1 1 100%; }
  .viewer .v-prev, .viewer .v-next { top: auto; bottom: 8px; transform: none; }
}
