/* meteam.me - the studio's page. Tokens first, both themes, then the few components. */
:root {
  --bg: #f3ead8;
  --surface: #fbf5e8;
  --surface-2: #ede2cb;
  --ink: #2b2217;
  --muted: #6b5e4d;
  --accent: #8a5a1c;
  --accent-ink: #fbf5e8;
  --gold: #b8922e;
  --line: #d9ccb2;
  --danger: #a33a2c;
  --ok: #3e7a3a;
  --display: "VT323", "Courier New", monospace;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 62ch;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130e;
    --surface: #221b13;
    --surface-2: #2c2419;
    --ink: #ebe1cc;
    --muted: #a89b85;
    --accent: #d9bf73;
    --accent-ink: #1f1a14;
    --gold: #d9bf73;
    --line: #3a2f22;
    --danger: #e0685c;
    --ok: #8fce6b;
  }
}

:root[data-theme="dark"] {
  --bg: #17130e;
  --surface: #221b13;
  --surface-2: #2c2419;
  --ink: #ebe1cc;
  --muted: #a89b85;
  --accent: #d9bf73;
  --accent-ink: #1f1a14;
  --gold: #d9bf73;
  --line: #3a2f22;
  --danger: #e0685c;
  --ok: #8fce6b;
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.55;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }

/* The bar */
.bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.mark { font-family: var(--display); font-size: 2rem; letter-spacing: 0.02em; text-decoration: none; color: var(--ink); }
.mark span { color: var(--gold); }
.bar nav { display: flex; gap: 1rem; margin-left: auto; flex-wrap: wrap; }
.bar nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.bar nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--gold); }
.lang { display: flex; gap: 0.4rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.lang button { background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); padding: 0.2rem 0.5rem; font: inherit; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--ink); border-color: var(--gold); }

/* The hero: a thesis, not a billboard */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 { font-family: var(--display); font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; margin: 0 0 1rem; text-wrap: balance; font-weight: 400; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { max-width: var(--measure); color: var(--muted); font-size: 1.15rem; margin: 0; }

/* Sections and type */
section { padding: 2rem 0; }
h2 { font-family: var(--display); font-size: 2.2rem; font-weight: 400; margin: 0 0 1rem; text-wrap: balance; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { max-width: var(--measure); }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }

/* The game card: one object, repeated if more games come */
.game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
@media (min-width: 720px) { .game { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.game h3 { font-family: var(--display); font-size: 2rem; font-weight: 400; margin: 0; }
.game .facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 1rem 0 0; font-size: 0.95rem; }
.game .facts dt { color: var(--muted); }
.game .facts dd { margin: 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.shots img, .shots .ph { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); display: block; }
.shots .ph { display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; text-align: center; padding: 0.5rem; }
.shots img { cursor: zoom-in; }
.shots img:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The enlarged screenshot: a dimmed sheet over the page, the picture centred at its own 9:16,
   closed by a click anywhere (lightbox.js). */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 4vh 4vw; background: rgba(20, 15, 10, 0.78); cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); image-rendering: pixelated; }
body.lightbox-open { overflow: hidden; }

/* Buttons and links as actions */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.btn { display: inline-block; padding: 0.6rem 1rem; border-radius: var(--radius); border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; background: transparent; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
/* The platform marks beside a social link's label (inline SVG, Simple Icons): the text's own
   colour and size, so they sit in a button, in the footer and in dark mode alike. */
.ico { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; margin-right: 0.45em; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* Forms (the account page) */
form.panel, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; max-width: 30rem; }
label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.8rem; }
input { font: inherit; padding: 0.6rem 0.7rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.notice { margin: 0.6rem 0 0; font-size: 0.95rem; }
.notice.error { color: var(--danger); }
.notice.ok { color: var(--ok); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.chars { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; }
.chars li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.3rem 0; }
.chars li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--accent); }
.pill { display: inline-block; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { border-color: var(--ok); color: var(--ok); }
.pill.warn { border-color: var(--gold); color: var(--gold); }

footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer a { color: var(--muted); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 120ms ease; }
  .btn:active { transform: translateY(1px); }
}
