/* ============================================================
   CASINO SOCIETY — CASINO1 VARIANT
   Retrofuturistic HUD aesthetic — inspired by chronothreads.webflow.io
   Color: dark navy-black, gold accents, zero border-radius
   Fonts: Bebas Neue (display), Space Grotesk (body), JetBrains Mono (terminal)
   ============================================================ */

/* ─── CUSTOM PROPERTIES ────────────────────────────────────── */
:root {
  --bg:             #0E0E15;
  --surface:        #14141D;
  --surface-2:      #1A1A26;
  --border:         #252535;
  --border-bright:  #3A3A52;
  --gold:           #C9A84C;
  --gold-light:     #E6D39E;
  --gold-dim:       rgba(201, 168, 76, 0.15);
  --red:            #C8102E;
  --text:           #E4E1D4;
  --text-muted:     #7A7880;
  --text-dim:       #45434E;
  --font-display:   'Bebas Neue', sans-serif;
  --font-body:      'Space Grotesk', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --corner-size:    14px;
  --corner-w:       2px;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --dur:            0.25s;
}

/* ─── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.js-loading { overflow: hidden; }
img  { display: block; max-width: 100%; height: auto; }
a    { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button    { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── CORNER BRACKETS ──────────────────────────────────────── */
.corner {
  position: absolute;
  width:  var(--corner-size);
  height: var(--corner-size);
  pointer-events: none;
  z-index: 2;
}
.c-tl { top: 0; left: 0;  border-top:    var(--corner-w) solid var(--gold); border-left:   var(--corner-w) solid var(--gold); }
.c-tr { top: 0; right: 0;  border-top:    var(--corner-w) solid var(--gold); border-right:  var(--corner-w) solid var(--gold); }
.c-bl { bottom: 0; left: 0;  border-bottom: var(--corner-w) solid var(--gold); border-left:   var(--corner-w) solid var(--gold); }
.c-br { bottom: 0; right: 0;  border-bottom: var(--corner-w) solid var(--gold); border-right:  var(--corner-w) solid var(--gold); }

/* ─── LOADER ───────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.is-hidden       { opacity: 0; visibility: hidden; pointer-events: none; }
.loader > .corner       { --corner-size: 32px; --corner-w: 2px; }
.loader__inner          { width: min(540px, 88vw); }
.loader__brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1;
}
.loader__sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}
.loader__terminal       { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 2rem; }
.loader__tline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
}
.loader__tline--hidden  { opacity: 0; }
.loader__tline.is-done  { color: var(--text); }
.loader__prompt         { color: var(--gold); flex-shrink: 0; }
.loader__progress-wrap  { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.loader__track          { flex: 1; height: 2px; background: var(--border); }
.loader__fill           { height: 100%; width: 0%; background: var(--gold); transition: width 0.04s linear; }
.loader__pct {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  min-width: 4ch;
  text-align: right;
}
.loader__enter {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-align: center;
  animation: blink 1.4s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ─── LAYOUT UTILITIES ─────────────────────────────────────── */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 5rem);
}
.section      { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
/* Explicit section alternation — more reliable than nth-child(even) */
.about    { background: var(--surface); }
.ethos    { background: var(--surface); }
.games    { background: var(--surface); }

/* ─── SECTION HEADER: "// 001  TITLE ─────────" ───────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.section-rule { flex: 1; height: 1px; background: var(--border); }

/* ─── TERMINAL LINE ────────────────────────────────────────── */
.terminal-line {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.prompt { color: var(--gold); font-family: var(--font-mono); flex-shrink: 0; }

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.875rem;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary { background: var(--gold); color: var(--bg); border: 1px solid var(--gold); }
.btn--primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn--ghost   { background: transparent; color: var(--text); border: 1px solid var(--border-bright); }
.btn--ghost:hover { color: var(--gold); border-color: var(--gold); }

/* ─── TEXT LINKS ───────────────────────────────────────────── */
.text-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 0.25rem;
  transition: border-color var(--dur) var(--ease);
}
.text-link:hover { border-color: var(--gold); }
.text-link--arrow { display: inline-block; margin-top: 0.75rem; }

/* ─── HUD FRAME ────────────────────────────────────────────── */
.hud-frame { position: relative; overflow: hidden; }
.hud-frame > .corner { z-index: 2; }

/* ─── HEADER ───────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(14, 14, 21, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}
.header.is-scrolled { border-color: var(--border-bright); }
.header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.header__nav         { margin-left: auto; }
.header__nav-list    { display: flex; gap: 2rem; align-items: center; }
.header__nav-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}
.header__nav-link:hover { color: var(--gold); }
.header__cta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.375rem 0.875rem;
  letter-spacing: 0.07em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  flex-shrink: 0;
}
.header__cta:hover    { background: var(--gold); color: var(--bg); }
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.header__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all var(--dur) var(--ease);
}
.header__burger[aria-expanded="true"] span:first-child { transform: translateY(6.5px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(64px + clamp(3rem, 8vw, 6rem)) clamp(1.5rem, 5vw, 5rem) clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5vw;
  pointer-events: none;
}
.hero__bg img {
  max-width: 48vw;
  max-height: 80vh;
  object-fit: contain;
  opacity: 0.055;
  filter: grayscale(1);
}
.hero__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(14, 14, 21, 0.18) 3px,
    rgba(14, 14, 21, 0.18) 4px
  );
  pointer-events: none;
  z-index: 0;
}
.hero > .corner { --corner-size: 20px; z-index: 2; }
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.hero__terminal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.hero__title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 14rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}
.hero__line { display: block; }
.hero__line--accent { color: var(--gold); }
.hero__sub {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.4vw, 0.9375rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ─── ABOUT ────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
}
.about__terminal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
.about__body {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about__links { display: flex; gap: 1.75rem; margin-top: 2rem; }
.about__frame {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.about__frame img {
  width: 100%;
  filter: saturate(0.65);
  transition: filter 0.4s var(--ease);
}
.about__frame:hover img { filter: saturate(1); }
.about__id {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(14, 14, 21, 0.8);
}
.about__id-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.about__id-value {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── COLLECTIONS ──────────────────────────────────────────── */
.collections__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.collections__footer { margin-top: 3rem; text-align: center; }

/* Collection Card */
.col-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.col-card:hover { border-color: var(--gold); }
.col-card__num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.col-card__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.07em;
}
.col-card__img-wrap { overflow: hidden; border: 1px solid var(--border); }
.col-card__img-wrap img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(0.75);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.col-card:hover .col-card__img-wrap img { transform: scale(1.05); filter: saturate(1); }
.col-card__info { display: flex; flex-direction: column; gap: 0.875rem; }
.col-card__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.05em;
}
.col-card__stats { display: flex; flex-direction: column; gap: 0.5rem; }

/* ─── STAT BARS ────────────────────────────────────────────── */
.stat-bar { display: flex; align-items: center; gap: 0.75rem; }
.stat-bar__label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  min-width: 90px;
  flex-shrink: 0;
}
.stat-bar__track {
  flex: 1;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}
.stat-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-bar__val {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--gold);
  min-width: 3ch;
  text-align: right;
  flex-shrink: 0;
}

/* ─── ETHOS ────────────────────────────────────────────────── */
.ethos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}
.ethos__tagline {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}
.ethos__list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }
.ethos__item { display: flex; align-items: flex-start; gap: 1rem; }
.ethos__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  flex-shrink: 0;
  padding-top: 0.15rem;
  letter-spacing: 0.03em;
}
.ethos__item p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.ethos__synonyms {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.ethos__synonyms .prompt { margin-right: 0.5rem; }
.ethos__frame {
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
}
.ethos__frame img {
  width: 100%;
  display: block;
  filter: saturate(0.65);
  transition: filter 0.4s var(--ease);
}
.ethos__frame:hover img { filter: saturate(1); }

/* ─── MEMES ────────────────────────────────────────────────── */
.memes__ticker { overflow: hidden; position: relative; }
.memes__ticker::before,
.memes__ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.memes__ticker::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.memes__ticker::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }
.memes__track {
  display: flex;
  gap: 1rem;
  animation: scroll-ticker 55s linear infinite;
  width: max-content;
  padding: 1rem 0;
}
.memes__track:hover { animation-play-state: paused; }
.memes__track img {
  height: 220px;
  width: auto;
  flex-shrink: 0;
  border: 1px solid var(--border);
  filter: saturate(0.7);
  transition: filter 0.3s var(--ease);
}
.memes__track img:hover { filter: saturate(1); }
@keyframes scroll-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── GAMES ────────────────────────────────────────────────── */
.games__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.game-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--dur) var(--ease);
}
.game-card:hover { border-color: var(--gold); }
.game-card__num  { font-family: var(--font-mono); font-size: 0.625rem; color: var(--text-dim); letter-spacing: 0.06em; }
.game-card__code { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold); letter-spacing: 0.07em; }
.game-card__img  { overflow: hidden; border: 1px solid var(--border); }
.game-card__img img {
  width: 100%;
  display: block;
  filter: saturate(0.75);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.game-card:hover .game-card__img img { transform: scale(1.04); filter: saturate(1); }
.game-card__img--art img { object-fit: cover; aspect-ratio: 4 / 3; }
.game-card__info { display: flex; flex-direction: column; gap: 0.875rem; }
.game-card__name { font-family: var(--font-display); font-size: 1.375rem; letter-spacing: 0.05em; }
.game-card__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }
.game-card__stats { display: flex; flex-direction: column; gap: 0.5rem; }

/* ─── FAQ ──────────────────────────────────────────────────── */
.faq__list { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item[open] > .faq__q { color: var(--gold); }
.faq__item[open] > .faq__q .faq__icon::after { content: '[-]'; }
.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  transition: color var(--dur) var(--ease);
  gap: 1.5rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { display: none; }
.faq__q:hover { color: var(--gold); }
.faq__q-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: inherit;
}
.faq__icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  flex-shrink: 0;
  min-width: 3ch;
  text-align: right;
}
.faq__icon::after { content: '[+]'; }
.faq__a { padding: 0 0 1.375rem; }
.faq__a p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 85ch;
}

/* ─── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.footer__copy   { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.footer__tagline{ font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-muted); }
.footer__col-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.footer__link {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  transition: color var(--dur) var(--ease);
}
.footer__link:hover { color: var(--gold); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

/* ─── SCROLL-MARGIN FOR FIXED HEADER ───────────────────────── */
.section, #hero, #about { scroll-margin-top: 80px; }

/* ─── RESPONSIVE: TABLET (≤1024px) ────────────────────────── */
@media (max-width: 1024px) {
  .collections__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── RESPONSIVE: MOBILE (≤768px) ─────────────────────────── */
@media (max-width: 768px) {
  .header__nav, .header__cta { display: none; }
  .header__burger { display: flex; }
  .header__nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 64px 0 0;
    background: var(--bg);
    padding: 2rem clamp(1.5rem, 5vw, 3rem);
    z-index: 999;
    border-top: 1px solid var(--border);
  }
  .header__nav.is-open .header__nav-list {
    flex-direction: column;
    gap: 1.75rem;
  }
  .header__nav.is-open .header__nav-link { font-size: 1rem; }
  .about__grid, .ethos__grid { grid-template-columns: 1fr; }
  .collections__grid       { grid-template-columns: 1fr; }
  .games__grid             { grid-template-columns: 1fr; }
  .footer__inner           { grid-template-columns: 1fr; gap: 2rem; }
  .hero__actions           { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn      { width: 100%; max-width: 280px; text-align: center; }
  .stat-bar__label         { min-width: 80px; font-size: 0.5rem; }
}

/* ─── RESPONSIVE: SMALL (≤480px) ──────────────────────────── */
@media (max-width: 480px) {
  .loader__enter { font-size: 0.75rem; }
}

/* ─── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .memes__track { animation: none; }
  html { scroll-behavior: auto; }
}
