/* Mythos Interactive studio site. Dark only; the brand colors come from tools/build_brand.py. */

@font-face {
  font-family: "Kenney Future";
  src: url("/assets/fonts/kenney-future.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #14121a;
  --ink-2: #1d1a25;
  --ink-3: #2a2634;
  --paper: #f6f0e4;
  --muted: #b9b1a4;
  --ember: #ff6a3d;
  --gold: #ffc54a;
  --coral: #ff9a85;
  --line: rgba(246, 240, 228, 0.12);
  --display: "Kenney Future", "Trebuchet MS", sans-serif;
  --text: "Nunito", system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.0625rem/1.6 var(--text);
  /* A faint pixel grid, like graph paper for sprites. */
  background-image: radial-gradient(rgba(246, 240, 228, 0.07) 1px, transparent 1.5px);
  background-size: 24px 24px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: 0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 10px;
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
  background: rgba(20, 18, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-mark { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.06em; }
.top nav { display: flex; gap: clamp(12px, 2.5vw, 28px); }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 12px 0; }
.top nav a:hover { color: var(--paper); }
.top nav a { white-space: nowrap; }
@media (max-width: 640px) {
  .top-mark span { display: none; }
  .top nav a { font-size: 0.9rem; }
}
@media (max-width: 480px) {
  .top { gap: 10px; }
  .top nav { gap: 11px; }
  .top nav a { font-size: 0.8rem; }
}

/* Sections */
main > section { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter); }

/* Buttons: raised pixel blocks with a hard ember shadow, like the logo. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 20px;
  font: 400 0.95rem var(--display); letter-spacing: 0.06em;
  color: var(--paper); text-decoration: none;
  background: var(--ink-2);
  border: 2px solid var(--paper);
  box-shadow: 4px 4px 0 var(--ink-3);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { color: var(--paper); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink-3); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink-3); }
.btn-primary { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ember); }
.btn-primary:hover { color: var(--ink); box-shadow: 5px 5px 0 var(--ember); }
.btn-primary:active { box-shadow: 1px 1px 0 var(--ember); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transition: none; transform: none; } }

/* Hero */
.hero { text-align: center; padding-top: clamp(56px, 10vw, 120px) !important; }
.hero h1 { display: flex; justify-content: center; }
.hero-logo { width: min(560px, 100%); image-rendering: pixelated; }
.lede { max-width: 38rem; margin: 28px auto 0; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.stats {
  list-style: none; padding: 0; margin: 56px auto 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--line);
}
.stats li { padding: 18px 12px; display: grid; gap: 2px; }
.stats li + li { border-left: 2px solid var(--line); }
.stats b { font: 400 clamp(1.6rem, 4vw, 2.2rem) var(--display); color: var(--gold); }
.stats span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 2px solid var(--line); }
}

/* Trailer */
.trailer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.trailer-copy h2 { margin-bottom: 14px; }
.trailer-copy p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .trailer { grid-template-columns: 1fr; } }

.trailer-frame { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--paper); box-shadow: 8px 8px 0 var(--ember); background: #000; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-play { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; color: var(--ink); overflow: hidden; }
.collage { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); opacity: 0.55; transition: opacity 0.2s; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.trailer-play:hover .collage, .trailer-play:focus-visible .collage { opacity: 0.75; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; display: grid; place-items: center;
  background: var(--gold); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ember);
}
.play-note { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: var(--paper); font-size: 0.85rem; text-shadow: 0 1px 3px #000; }

/* Games */
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p:last-child { color: var(--muted); margin: 0; }

.game-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.game {
  display: flex; flex-direction: column;
  background: var(--ink-2);
  border: 2px solid var(--line);
  transition: border-color 0.15s, transform 0.15s;
}
.game:hover { border-color: var(--paper); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .game, .game:hover { transition: none; transform: none; } }
.game > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid var(--line); }
.game-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.game-meta { margin: 0 0 6px; font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.jam { color: var(--gold); }
.game h3 { margin-bottom: 10px; }
.game-body > p:not(.game-meta) { margin: 0 0 16px; color: #ddd5c8; font-size: 0.98rem; }
.game-link { margin-top: auto; font-weight: 800; color: var(--paper); text-decoration: none; align-self: flex-start; padding: 6px 0; border-bottom: 2px solid var(--ember); }
.game-link:hover { color: var(--gold); border-color: var(--gold); }
/* The whole card is clickable through its link. */
.game { position: relative; }
.game-link::after { content: ""; position: absolute; inset: 0; }

.games-more { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Mythos Minis: the label's Cream, with Pip's egg spots. */
.minis {
  max-width: none !important;
  margin: 0 !important;
  /* Pip's egg spots, the same tile as the Mythos Minis site. */
  background: #fff8ec url("/assets/minis/egg-spots.svg") repeat;
  color: #2b2350;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  padding-left: max(var(--gutter), (100% - var(--wrap)) / 2 + var(--gutter)) !important;
  padding-right: max(var(--gutter), (100% - var(--wrap)) / 2 + var(--gutter)) !important;
}
.minis .eyebrow { color: #e0573f; }
.minis h2 img { width: min(320px, 100%); }
.minis-tag { font: 400 1.2rem var(--display); margin: 14px 0 12px; color: #2b2350; }
.minis-copy > p:not(.eyebrow):not(.minis-tag) { color: #4a4268; margin: 0 0 24px; }
.btn-minis { background: #ff9a85; color: #2b2350; border-color: #2b2350; box-shadow: 4px 4px 0 #2b2350; border-radius: 14px; font-family: var(--text); font-weight: 800; font-size: 1rem; letter-spacing: 0; }
.btn-minis:hover { color: #2b2350; box-shadow: 5px 5px 0 #2b2350; }
.btn-minis:active { box-shadow: 1px 1px 0 #2b2350; }
.minis-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.minis-grid a { display: grid; justify-items: center; gap: 8px; text-align: center; text-decoration: none; color: #2b2350; font-weight: 800; font-size: 0.92rem; padding: 10px 4px; border-radius: 18px; }
.minis-grid a:hover { background: rgba(255, 154, 133, 0.18); color: #2b2350; }
.minis-grid a:focus-visible { outline-color: #2b2350; }
.minis-grid img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 4px 0 rgba(43, 35, 80, 0.18); }
@media (max-width: 820px) { .minis { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .minis-grid img { width: 76px; height: 76px; border-radius: 20px; } }

/* About */
.about h2 { margin-bottom: 20px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; color: #ddd5c8; }
.about-cols p { margin: 0; }
@media (max-width: 720px) { .about-cols { grid-template-columns: 1fr; } }
.link-cards { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.link-cards a { display: grid; gap: 4px; padding: 18px 20px; border: 2px solid var(--line); text-decoration: none; color: var(--paper); background: var(--ink-2); }
.link-cards a:hover { border-color: var(--gold); }
.link-cards b { font-family: var(--display); font-weight: 400; color: var(--gold); }
.link-cards span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .link-cards { grid-template-columns: 1fr; } }

/* Contact */
.contact { text-align: center; border-top: 2px solid var(--line); }
.contact h2 { margin-bottom: 12px; }
.contact p { color: var(--muted); margin: 0; }
.contact a { font-weight: 800; overflow-wrap: anywhere; }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 40px;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0; flex: 1; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--paper); }

/* 404 */
.lost { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 18px; }
.lost h1 { font-size: clamp(2rem, 6vw, 3rem); }
.lost p { color: var(--muted); margin: 0; }
