/* BEYONDBRAIN GAME CENTRE — stadium-lit storefront.
   Stark white shelves, artwork edge-to-edge, one green strip cutting through. */

:root {
  /* --accent / --accent-deep / --action / --action-ink / --action-hover
     are injected per-palette by tools/build.mjs (see `palettes` in src/data.mjs). */
  --yellow: #ffd800;
  --ink: #000000;
  --white: #ffffff;
  --carbon: #333333;
  --ash: #f2f2f2;
  --steel: #616161;
  --graphite: #262626;
  --smoke: #999999;

  --sans: system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, Roboto, sans-serif;

  --nav-h: 56px;
  --pad: 24px;
  --max: 1600px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- badge / label ---------- */

.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.075em;
  padding: 3px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--live  { background: var(--accent);  color: var(--white); }
.badge--beta  { background: var(--yellow); color: var(--ink); }
.badge--soon  { background: var(--ink);    color: var(--white); }
.badge--dev   { background: var(--steel);  color: var(--white); }
.badge--outline { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.badge--hairline { background: transparent; color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); }

.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--action);
  color: var(--action-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.23;
  text-decoration: none;
  padding: 12px 20px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--action-hover); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 12px 0;
}
.ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.ghost--light { color: var(--white); }
.ghost:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--ash);
  display: flex;
  align-items: center;
}
.nav__in {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand__mark { width: 22px; height: 22px; flex: none; }
.brand__txt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__txt span { color: var(--steel); font-weight: 400; }
.nav__links { display: flex; gap: 22px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  font-size: 13px;
  color: var(--steel);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
}
.nav__links a:hover { color: var(--ink); font-weight: 600; }
.nav__end { margin-left: auto; display: flex; align-items: center; gap: 20px; flex: none; }
.nav__end a { font-size: 13px; color: var(--steel); text-decoration: none; white-space: nowrap; }
.nav__end a:hover { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  :root { --pad: 16px; }
  .nav__in { gap: 12px; }
  .brand__txt { font-size: 11px; }
  .nav__end { gap: 14px; }
  .nav__end a[data-secondary] { display: none; }
}

/* ---------- hero ---------- */

.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero__slide {
  display: none;
  position: relative;
  min-height: 520px;
}
.hero__slide.is-on { display: block; }

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .55;
}
.hero__grid {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  align-items: stretch;
}
.hero__art {
  position: relative;
  overflow: hidden;
}
.hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.85) 100%);
}
.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px var(--pad) 72px;
  color: var(--white);
  max-width: 640px;
}
.hero__eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.hero__title {
  font-size: 46px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 0 0 4px;
}
.hero__kana {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.075em;
  color: rgba(255,255,255,.7);
  margin: 0 0 16px;
  text-transform: uppercase;
}
.hero__lead { font-size: 15px; line-height: 1.6; margin: 0 0 28px; color: rgba(255,255,255,.92); }
.hero__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.hero__dots {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}
.hero__dots button {
  width: 26px; height: 4px;
  border: 0; padding: 0;
  background: rgba(255,255,255,.4);
  cursor: pointer;
}
.hero__dots button[aria-current='true'] { background: var(--white); }
.hero__dots button:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

@media (max-width: 980px) {
  .hero__slide, .hero__grid { min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { aspect-ratio: 16 / 9; }
  .hero__art::after { background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.9) 100%); }
  .hero__bg { opacity: .3; }
  .hero__copy { padding: 28px var(--pad) 60px; max-width: none; }
  .hero__title { font-size: 32px; }
}

/* ---------- category icon row ---------- */

.cats {
  border-bottom: 1px solid var(--ash);
  background: var(--white);
}
.cats__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cats a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent);
  padding: 8px 4px;
}
.cats a:hover .cats__label { text-decoration: underline; text-underline-offset: 4px; }
.cats svg { width: 40px; height: 40px; }
.cats__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.3;
}
@media (max-width: 720px) {
  .cats__in { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .cats svg { width: 32px; height: 32px; }
  .cats__label { font-size: 11px; }
}

/* ---------- shelf / section ---------- */

.shelf { padding: 56px 0 8px; }
.shelf__head {
  max-width: var(--max);
  margin: 0 auto 20px;
  padding: 0 var(--pad);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.shelf__h {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0;
}
.shelf__blurb { font-size: 13px; color: var(--steel); margin: 4px 0 0; }
.shelf__count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.075em;
  color: var(--steel);
  padding-bottom: 4px;
}

.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- tile ---------- */

.tile { display: block; text-decoration: none; color: var(--ink); background: var(--white); }
.tile__art { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ash); }
.tile__art img { width: 100%; height: 100%; object-fit: cover; }
.tile__art .badge { position: absolute; left: 0; top: 0; }
.tile:hover .tile__art img { transform: scale(1.035); }
.tile__art img { transition: transform .35s ease; }
@media (prefers-reduced-motion: reduce) { .tile__art img { transition: none; } .tile:hover .tile__art img { transform: none; } }
.tile__meta { padding: 12px 12px 28px; }
.tile__name { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0; }
.tile:hover .tile__name { text-decoration: underline; text-underline-offset: 3px; }
.tile__genre { font-size: 13px; color: var(--steel); margin: 2px 0 0; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* editorial cell that completes a short row */
.tile--note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 32px 40px;
  background: var(--ash);
  color: var(--steel);
}
.tile--note strong { font-size: 24px; line-height: 1.25; color: var(--ink); font-weight: 700; }
.tile--note p { font-size: 15px; margin: 0; line-height: 1.8; max-width: 34em; }
.tile--note .ghost { padding: 4px 0 0; }
.tile--note-1 { grid-column: span 1; }
.tile--note-2 { grid-column: span 2; }
.tile--note-3 { grid-column: span 3; }
@media (max-width: 1100px) {
  .tile--note-3 { grid-column: span 2; }
  .tile--note-2 { grid-column: span 1; }
  .tile--note { padding: 28px; }
  .tile--note strong { font-size: 20px; }
}
@media (max-width: 760px) {
  .tile--note-1, .tile--note-2, .tile--note-3 { grid-column: 1 / -1; }
}

/* ---------- green studio band ---------- */

.studio { background: var(--accent); color: var(--white); margin-top: 48px; }
.studio__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.studio h2 { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 0 0 14px; }
.studio p { font-size: 15px; line-height: 1.7; margin: 0 0 14px; color: rgba(255,255,255,.94); }
.studio .btn { margin-top: 14px; background: var(--white); color: var(--ink); }
.studio .btn:hover { background: var(--ash); }
.studio__kicker { color: var(--white); }
.studio__steps { list-style: none; margin: 0; padding: 0; max-width: 600px; margin-left: auto; }
.studio__steps li {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .38);
}
.studio__steps li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .38); }
.studio__n { font-size: 24px; font-weight: 700; line-height: 1.25; color: rgba(255, 255, 255, .75); }
.studio__steps strong { display: block; font-size: 20px; line-height: 1.33; font-weight: 700; margin-bottom: 4px; }
.studio__steps p { font-size: 15px; margin: 0; line-height: 1.7; color: rgba(255, 255, 255, .9); }
@media (max-width: 900px) {
  .studio__in { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--pad); }
  .studio__steps { margin-left: 0; max-width: none; }
}

/* ---------- dark facts band ---------- */

.facts { background: var(--ink); color: var(--white); }
.facts__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 50px var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase; color: var(--smoke); }
.facts dd { margin: 6px 0 0; font-size: 46px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
.facts dd small { font-size: 15px; font-weight: 400; color: var(--smoke); margin-left: 6px; letter-spacing: 0; }
@media (max-width: 900px) { .facts__in { grid-template-columns: repeat(2, 1fr); } .facts dd { font-size: 34px; } }

/* ---------- footer ---------- */

.foot { background: var(--ash); color: var(--steel); margin-top: 0; }
.foot__in { max-width: var(--max); margin: 0 auto; padding: 44px var(--pad) 20px; }
.foot__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.foot h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot a { font-size: 13px; color: var(--steel); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad) 40px;
  border-top: 1px solid #e2e2e2;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
}
@media (max-width: 760px) { .foot__cols { grid-template-columns: repeat(2, 1fr); } }

/* ---------- title detail page ---------- */

.thero { position: relative; background: var(--ink); overflow: hidden; }
.thero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .5; }
.thero__in {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 460px;
}
.thero__art { overflow: hidden; position: relative; }
.thero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thero__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.8) 100%); }
.thero__copy { color: var(--white); padding: 56px var(--pad); display: flex; flex-direction: column; justify-content: center; }
.thero__eyebrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.thero__h { font-size: 46px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 4px; }
.thero__kana { font-size: 11px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase; color: rgba(255,255,255,.7); margin: 0 0 18px; }
.thero__lead { font-size: 15px; line-height: 1.7; margin: 0 0 26px; max-width: 46em; }
.thero__cta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
@media (max-width: 980px) {
  .thero__in { grid-template-columns: 1fr; min-height: 0; }
  .thero__art { aspect-ratio: 16 / 9; }
  .thero__art::after { background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.9) 100%); }
  .thero__bg { opacity: .3; }
  .thero__copy { padding: 28px var(--pad) 40px; }
  .thero__h { font-size: 32px; }
}

.detail {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.detail__body p { font-size: 16px; line-height: 1.9; color: var(--graphite); margin: 0 0 20px; max-width: 46em; }
.detail__body h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 14px; }
.spec { border-top: 2px solid var(--ink); }
.spec__row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ash); }
.spec__k { font-size: 11px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase; color: var(--steel); padding-top: 3px; }
.spec__v { font-size: 15px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; gap: 40px; padding: 40px var(--pad); } }

.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0 8px; }
.numbers dt { font-size: 11px; font-weight: 600; letter-spacing: 0.075em; text-transform: uppercase; color: var(--steel); }
.numbers dd { margin: 4px 0 0; font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
@media (max-width: 620px) { .numbers { grid-template-columns: 1fr 1fr; } }

.shots { background: var(--ink); padding: 48px 0 56px; }
.shots__in { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.shots__strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.shots__strip img { height: 520px; width: auto; flex: none; scroll-snap-align: start; }
.shots__strip--wide img { height: 330px; }
@media (max-width: 760px) { .shots__strip img { height: 380px; } .shots__strip--wide img { height: 240px; } }
.shots h2 { color: var(--white); font-size: 24px; margin: 0 0 20px; }

.more { padding: 56px 0 8px; }
