:root {
  color-scheme: dark;
  --ink: #080a0e;
  --ink-soft: #10151b;
  --panel: #111820;
  --panel-light: #19222b;
  --silver: #e5e7e8;
  --muted: #a5adb4;
  --ember: #ff8b2a;
  --ember-bright: #ffc168;
  --ice: #70cfff;
  --line: rgba(214, 225, 232, .16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--silver);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 72% 14%, rgba(21, 74, 104, .18), transparent 34rem),
    radial-gradient(ellipse at 18% 46%, rgba(148, 53, 13, .11), transparent 38rem),
    var(--ink);
  color: var(--silver);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(7, 9, 12, .38), rgba(7, 9, 12, .72)),
    url("/assets/forge-portrait.png");
  background-position: center, center 24%;
  background-size: cover;
  content: "";
  opacity: .2;
  pointer-events: none;
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: .8rem 1rem;
  transform: translateY(-180%);
  background: var(--silver);
  color: var(--ink);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(1240px, calc(100% - 64px));
  height: 92px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; width: min(245px, 34vw); align-items: center; }
.brand img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }

.main-nav { display: flex; gap: 2.6rem; margin-left: auto; margin-right: 2.4rem; }
.main-nav a, .header-mark, .site-footer a {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}
.main-nav a { color: #c2c7cb; transition: color .2s ease; }
.main-nav a:hover, .site-footer a:hover { color: var(--ember-bright); }
.header-mark { color: var(--ember-bright); }
.header-mark span { margin-right: .45rem; color: var(--ice); }

.hero {
  position: relative;
  display: grid;
  width: min(1240px, calc(100% - 64px));
  min-height: 590px;
  grid-template-columns: 1fr;
  align-items: center;
  margin: 0 auto;
  padding: 58px 0 80px;
}

.hero-copy { position: relative; z-index: 2; max-width: 820px; justify-self: center; padding-bottom: 1rem; text-align: center; }
.hero-copy > .eyebrow { justify-content: center; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.2rem;
  color: var(--ember-bright);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.eyebrow-line { width: 30px; height: 1px; background: var(--ember); }

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 1.2rem;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 8vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .93;
  text-shadow: 0 5px 32px rgba(0, 0, 0, .95), 0 1px 8px #080a0e;
}
h1 em {
  color: transparent;
  background: linear-gradient(110deg, #fff 3%, #aeb9c0 43%, #ffc678 72%, #e97126 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-weight: 400;
}
.hero-lede { max-width: 560px; margin: 0 auto 2rem; color: #c1c8ce; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.75; text-shadow: 0 2px 12px #080a0e; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.4rem; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .85rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(115deg, #f58b33, #c74d1d); color: #160d08; box-shadow: 0 8px 30px rgba(208, 83, 23, .2); }
.button-primary:hover { background: linear-gradient(115deg, #ffab55, #df6128); }
.text-link { color: #dce2e6; font-size: .83rem; font-weight: 700; text-decoration: none; }
.text-link span { padding-left: .4rem; color: var(--ice); }
.text-link:hover { color: var(--ember-bright); }
.launch-note { display: flex; align-items: center; justify-content: center; gap: .65rem; margin-top: 2.8rem; color: #aab4bb; font-size: .76rem; letter-spacing: .06em; text-shadow: 0 2px 12px #080a0e; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 15px rgba(255, 139, 42, .9); }

.hero-rule { position: absolute; right: 0; bottom: 29px; left: 0; display: flex; align-items: center; gap: 1rem; color: var(--ember); }
.hero-rule span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(223, 160, 91, .58), transparent); }
.hero-rule i { color: #ffc56d; font-size: 1.3rem; font-style: normal; text-shadow: 0 0 14px #e47820; }

.section-wrap { width: min(1240px, calc(100% - 64px)); margin: 0 auto; }
.games-section { padding-top: 84px; padding-bottom: 116px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading .eyebrow { margin-bottom: .7rem; }
h2 { margin-bottom: 0; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.3rem); font-weight: 500; letter-spacing: -.035em; }
.section-intro { max-width: 365px; margin-bottom: .3rem; color: var(--muted); font-size: .96rem; line-height: 1.65; }
.catalog-status { min-height: 1.2rem; margin: 0 0 1.1rem; color: #8f9aa3; font-size: .8rem; }
.catalog-status-error { color: #ffb7a1; }
.game-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.game-group { min-width: 0; padding: 1.15rem; border-top: 1px solid rgba(255, 145, 54, .55); background: linear-gradient(160deg, rgba(27, 37, 47, .86), rgba(12, 16, 21, .94)); }
.group-heading { display: flex; align-items: center; gap: .8rem; min-height: 54px; margin-bottom: 1rem; }
.group-symbol { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(112, 207, 255, .36); color: var(--ice); font-family: var(--serif); font-size: 1.25rem; box-shadow: inset 0 0 20px rgba(56, 147, 195, .1); }
.group-heading h3 { margin: 0; color: #f1d1a6; font-family: var(--serif); font-size: 1.28rem; font-weight: 500; }
.group-description { min-height: 3.3rem; margin: 0 0 1rem; color: #9fa9b1; font-size: .86rem; line-height: 1.6; }
.game-card { position: relative; display: flex; min-height: 410px; flex-direction: column; overflow: hidden; border: 1px solid rgba(222, 230, 235, .13); background: radial-gradient(ellipse at 80% 10%, rgba(47, 86, 107, .19), transparent 60%), rgba(7, 10, 14, .86); }
.game-cover { display: block; width: 100%; height: 180px; flex: 0 0 auto; border-bottom: 1px solid rgba(222, 230, 235, .13); object-fit: cover; object-position: center 35%; }
.game-card[data-game="pokemon-tcg"] .game-cover { background: #080a0e; object-fit: contain; }
.game-card-body { display: flex; min-height: 228px; flex: 1; flex-direction: column; padding: 1.2rem; }
.game-kicker { margin: 0 0 .65rem; color: var(--ember-bright); font-size: .65rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.game-card h4 { margin: 0 0 .65rem; color: #f4f4f1; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; }
.game-card p { margin: 0 0 1.3rem; color: #a5afb7; font-size: .84rem; line-height: 1.6; }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid rgba(228, 233, 236, .1); }
.game-status { color: #b5c2ca; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.game-status::before { display: inline-block; width: 6px; height: 6px; margin-right: .5rem; border-radius: 50%; background: var(--ember); content: ""; vertical-align: 1px; }
.launch-button { padding: .6rem .65rem; border: 1px solid rgba(226, 153, 83, .35); border-radius: 0; background: transparent; color: #d8b58b; font: 700 .65rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.launch-button:disabled { color: #77828a; cursor: not-allowed; border-color: rgba(226, 233, 237, .12); }
.noscript-note { color: var(--muted); }

.atelier-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(105deg, rgba(20, 27, 34, .8), rgba(20, 30, 37, .32)); }
.atelier-inner { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 1.6rem; padding-top: 3.2rem; padding-bottom: 3.2rem; }
.atelier-emblem { display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid rgba(232, 146, 65, .45); border-radius: 50%; color: var(--ember-bright); font-size: 1.9rem; box-shadow: 0 0 28px rgba(223, 116, 34, .08), inset 0 0 24px rgba(223, 116, 34, .08); }
.atelier-inner .eyebrow { margin-bottom: .55rem; }
.atelier-inner h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.atelier-inner p:last-child { max-width: 630px; margin: .65rem 0 0; color: var(--muted); line-height: 1.65; }
.button-outline { border-color: rgba(112, 207, 255, .4); color: #cbeeff; }
.button-outline:hover { background: rgba(68, 153, 196, .12); }

.site-footer { display: flex; width: min(1240px, calc(100% - 64px)); min-height: 94px; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; color: #89939b; }
.site-footer p { margin: 0; font-size: .75rem; letter-spacing: .06em; }
.site-footer a { font-size: .68rem; }
.footer-brand { color: #c5cbd0; font-family: var(--serif); font-size: .9rem !important; letter-spacing: .22em !important; }
.footer-brand span { color: var(--ember-bright); }

@media (max-width: 900px) {
  .site-header, .hero, .section-wrap, .site-footer { width: min(100% - 40px, 720px); }
  .site-header { height: 78px; }
  .header-mark { display: none; }
  .main-nav { margin-right: 0; }
  .hero { min-height: 510px; grid-template-columns: 1fr; gap: 0; padding: 72px 0 78px; }
  h1 { font-size: clamp(3.8rem, 10vw, 6rem); }
  .game-groups { grid-template-columns: 1fr; gap: 1rem; }
  .game-group { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); column-gap: 1.1rem; align-items: center; }
  .group-heading { grid-column: 1; margin-bottom: .4rem; }
  .group-description { grid-column: 1; min-height: auto; margin: 0; }
  .game-card { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 620px) {
  .site-header, .hero, .section-wrap, .site-footer { width: calc(100% - 32px); }
  .site-header { height: 70px; }
  .brand { width: min(148px, 42vw); flex: 0 0 auto; }
  .main-nav { gap: .7rem; margin: 0; justify-content: flex-end; }
  .main-nav a { font-size: .58rem; letter-spacing: .04em; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; padding-top: 58px; gap: 0; }
  .hero-copy { padding-bottom: 0; }
  h1 { font-size: clamp(3.7rem, 17vw, 5.4rem); }
  .hero-lede { max-width: 420px; }
  .launch-note { margin-top: 1.7rem; }
  .hero-rule { bottom: 24px; }
  .games-section { padding-top: 62px; padding-bottom: 72px; }
  .section-heading { display: block; margin-bottom: 1.7rem; }
  .section-intro { margin-top: .9rem; }
  .game-group { display: block; padding: .9rem; }
  .group-heading { margin-bottom: .7rem; }
  .group-description { margin-bottom: .9rem; }
  .game-card { min-height: 380px; }
  .game-cover { height: 160px; }
  .game-card-body { min-height: 220px; }
  .atelier-inner { grid-template-columns: 54px minmax(0, 1fr); gap: .9rem; padding-top: 2.4rem; padding-bottom: 2.4rem; }
  .atelier-inner > div:nth-child(2) { min-width: 0; }
  .atelier-emblem { width: 52px; height: 52px; font-size: 1.4rem; }
  .atelier-inner .button { grid-column: 2; justify-self: start; }
  .site-footer { min-height: 80px; flex-wrap: wrap; padding: 1.2rem 0; }
  .site-footer p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* DEV remains identifiable throughout the portal, including on narrow screens. */
.dev-banner { margin: 0; padding: .75rem 1rem; background: #d88327; color: #111; text-align: center; font-weight: 700; position: sticky; top: 0; z-index: 100; }
