/* =============================================================================
   HOME — boot sequence, hero, and the GAME LIST selector.
   ========================================================================== */

/* -- boot sequence --------------------------------------------------------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: grid;
  place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.boot.done { opacity: 0; visibility: hidden; }

.boot .mark {
  font-family: var(--display);
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 500;
  letter-spacing: .58em;
  color: var(--accent);
  text-indent: .58em;
  opacity: 0;
  animation: bootmark 1.5s var(--ease) both;
}
@keyframes bootmark {
  0%   { opacity: 0; letter-spacing: 1.1em; filter: blur(8px); }
  38%  { opacity: 1; letter-spacing: .58em; filter: none; }
  76%  { opacity: 1; }
  100% { opacity: .15; }
}
.boot .bar {
  position: absolute;
  left: 50%; bottom: 34%;
  width: min(280px, 46vw); height: 1px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.boot .bar i {
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: bootbar 1.45s var(--ease) both;
}
@keyframes bootbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* -- hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding: 130px var(--gut) 120px;
  overflow: hidden;
}

/* -- hero key visual ------------------------------------------------------- */
/* Attract mode: the stage plates cycle full-bleed behind the type, each one
   slowly pushing in, so the frame is never empty. If site.heroVideo is set,
   a single <video> replaces the whole cycle. */
.keyvis { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.keyvis .kv {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  opacity: 0;
  transform: scale(1.12);
  filter: grayscale(.4) contrast(1.16) brightness(.46) saturate(.9);
  transition: opacity 1.7s var(--ease);
  will-change: opacity, transform;
}
.keyvis .kv.on {
  opacity: 1;
  animation: kvpush 13s linear forwards;
}
@keyframes kvpush {
  from { transform: scale(1.12) translate3d(0,0,0); }
  to   { transform: scale(1.3) translate3d(-1.5%, -1%, 0); }
}

/* Scrim: heavy on the left so the headline always holds, feathered into the
   ticker at the bottom. */
.keyvis::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(4,4,6,.95) 0%, rgba(4,4,6,.82) 30%,
      rgba(4,4,6,.42) 62%, rgba(4,4,6,.72) 100%),
    linear-gradient(180deg,
      rgba(0,0,0,.85) 0%, rgba(0,0,0,.15) 26%,
      rgba(0,0,0,.2) 58%, var(--deep) 100%);
}

#herofx {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: .55;
}

.hero::after {                      /* horizon glow */
  content: '';
  position: absolute;
  left: 50%; bottom: -30%;
  width: 140vw; height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 68%);
  opacity: .22;
  pointer-events: none;
  z-index: 1;
}

/* -- now showing ----------------------------------------------------------- */
/* Names the plate currently on screen — turns the backdrop from wallpaper into
   part of the archive. */
.nowshow {
  position: absolute;
  right: var(--gut); bottom: 30px;
  z-index: 3;
  text-align: right;
  display: grid;
  gap: 4px;
  max-width: 46vw;
  pointer-events: none;
}
.nowshow .lab {
  font-family: var(--ui);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .38em; text-indent: .38em;
  color: var(--muted);
}
.nowshow .name {
  font-family: var(--display);
  font-size: clamp(15px, 1.6vw, 21px);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--ink);
  transition: opacity .5s var(--ease);
}
.nowshow .from {
  font-family: var(--ui);
  font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--kv-accent, var(--accent));
  transition: color .8s var(--ease), opacity .5s var(--ease);
}
.nowshow.swap .name, .nowshow.swap .from { opacity: 0; }

@media (max-width: 760px) {
  .nowshow { display: none; }
}

.hero .inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(52px, 12.5vw, 190px);
  font-weight: 700;
  line-height: .84;
  letter-spacing: -.025em;
  margin: 0 0 22px;
}
.hero h1 .l {
  display: block;
  overflow: hidden;
}
.hero h1 .l > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.hero.lit h1 .l > span { transform: none; }

.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  text-shadow: 0 0 40px var(--glow);
}

.hero .blurb {
  max-width: 56ch;
  font-size: clamp(16px, 1.25vw, 19px);
  color: #b9b9c2;
  margin: 0 0 34px;
}
.hero .blurb strong { color: var(--ink); font-weight: 600; }

.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* SCROLL cue, straight out of the CFC2 playbook */
.scrollcue {
  position: absolute;
  left: var(--gut); bottom: 34px;
  z-index: 3;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--ui);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .38em;
  color: var(--muted);
}
.scrollcue i {
  display: block;
  width: 62px; height: 1px;
  background: rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.scrollcue i::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: cue 2.1s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: scaleX(0);   transform-origin: left; }
  45%  { transform: scaleX(1);   transform-origin: left; }
  55%  { transform: scaleX(1);   transform-origin: right; }
  100% { transform: scaleX(0);   transform-origin: right; }
}

/* -- ticker strip ---------------------------------------------------------- */
.ticker {
  position: relative;
  border-block: 1px solid var(--line);
  background: var(--deeper);
  overflow: hidden;
  padding: 11px 0;
  z-index: 3;
}
.ticker .run {
  display: flex;
  width: max-content;
  animation: run 42s linear infinite;
}
.ticker:hover .run { animation-play-state: paused; }
.ticker span {
  font-family: var(--ui);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .28em;
  color: var(--muted);
  padding: 0 26px;
  white-space: nowrap;
}
.ticker span b { color: var(--accent); font-weight: 600; }
@keyframes run { to { transform: translateX(-50%); } }

/* =============================================================================
   GAME LIST
   ========================================================================== */
.gamelist {
  position: relative;
  padding: clamp(70px, 9vw, 130px) 0 clamp(80px, 10vw, 150px);
  overflow: hidden;
  isolation: isolate;
}

/* full-bleed art layer that swaps as you move across the tiles */
.gl-bed { position: absolute; inset: 0; z-index: -2; background: var(--deeper); }
.gl-bed .art {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  opacity: 0;
  transform: scale(1.14);
  filter: saturate(.55) contrast(1.05) brightness(.5);
  transition: opacity .75s var(--ease), transform 8s linear, filter .75s var(--ease);
}
.gl-bed .art.on {
  opacity: .42;
  transform: scale(1.24);
  filter: saturate(.9) contrast(1.1) brightness(.62);
}
.gl-bed::after {                    /* keep type readable over any plate */
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--deep) 0%, rgba(5,5,6,.55) 22%, rgba(5,5,6,.55) 78%, var(--deep) 100%),
    radial-gradient(90% 70% at 50% 50%, transparent 20%, rgba(0,0,0,.7) 100%);
}

.gl-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 58px);
}
.gl-head .lede { max-width: 54ch; color: #b0b0b9; margin: 0 0 4px; }
.gl-head .count {
  margin-left: auto;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--muted);
}
.gl-head .count b { color: var(--accent); font-size: 22px; }

/* -- tiles ----------------------------------------------------------------- */
.tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(14px, 1.6vw, 26px);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  min-height: 340px;
  overflow: hidden;
  background: #08080a;
  border: 1px solid var(--line);
  isolation: isolate;
  transition: border-color .45s var(--ease), transform .55s var(--slam);
}
.tile:hover, .tile:focus-visible { border-color: var(--accent); }
.tiles:hover .tile:not(:hover) { opacity: .42; }
.tile { transition: border-color .45s var(--ease), transform .55s var(--slam), opacity .45s var(--ease); }

/* the tile's own art, zooming under the lockup */
.tile .art {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  transform: scale(1.06);
  filter: grayscale(.85) brightness(.38) contrast(1.1);
  transition: transform 1.4s var(--ease), filter .6s var(--ease);
  z-index: 0;
}
/* a hover-loop <video> has to fill the tile exactly like the still plate */
.tile video.art { width: 100%; height: 100%; object-fit: cover; }

.tile:hover .art, .tile:focus-visible .art {
  transform: scale(1.16);
  filter: grayscale(0) brightness(.58) contrast(1.12) saturate(1.05);
}

.tile .shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.2) 40%, rgba(0,0,0,.9)),
    radial-gradient(70% 60% at 50% 45%, transparent, rgba(0,0,0,.55));
  transition: opacity .5s var(--ease);
}

/* diagonal accent wedge that sweeps across on hover */
.tile .wedge {
  position: absolute; inset: -10% -30%;
  z-index: 2;
  background: linear-gradient(100deg,
    transparent 42%,
    color-mix(in srgb, var(--accent) 22%, transparent) 50%,
    transparent 58%);
  transform: translateX(-70%);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.tile:hover .wedge, .tile:focus-visible .wedge { transform: translateX(70%); }

/* scan bar that drops down the tile on hover */
.tile .scan {
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  pointer-events: none;
}
.tile:hover .scan, .tile:focus-visible .scan { animation: scandrop 1.6s var(--ease) infinite; }
@keyframes scandrop {
  0%   { opacity: 0;   transform: translateY(0); }
  12%  { opacity: .95; }
  88%  { opacity: .95; }
  100% { opacity: 0;   transform: translateY(var(--tileh, 360px)); }
}

.tile .grid {                      /* faint tech grid, brightens on hover */
  position: absolute; inset: 0; z-index: 2;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .16;
  transition: opacity .6s var(--ease), transform 1.4s var(--ease);
  pointer-events: none;
}
.tile:hover .grid, .tile:focus-visible .grid { opacity: .4; transform: scale(1.05); }

/* tile furniture */
.tile .no {
  position: absolute; top: 16px; left: 18px; z-index: 5;
  font-family: var(--display);
  font-size: 12px; font-weight: 600;
  letter-spacing: .3em;
  color: var(--muted);
}
.tile .no b { color: var(--accent); }

.tile .dims {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  display: flex; gap: 6px;
}
.tile .dim {
  font-family: var(--display);
  font-size: 11px; font-weight: 600; letter-spacing: .18em;
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.tile:hover .dim { color: var(--accent); border-color: var(--accent); }

.tile .lockwrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 48px 26px 74px;
  transition: transform .6s var(--slam);
}
.tile:hover .lockwrap, .tile:focus-visible .lockwrap { transform: translateY(-8px) scale(1.03); }

.tile .bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.85) 45%);
  font-family: var(--ui);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
}
.tile .bar .sep { color: rgba(255,255,255,.2); }
.tile .bar .go {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  color: var(--accent);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.tile:hover .bar .go, .tile:focus-visible .bar .go { transform: none; opacity: 1; }

@media (max-width: 640px) {
  .tile { min-height: 250px; aspect-ratio: 4 / 3; }
  .tiles:hover .tile:not(:hover) { opacity: 1; }
}

/* -- lockup reactions inside a selector tile ------------------------------- */
.tile:hover .lock .over::after { transform: translateX(-50%) scaleX(1); }
.tile:hover .lock .main {
  filter: drop-shadow(0 0 26px var(--glow)) drop-shadow(0 4px 14px rgba(0,0,0,.8));
  animation: split .45s steps(2) 1;
}
.tile:hover .lock .sub { letter-spacing: .46em; text-indent: .46em; padding-inline: 22px; }


/* =============================================================================
   FEATURED RELEASE — poster first, player on click, YouTube / Bilibili switch
   ========================================================================== */
.feature {
  position: relative;
  padding: clamp(64px, 8vw, 110px) 0;
  border-top: 1px solid var(--line);
  background: var(--deeper);
}
.feature .wrap {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) { .feature .wrap { grid-template-columns: 1fr; } }

.ft-title {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: .92;
  margin: 0 0 18px;
}
.ft-text { color: #b8b8c1; margin: 0 0 26px; max-width: 44ch; }

.ft-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
.ft-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.ft-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; }
.ft-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.ft-poster:hover img, .ft-poster:focus-visible img { transform: scale(1.03); filter: brightness(1.08); }
.ft-play {
  position: absolute; left: 50%; top: 50%;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px var(--glow);
  transition: transform .35s var(--slam), background .3s var(--ease);
}
.ft-play::after {
  content: '';
  position: absolute; left: 34px; top: 26px;
  border-style: solid; border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--ink);
}
.ft-poster:hover .ft-play, .ft-poster:focus-visible .ft-play { transform: scale(1.1); background: var(--accent); }

.ft-switch {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .22em;
}
.ft-switch .lab { color: var(--muted); margin-right: 6px; }
.ft-switch button {
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: inherit;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.ft-switch button:hover { color: var(--ink); }
.ft-switch button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
