/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #0c0f0d;
  --bg-2: #131814;
  --panel: #171d18;
  --line: rgba(236, 231, 220, .10);
  --line-2: rgba(236, 231, 220, .18);
  --text: #ece7dc;
  --muted: #a3a497;
  --faint: #6f7268;
  --accent: #e3b341;
  --radius: 14px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--body); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 78px; }   /* keep anchored headings clear of the sticky top bar */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 40em; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 15, 13, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0;
  font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-mark {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  background: conic-gradient(from 210deg, #e3b341, #9bd35a, #4fd6c0, #e3b341);
  box-shadow: inset 0 0 0 5px var(--bg);
}
.topnav { display: flex; gap: 4px; }
.topnav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.topnav a:hover { color: var(--text); background: var(--line); }

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 48px;
  padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0c0f0d; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(12, 15, 13, .35); }
.btn-ghost:hover { border-color: var(--text); }
.btn-disabled { border-color: var(--line); color: var(--faint); cursor: default; }
.btn-disabled:hover { transform: none; }
.btn-sub { font-weight: 500; font-size: .82em; opacity: .7; }

/* ---------------------------------------------------------------- home hero */
.hero, .g-hero { position: relative; overflow: hidden; isolation: isolate; }
.hero { min-height: min(78vh, 720px); display: flex; align-items: flex-end; }
.hero-art, .g-hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art img, .g-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after, .g-hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,15,13,.92) 0%, rgba(12,15,13,.55) 55%, rgba(12,15,13,.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(12,15,13,0) 45%);
}
.hero-in { padding-top: 120px; padding-bottom: clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 13em; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- game cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.card-art { position: relative; aspect-ratio: 630 / 500; background: var(--bg-2); overflow: hidden; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-art img { transform: scale(1.04); }
.status {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(12, 15, 13, .78); color: var(--accent); backdrop-filter: blur(6px);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.35rem; margin-bottom: .3em; }
.card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.chip-play { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }

.about { background: var(--bg-2); border-top: 1px solid var(--line); }
.about-in { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; }
.about-in p { color: var(--muted); font-size: 1.05rem; }

/* ---------------------------------------------------------------- game page */
.g-hero { min-height: min(70vh, 640px); display: flex; align-items: flex-end; }
.g-hero-in { padding-top: 110px; padding-bottom: clamp(40px, 6vw, 72px); }
.back {
  display: inline-block; margin-bottom: 2.2rem; color: var(--muted);
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.back:hover { color: var(--text); }

.player-sec { padding: 8px 0 clamp(40px, 6vw, 64px); }
.player {
  position: relative; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 35%, transparent);
}
.player.landscape { aspect-ratio: 16 / 9; width: 100%; }
.player.portrait { aspect-ratio: 460 / 880; height: min(880px, 86vh); max-width: 100%; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.player-poster { position: absolute; inset: 0; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.player-start {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; width: 100%; border: 0; background: transparent; color: var(--text); cursor: pointer;
  font: 700 1.15rem var(--display);
}
.play-icon {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent); position: relative;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .2s ease;
}
.play-icon::after {
  content: ""; position: absolute; left: 34px; top: 26px;
  border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #0c0f0d;
}
.player-start:hover .play-icon { transform: scale(1.07); }
.player-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px;
  margin: 14px auto 0; max-width: 46em;
}
.player-fs {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text); font: 600 .86rem var(--body); cursor: pointer;
}
.player-fs:hover, .player-fs:focus-visible { border-color: var(--text); }
.player-fs[hidden] { display: none; }
.player:fullscreen { border: 0; border-radius: 0; height: 100%; width: 100%; max-width: none; aspect-ratio: auto; }
.player-note { text-align: center; color: var(--faint); font-size: .9rem; margin: 0; }

.g-body { padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 9vw, 104px); border-top: 1px solid var(--line); }
.g-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; }
.g-main > h2:not(:first-child) { margin-top: 2.2em; }
.g-main p { color: #d6d2c6; font-size: 1.05rem; }
.features { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.features li {
  position: relative; padding: 12px 16px 12px 40px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; color: #d6d2c6;
}
.features li::before {
  content: ""; position: absolute; left: 16px; top: 21px; width: 9px; height: 9px;
  border-radius: 3px; background: var(--accent); transform: rotate(45deg);
}
.features strong, .plain strong, .controls strong { color: var(--text); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: .85rem; color: var(--faint); margin-top: 6px; line-height: 1.45; }

.g-side { align-self: start; position: sticky; top: 86px; }
.g-side h3 { margin-top: 1.8em; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--body); }
.facts {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px;
  padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.facts dt { color: var(--faint); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .95rem; }
.controls { width: 100%; border-collapse: collapse; font-size: .92rem; }
.controls th, .controls td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.controls th { font-weight: 500; color: var(--muted); padding-right: 14px; }
.controls td { font-weight: 600; }
.plain { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .94rem; }
.plain li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- highlight reel */
.highlights { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); border-top: 1px solid var(--line); }
.reel { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.reel-stage {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -34px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: box-shadow .4s ease;
}
.reel-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.reel-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.reel-caption h3 { font-size: 1.35rem; margin-bottom: .35em; }
.reel-caption p { color: var(--muted); font-size: .96rem; margin-bottom: .6em; }
.reel-game { color: var(--accent); font-weight: 700; text-decoration: none; font-size: .95rem; }
.reel-game:hover { text-decoration: underline; }
.reel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.reel-list[hidden] { display: none; }
.reel-item {
  width: 100%; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 7px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); text-align: left; cursor: pointer; font: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.reel-item:hover { border-color: var(--line-2); }
.reel-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}
.reel-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--bg-2); }
.reel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reel-len {
  position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, .75); font-size: .72rem; font-weight: 700;
}
.reel-len:empty { display: none; }
.reel-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.reel-meta b { font-weight: 700; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-meta small { color: var(--faint); font-size: .8rem; margin-top: 3px; }
.reel.compact { grid-template-columns: 1fr; margin-bottom: 2.4em; }
.reel.compact .reel-list { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); max-height: none; }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 8, 7, .94); color: var(--text);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: min(1600px, 92vw); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 12px; }
.lightbox button {
  position: absolute; border: 0; background: rgba(236, 231, 220, .08); color: var(--text);
  width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(236, 231, 220, .18); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: calc(50% - 26px); }
.lb-next { right: 18px; top: calc(50% - 26px); }

/* ---------------------------------------------------------------- misc */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--faint); font-size: .9rem; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a { color: var(--muted); }
.img-missing { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, var(--bg-2) 0 12px, var(--panel) 12px 24px); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .reel { grid-template-columns: 1fr; }
  .reel-list { max-height: none; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .g-grid { grid-template-columns: 1fr; gap: 40px; }
  .g-side { position: static; }
  .about-in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar-in { gap: 8px; }
  .brand { font-size: 1rem; gap: 8px; white-space: normal; line-height: 1.1; }   /* long names wrap to 2 lines */
  .brand-mark { width: 22px; height: 22px; box-shadow: inset 0 0 0 4px var(--bg); }
  .topnav { gap: 0; flex: 0 0 auto; }
  .topnav a { padding: 8px 6px; font-size: .86rem; }
  .btn { width: 100%; justify-content: center; }
  .player.portrait { height: auto; width: 100%; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
