/* ===========================================================
   Alloy Studios - shared site shell
   Every page (home, search, and each game) loads this file.
   Change it here and the whole portal changes at once.

   Look: polished alloy under warm light. Chrome silver comes from the logo;
   the warmth comes from copper-amber glows and a warm graphite base, so the
   metal reads as crafted rather than industrial.
   =========================================================== */

:root {
  --bg:            #121110;
  --bg-elev:       #1a1816;
  --bg-elev-2:     #24211e;
  --line:          #322e2a;
  --line-soft:     #262320;
  --text:          #f2ede7;
  --text-dim:      #aba298;
  --text-faint:    #776e65;

  --accent:        #e8a25c;              /* copper-amber: heated alloy */
  --accent-rgb:    232, 162, 92;
  --accent-2:      #f3c78e;              /* light brass, for links */

  /* Polished chrome, banded like the logo: bright sky, dark horizon, bright floor */
  --chrome: linear-gradient(180deg, #fffefc 0%, #e6e2dc 38%, #8e8983 52%, #d3cec7 66%, #f7f5f1 100%);
  --chrome-soft: linear-gradient(180deg, #ffffff 0%, #d9d4ce 62%, #a39d96 100%);
  --chrome-btn: linear-gradient(180deg, #fbf9f6 0%, #dfdbd5 46%, #c1bcb5 54%, #ebe8e3 100%);
  --panel: linear-gradient(180deg, #211e1b 0%, #191715 100%);
  --hairline: linear-gradient(90deg, transparent, rgba(255,255,255,.28) 30%, rgba(var(--accent-rgb),.55) 50%, rgba(255,255,255,.28) 70%, transparent);
  /* Brushed-metal grain, drawn by the browser: no image to download */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --header-h:      62px;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 18px 44px -18px rgba(0,0,0,.85);
  --ease:          cubic-bezier(.2, .7, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", var(--font);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background:
    radial-gradient(1100px 520px at 50% -220px, rgba(var(--accent-rgb), .09), transparent 70%),
    var(--bg);
  background-color: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* Faint brushed grain over the whole page, behind the content */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); opacity: .3;
}

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .8); outline-offset: 2px; }

/* Chrome lettering, with a highlight that can sweep across it */
.chrome-text {
  background-image:
    linear-gradient(105deg, transparent 40%, rgba(255,255,255,.95) 50%, transparent 60%),
    var(--chrome);
  background-size: 250% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 150% 0, 0 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Header (identical on every page) ---------- */

.site-header {
  height: var(--header-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background:
    var(--grain),
    linear-gradient(180deg, rgba(36, 33, 30, .94), rgba(22, 20, 18, .92));
  background-size: 320px 320px, auto;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.9);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--hairline); opacity: .7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand img {
  width: 42px; height: auto; display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
  transition: transform .5s var(--ease), filter .3s;
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.05);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(var(--accent-rgb), .45));
}
.brand span {
  white-space: nowrap;
  font-family: var(--display); font-size: 15px; font-weight: 500;
  letter-spacing: -.01em; color: var(--text-dim);
}
.brand b {
  font-weight: 700;
  background: var(--chrome-soft);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.search-wrap {
  position: relative;
  flex: 1 1 auto;
  max-width: 460px;
}
.search-wrap > svg {
  position: absolute; left: 13px; top: 19px;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--text-faint); fill: none; stroke-width: 2;
  pointer-events: none;
}
.search {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f0e0d;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus {
  border-color: rgba(var(--accent-rgb), .7);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.7), 0 0 0 3px rgba(var(--accent-rgb), .16);
}
.search::placeholder { color: var(--text-faint); }
.kbd-hint {
  position: absolute; right: 10px; top: 19px;
  transform: translateY(-50%);
  font-size: 11px; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
  transition: opacity .15s;
}
.search:focus ~ .kbd-hint { opacity: 0; }

.header-spacer { flex: 1 1 auto; }

.header-link {
  position: relative;
  font-size: 14px; color: var(--text-dim); font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.header-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.header-nav { display: flex; gap: 2px; flex: 0 0 auto; }
.header-link.on { color: var(--text); }
.header-link.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .7);
}

/* live search dropdown */
.suggest {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
  z-index: 60;
}
.suggest:empty { display: none; }
.suggest a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.active { background: rgba(var(--accent-rgb), .09); }
.suggest .sq {
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #fff;
  flex: 0 0 auto;
}
.suggest .st { color: var(--text-faint); font-size: 12px; margin-left: auto; }

/* ---------- Layout ---------- */

main { flex: 1 1 auto; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; width: 100%; }

.section-head {
  display: flex; align-items: center; gap: 12px;
  margin: 46px 0 18px;
}
.section-head h2 {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display);
  font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 0;
}
/* a small chrome rivet, lit warm */
.section-head h2::before {
  content: ""; width: 9px; height: 9px; flex: 0 0 auto;
  border-radius: 2px; transform: rotate(45deg);
  background: linear-gradient(135deg, #ffffff, #9c9791 60%, #5d5953);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .55);
}
.section-head .count { color: var(--text-faint); font-size: 13px; }
.section-head .see-all {
  margin-left: auto; font-size: 13.5px; color: var(--text-dim);
  padding: 5px 12px; border-radius: 999px; transition: color .2s, background .2s, border-color .2s;
}
.section-head .see-all:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* ---------- Front page: masthead ---------- */

.masthead {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(620px 340px at 50% 30%, rgba(var(--accent-rgb), .15), transparent 70%),
    radial-gradient(1000px 460px at 50% -10%, rgba(255,255,255,.05), transparent 70%);
}
.masthead::before {                       /* brushed grain, a touch stronger here */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); opacity: .55;
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--hairline);
}
.masthead-inner { position: relative; padding: 56px 18px 60px; text-align: center; }

.masthead .mark {
  position: relative;
  width: 210px; margin: 0 auto 26px;
}
.masthead .mark img {
  position: relative; display: block; width: 100%; height: auto;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.65));
}
.masthead .mark::before {                 /* warm light the chrome sits in */
  content: ""; position: absolute; inset: -18% -22%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .30), rgba(var(--accent-rgb), .08) 55%, transparent 75%);
  pointer-events: none;
}
.masthead .mark .sheen {                  /* highlight that sweeps over the logo only */
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/assets/brand/logo.webp) center / contain no-repeat;
          mask: url(/assets/brand/logo.webp) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255,250,240,.55) 50%, transparent 62%);
  background-size: 300% 100%;
  background-position: 150% 0;
  mix-blend-mode: screen;
}

.masthead h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 52px; line-height: 1.05; letter-spacing: -.02em; font-weight: 700;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,.55));
}
.masthead .lede {
  margin: 0 auto 18px; font-size: 19px; color: var(--text);
  font-weight: 500; letter-spacing: -.01em; max-width: 34ch;
}
.masthead .intro {
  margin: 0 auto; font-size: 15px; line-height: 1.7;
  color: var(--text-dim); max-width: 62ch;
}
.cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.cta .btn { align-self: auto; }

/* ---------- Front page: about the studio ---------- */

.prose p {
  margin: 0 0 15px; color: var(--text-dim);
  font-size: 15px; line-height: 1.75; max-width: 68ch;
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- Front page: spotlight ---------- */

.spotlight .hero { margin-top: 0; }
.spotlight .hero h2 {
  margin: 0 0 10px; font-family: var(--display);
  font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
}

/* ---------- Front page: roadmap timeline ---------- */

.timeline {
  list-style: none; margin: 0; padding: 0 0 0 30px;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute;
  left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), rgba(255,255,255,.45) 55%, transparent);
  border-radius: 2px;
}
.timeline li { position: relative; padding: 0 0 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {                    /* chrome bead */
  content: ""; position: absolute;
  left: -30px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #c4bfb8 40%, #5f5a54 100%);
  box-shadow: 0 0 0 3px var(--bg), 0 0 14px rgba(var(--accent-rgb), .5);
}
.timeline li.wip::before {
  background: radial-gradient(circle at 35% 30%, #fff3e0, var(--accent) 45%, #7a4a1c 100%);
}
.timeline .status {
  display: inline-block; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .3); border-radius: 999px;
  padding: 3px 10px; background: rgba(var(--accent-rgb), .07);
}
.timeline li.done .status { color: var(--text-dim); border-color: var(--line); background: rgba(255,255,255,.03); }
.timeline h3 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.02em; }
.timeline p {
  margin: 0; color: var(--text-dim);
  font-size: 14.5px; line-height: 1.65; max-width: 64ch;
}

/* ---------- Shown when another site frames this page ---------- */

.framed {
  min-height: 100dvh; display: grid; place-items: center;
  padding: 24px; text-align: center;
}
.framed h1 { margin: 0 0 10px; font-family: var(--display); font-size: 22px; letter-spacing: -.01em; }
.framed p { margin: 0 auto 24px; max-width: 46ch; color: var(--text-dim); line-height: 1.6; }
.framed .btn { align-self: auto; }

/* ---------- Alloy account ---------- */

.acct { position: relative; flex: 0 0 auto; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 15px; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), .55);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .20), rgba(var(--accent-rgb), .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
  transition: background .2s, box-shadow .2s;
}
.acct-btn:hover {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .30), rgba(var(--accent-rgb), .14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 18px -4px rgba(var(--accent-rgb), .5);
}
.acct-me { border-color: var(--line); background: var(--panel); }
.acct-me:hover { background: var(--panel); border-color: rgba(var(--accent-rgb), .45); box-shadow: none; }
.acct-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .8); flex: 0 0 auto; }
.acct-wait { width: 84px; border-color: var(--line); background: var(--bg-elev-2); animation: acctPulse 1.2s ease-in-out infinite; }
@keyframes acctPulse { 50% { opacity: .45; } }

.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  min-width: 230px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
}
.acct-who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.acct-who b { display: block; font-size: 14px; }
.acct-who span { display: block; font-size: 12px; color: var(--text-faint); margin-top: 3px; word-break: break-all; }
.acct-who .acct-warn { color: #f0906d; }
.acct-menu button {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text-dim); font: inherit; font-size: 13.5px; cursor: pointer;
}
.acct-menu button:hover { background: rgba(255,255,255,.05); color: var(--text); }

.sheet-card.acct-card { width: min(420px, 100%); }
.acct-body { padding: 18px 22px 22px; display: flex; flex-direction: column; }
.acct-body form { display: flex; flex-direction: column; }
.acct-body label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px;
}
.acct-body input {
  height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #0f0e0d; color: var(--text);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
  font: inherit; font-size: 14.5px; outline: none;
}
.acct-body input:focus { border-color: rgba(var(--accent-rgb), .7); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 0 0 3px rgba(var(--accent-rgb), .16); }
.acct-hint { margin: -6px 0 12px; font-size: 12px; color: var(--text-faint); }
.acct-note { margin: 0 0 14px; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.acct-err { margin: 0 0 10px; min-height: 1em; font-size: 13px; color: #f0906d; }
.acct-err.ok { color: var(--accent-2); }
.acct-err:empty { display: none; }
.acct-body .btn.acct-go { align-self: stretch; width: 100%; justify-content: center; margin-top: 2px; }
.acct-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 42px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: #1f1f1f; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.acct-google svg { width: 18px; height: 18px; }
.acct-google:hover { filter: brightness(.96); }
.acct-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-faint); font-size: 12px; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct-link {
  margin-top: 12px; border: 0; background: none; padding: 0;
  color: var(--accent-2); font: inherit; font-size: 13px; cursor: pointer; align-self: center;
}
.acct-link:hover { text-decoration: underline; }
.acct-legal { margin: 18px 0 0; font-size: 11px; line-height: 1.5; color: var(--text-faint); text-align: center; }
.acct-legal a { color: var(--text-dim); text-decoration: underline; }
.acct-body button:disabled, .acct-body input:disabled { opacity: .6; cursor: default; }
/* The reCAPTCHA badge is replaced by the attribution text in the sign-in window,
   which is what Google's terms allow. */
.grecaptcha-badge { visibility: hidden; }

@media (max-width: 620px) {
  .acct-btn { height: 32px; padding: 0 11px; font-size: 12.5px; max-width: 120px; }
}

/* ---------- Update log dialog ---------- */

button.see-all {
  font: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
button.see-all:hover { border-color: rgba(var(--accent-rgb), .45); }

.sheet {
  position: fixed; inset: 0; z-index: 100;
  display: none; place-items: center;
  background: rgba(8, 7, 6, .74);
  backdrop-filter: blur(5px);
  padding: 24px 18px;
}
.sheet.on { display: grid; animation: fadeIn .2s ease both; }
.sheet.on .sheet-card { animation: rise .35s var(--ease) both; }
.sheet-card {
  width: min(860px, 100%); max-height: 86dvh;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.sheet-card header {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  flex: 0 0 auto;
}
.sheet-card header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--hairline); opacity: .6;
}
.sheet-card header h2 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; flex: 1 1 auto; }
.sheet-body { overflow-y: auto; padding: 4px 26px 26px; }

.log-entry { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.log-entry:last-child { border-bottom: 0; padding-bottom: 4px; }
.log-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.log-head h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.log-date { color: var(--text-faint); font-size: 12.5px; margin-left: auto; }
.log-summary { margin: 7px 0 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }
.log-entry h4 {
  margin: 18px 0 7px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.log-entry ul { margin: 0; padding-left: 18px; }
.log-entry li {
  color: var(--text-dim); font-size: 14px; line-height: 1.65; margin-bottom: 6px;
}
.log-entry li::marker { color: var(--text-faint); }

@media (max-width: 620px) {
  .sheet { padding: 0; }
  .sheet-card { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .sheet-body { padding: 4px 18px 24px; }
}

/* ---------- Contact ---------- */

.contact-body {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(var(--accent-rgb), .12), transparent 70%),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  padding: 34px 32px; text-align: center;
}
.contact-body p {
  margin: 0 auto 22px; color: var(--text-dim);
  font-size: 15px; line-height: 1.65; max-width: 52ch;
}
.contact-body .btn { align-self: center; }
.contact-body .addr {
  margin: 16px auto 0; font-size: 13.5px; color: var(--text-faint);
}

@media (max-width: 860px) {
  .masthead h1 { font-size: 34px; }
  .masthead .lede { font-size: 17px; }
  .masthead-inner { padding: 42px 18px 46px; }
  .masthead .mark { width: 160px; margin-bottom: 22px; }
}

/* Page heading on /all/ */
.page-head { padding: 38px 0 4px; }
.page-head h1 {
  margin: 0 0 8px; font-family: var(--display);
  font-size: 30px; font-weight: 700; letter-spacing: -.02em;
}
.page-head p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ---------- News ---------- */

.news { margin-top: 50px; }
.post {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.post:last-child { border-bottom: 1px solid var(--line-soft); }
.post time {
  color: var(--text-faint); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .05em;
  padding-top: 3px;
}
.post h3 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.01em; }
.post p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.6; max-width: 68ch; }
.post-link {
  display: inline-block; margin-top: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-2);
}
.post-link:hover { text-decoration: underline; }
.btn.news-more { margin: 22px auto 0; display: flex; width: fit-content; }
.news-older:not([hidden]) { animation: fadeIn .4s ease both; }
.news-older .post:last-child { border-bottom: 1px solid var(--line-soft); }
.news > .post:nth-last-child(3) { border-bottom: 1px solid var(--line-soft); }

@media (max-width: 620px) {
  .post { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Game grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
/* a soft light that follows the cursor across the metal (position set by shell.js) */
.card::after, .hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 236, 214, .11), transparent 65%);
  opacity: 0; transition: opacity .3s;
}
.card:hover::after, .hero:hover::after { opacity: 1; }
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 20px 40px -20px rgba(0,0,0,.95), 0 12px 30px -16px rgba(var(--accent-rgb), .35);
}
.card .art {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.card .art img, .hero .art img { transition: transform .6s var(--ease); }
.card:hover .art img, .hero:hover .art img { transform: scale(1.045); }
.card .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .art .mono {
  font-size: 44px; font-weight: 900; color: #fff;
  letter-spacing: -.04em; text-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.card .meta { padding: 11px 13px 13px; }
.card .meta h3 {
  margin: 0 0 3px; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .meta p {
  margin: 0; font-size: 12.5px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Hero (featured game on home) ---------- */

.hero {
  position: relative;
  margin-top: 26px;
  border-radius: 20px;
  border: 1px solid transparent;
  background:
    var(--panel) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.06) 40%, rgba(var(--accent-rgb), .5)) border-box;
  box-shadow: 0 24px 50px -30px rgba(0,0,0,.95);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 260px;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.hero:hover { transform: translateY(-3px); box-shadow: 0 28px 56px -30px rgba(0,0,0,.95), 0 16px 40px -24px rgba(var(--accent-rgb), .4); }
.hero .art { position: relative; display: grid; place-items: center; overflow: hidden; }
.hero .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .art .mono { font-size: 90px; font-weight: 900; color: #fff; letter-spacing: -.05em; }
.hero .body { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.hero .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.hero h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.hero p { margin: 0 0 20px; color: var(--text-dim); font-size: 14.5px; line-height: 1.55; max-width: 46ch; }

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

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 22px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.4);
  background: var(--chrome-btn); color: #1b1815;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(0,0,0,.2), 0 8px 20px -10px rgba(0,0,0,.9);
  font: inherit; font-size: 14.5px; font-weight: 700;
  cursor: pointer; align-self: flex-start;
  transition: box-shadow .25s, transform .12s;
}
/* a highlight that runs across the metal on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.85) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform .75s var(--ease);
}
.btn:hover::after, .hero:hover .btn::after { transform: translateX(110%); }
.btn:hover, .hero:hover .btn {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(0,0,0,.2),
              0 8px 20px -10px rgba(0,0,0,.9), 0 6px 26px -8px rgba(var(--accent-rgb), .55);
}
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border-color: var(--line);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.btn.ghost::after { background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.12) 50%, transparent 65%); }
.btn.ghost:hover { border-color: rgba(var(--accent-rgb), .5); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 22px -8px rgba(var(--accent-rgb), .5); }

/* ---------- Tag chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.chip {
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.chip:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .45); }
.chip.on {
  background: var(--chrome-btn); border-color: rgba(255,255,255,.4); color: #1b1815; font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 16px -6px rgba(var(--accent-rgb), .45);
}

/* ---------- Player page ---------- */

.stage {
  position: relative;
  background: #000;
  width: 100%;
  height: calc(100dvh - var(--header-h) - 54px);
  min-height: 340px;
  overflow: hidden;
}
.stage iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}
/* letterbox when the game declares an aspect ratio */
.stage.ratio { display: grid; place-items: center; }
.stage.ratio iframe {
  position: relative;
  inset: auto;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  aspect-ratio: var(--ratio, 16/9);
  height: 100%;
}

.stage:fullscreen { height: 100dvh; }
.stage:-webkit-full-screen { height: 100dvh; }

.loader {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(420px 260px at 50% 50%, rgba(var(--accent-rgb), .10), transparent 70%), var(--bg);
  z-index: 5;
  transition: opacity .35s;
}
.loader.gone { opacity: 0; pointer-events: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .5));
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* toolbar under the game - same on every game */
.toolbar {
  position: relative;
  height: 54px;
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  background: var(--grain), var(--panel);
  background-size: 320px 320px, auto;
}
.toolbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--hairline); opacity: .5;
}
.toolbar .title { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.toolbar .ctrl { color: var(--text-faint); font-size: 12.5px; }
.toolbar .sp { flex: 1 1 auto; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  color: var(--text-dim);
  cursor: pointer; transition: color .2s, border-color .2s, box-shadow .2s;
}
.icon-btn:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .5); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 16px -6px rgba(var(--accent-rgb), .6); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.about { padding: 28px 0 10px; display: grid; grid-template-columns: 1fr 240px; gap: 34px; }
.about h2 { margin: 0 0 10px; font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.about p { margin: 0; color: var(--text-dim); line-height: 1.65; font-size: 14.5px; }
.about dl { margin: 0; font-size: 13.5px; }
.about dt { color: var(--text-faint); margin-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.about dt:first-of-type { margin-top: 0; }
.about dd { margin: 3px 0 0; color: var(--text); }

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

.site-footer {
  position: relative;
  margin-top: 64px;
  padding: 28px 18px 30px;
  color: var(--text-faint);
  font-size: 13px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  justify-content: center;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--hairline); opacity: .5;
}
.site-footer img { width: 30px; height: auto; display: block; opacity: .85; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: var(--text); }

.empty { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty h2 { color: var(--text); margin: 0 0 8px; font-family: var(--display); font-size: 20px; font-weight: 600; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheen { 0% { background-position: 150% 0; } 32%, 100% { background-position: -50% 0; } }
@keyframes sheenText { 0% { background-position: 150% 0, 0 0; } 32%, 100% { background-position: -50% 0, 0 0; } }
@keyframes breathe { 50% { opacity: .65; transform: scale(.97); } }
@keyframes glowPulse {
  50% { box-shadow: 0 0 0 3px var(--bg), 0 0 22px rgba(var(--accent-rgb), .85); }
}

@media (prefers-reduced-motion: no-preference) {
  /* the masthead settles in once, top to bottom */
  .masthead-inner > * { animation: rise .8s var(--ease) both; }
  .masthead-inner > :nth-child(2) { animation-delay: .08s; }
  .masthead-inner > :nth-child(3) { animation-delay: .16s; }
  .masthead-inner > :nth-child(4) { animation-delay: .24s; }
  .masthead-inner > :nth-child(5) { animation-delay: .32s; }

  /* then a slow glint now and then: logo first, title a beat later */
  .masthead .mark .sheen { animation: sheen 8s ease-in-out 1.2s infinite; }
  .masthead h1.chrome-text { animation: rise .8s var(--ease) .08s both, sheenText 8s ease-in-out 1.7s infinite; }
  .masthead .mark::before { animation: breathe 7s ease-in-out infinite; }
  .timeline li.wip::before { animation: glowPulse 2.8s ease-in-out infinite; }

  /* sections fade up as they scroll in (shell.js adds .reveal/.in) */
  .motion .reveal:not(.in) { opacity: 0; }
  .motion .reveal.in { animation: rise .7s var(--ease) backwards; animation-delay: var(--d, 0s); }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero .art { min-height: 180px; }
  .hero h1 { font-size: 26px; }
  .spotlight .hero h2 { font-size: 23px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 620px) {
  .brand span { display: none; }
  .header-link { display: none; }
  .kbd-hint { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .toolbar .ctrl { display: none; }
  .section-head h2 { font-size: 17px; }
  .page-head h1 { font-size: 25px; }
}
