/* Besba Games — studio site
   Dark, magical, mobile-first. All paths relative to this file. */

:root {
  --bg: #080510;
  --bg-deep: #05030a;
  --bg-raised: #12091c;
  --bg-card: #171024;
  --bg-card-hover: #1e1530;
  --line: rgba(224, 176, 74, 0.2);
  --line-strong: rgba(224, 176, 74, 0.45);
  --gold: #e0b04a;
  --gold-bright: #f6e0a2;
  --gold-dim: #a87c2a;
  --purple: #9b7dff;
  --purple-deep: #5a3dc8;
  --text: #f4eefc;
  --text-soft: #c9bdd8;
  --text-mute: #90849e;
  --fire: #ff7a3d;
  --water: #5cbcff;
  --earth: #e8c547;
  --air: #7dffd0;
  --radius: 18px;
  --header-h: 4.25rem;
  --max: 70rem;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel.woff2") format("woff2-variations"),
       url("../fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2-variations"),
       url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(90, 61, 200, 0.28), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 20%, rgba(224, 176, 74, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(90, 61, 200, 0.12), transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--gold-bright); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: #1a0e00;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
}
.skip:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 5, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.brand:hover { color: var(--gold-bright); }

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  position: relative;
  flex: 0 0 auto;
}
.brand-mark .orb {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.brand-mark .fire  { top: 0; left: 50%; transform: translateX(-50%); color: var(--fire);  background: var(--fire); }
.brand-mark .water { left: 0; top: 50%; transform: translateY(-50%); color: var(--water); background: var(--water); }
.brand-mark .air   { right: 0; top: 50%; transform: translateY(-50%); color: var(--air);   background: var(--air); }
.brand-mark .earth { bottom: 0; left: 50%; transform: translateX(-50%); color: var(--earth); background: var(--earth); }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
#nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
}

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem 1.1rem;
  background: rgba(10, 6, 18, 0.96);
  border-bottom: 1px solid var(--line);
}

#nav-toggle:checked ~ .header-inner .site-nav,
#nav-toggle:focus-visible ~ .header-inner .site-nav { display: flex; }
#nav-toggle:checked ~ .header-inner .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle:checked ~ .header-inner .nav-toggle span:nth-child(2) { opacity: 0; }
#nav-toggle:checked ~ .header-inner .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-bright);
  background: rgba(224, 176, 74, 0.08);
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 650;
}
.lang a { color: var(--text-mute); text-decoration: none; }
.lang a[aria-current="true"],
.lang a[aria-current="page"] { color: var(--gold-bright); }
.lang a:hover { color: var(--gold-bright); }
.lang .sep { color: var(--text-mute); opacity: 0.5; }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav a { padding: 0.45rem 0.75rem; font-size: 0.92rem; }
  .lang { padding: 0.45rem 0 0.45rem 0.9rem; margin-left: 0.4rem; border-left: 1px solid var(--line); }
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; }
.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4.5rem 0 5rem;
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url("../assets/images/hero-bg.webp") center / cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 5, 16, 0.55) 0%, rgba(8, 5, 16, 0.72) 45%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(8, 5, 16, 0.5) 70%);
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff6d4 0%, #e0b04a 52%, #b07a20 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(224, 176, 74, 0.28));
}

.orbs-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.35rem 0 1.5rem;
}
.orbs-line::before,
.orbs-line::after {
  content: "";
  width: min(28vw, 8.5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.orbs-line::after { background: linear-gradient(90deg, var(--gold), transparent); }
.orbs-line i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.orbs-line .fire  { background: var(--fire);  color: var(--fire); }
.orbs-line .water { background: var(--water); color: var(--water); }
.orbs-line .earth { background: var(--earth); color: var(--earth); }
.orbs-line .air   { background: var(--air);   color: var(--air); }

.tagline {
  margin: 0 auto 2rem;
  max-width: 34rem;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  font-weight: 400;
  line-height: 1.55;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(224, 176, 74, 0.18), rgba(224, 176, 74, 0.06));
  color: var(--gold-bright);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s;
}
.btn:hover {
  color: #1a0e00;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}
.btn-solid {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a0e00;
  border-color: transparent;
}
.btn-solid:hover {
  filter: brightness(1.06);
  color: #1a0e00;
}
.btn-ghost {
  background: transparent;
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0 5rem;
}
.section-head {
  text-align: center;
  margin-bottom: 2.4rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.section-head p {
  margin: 0.7rem auto 0;
  max-width: 36rem;
  color: var(--text-mute);
}

/* ---------- Game cards ---------- */
.game-grid {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 720px) {
  .game-grid { grid-template-columns: 1fr 1fr; }
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
a.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  color: inherit;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #10081a;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1;
}
.card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.card-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  flex: 1;
}
.card-cta {
  margin-top: 0.4rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 125, 255, 0.45);
  background: rgba(155, 125, 255, 0.12);
  color: #d4c8ff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-soon {
  border-color: var(--line);
  background: rgba(224, 176, 74, 0.08);
  color: var(--gold);
}

/* Upcoming placeholder */
.card-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(224, 176, 74, 0.1), transparent 60%),
    linear-gradient(180deg, #1a1028, #0e0818);
}
.card-placeholder svg {
  width: min(46%, 9rem);
  height: auto;
  opacity: 0.85;
}
.game-card.is-soon {
  cursor: default;
}

/* ---------- Game page ---------- */
.game-hero {
  position: relative;
  isolation: isolate;
  padding: 0 0 2.5rem;
}
.game-hero-art {
  position: relative;
  overflow: hidden;
  background: #10081a;
  aspect-ratio: 1024 / 500;
  max-height: 32rem;
}
.game-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
@media (max-width: 719px) {
  .game-hero-art {
    aspect-ratio: 16 / 11;
    min-height: 17.5rem;
    max-height: none;
  }
  .game-intro { margin-top: 0; padding-top: 1.25rem; }
}
.game-hero-art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.game-intro {
  margin-top: -3.2rem;
  position: relative;
}
.game-icon {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 1.15rem;
  border: 2px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: #1a0e3a;
  margin-bottom: 1rem;
}
.game-intro h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--gold-bright);
}
.lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  margin: 0.9rem 0 1.3rem;
  max-width: 40rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.1rem 0 0;
}

.prose {
  max-width: 42rem;
}
.prose p { color: var(--text-soft); margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.features {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .features { grid-template-columns: 1fr 1fr; }
}
.features li {
  position: relative;
  padding: 1rem 1.05rem 1rem 2.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-soft);
}
.features li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.3rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .gallery { grid-template-columns: 1fr 1fr 1fr; }
}
.gallery a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #10081a;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.gallery a:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: rgba(5, 3, 10, 0.92);
  padding: 1rem;
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(100%, 1200px);
  max-height: calc(100vh - 5rem);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.lightbox button {
  position: absolute;
  background: rgba(20, 12, 32, 0.8);
  color: var(--gold-bright);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: rgba(224, 176, 74, 0.18); }

/* ---------- Legal / contact ---------- */
.page-hero {
  padding: 3rem 0 1.5rem;
}
.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.page-hero .meta {
  margin: 0.6rem 0 0;
  color: var(--text-mute);
  font-size: 0.92rem;
}

.legal {
  max-width: 42rem;
  padding-bottom: 4rem;
}
.legal h2 {
  margin: 2rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.legal p { color: var(--text-soft); margin: 0 0 0.9rem; }

.contact-card {
  max-width: 32rem;
  margin: 0 0 4.5rem;
  padding: 1.6rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card p { color: var(--text-soft); margin: 0 0 1rem; }
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-bright);
  word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.4rem;
  background: var(--bg-deep);
}
.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer p { margin: 0; color: var(--text-mute); font-size: 0.9rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.footer-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--gold-bright); }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Animations & motion ---------- */
.hero {
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero-glow .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: orb-drift 22s ease-in-out infinite;
}
.hero-glow .fire  { width: 22rem; height: 22rem; background: #ff7a3d; top: 8%;  left: -6%;  animation-duration: 24s; }
.hero-glow .water { width: 18rem; height: 18rem; background: #5cbcff; top: 12%; right: -4%; animation-duration: 28s; animation-delay: -6s; }
.hero-glow .earth { width: 16rem; height: 16rem; background: #e8c547; bottom: 6%; left: 18%; animation-duration: 26s; animation-delay: -12s; }
.hero-glow .air   { width: 20rem; height: 20rem; background: #7dffd0; bottom: 10%; right: 10%; animation-duration: 30s; animation-delay: -4s; }

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  35%      { transform: translate(4%, -6%) scale(1.12); }
  70%      { transform: translate(-5%, 5%) scale(0.92); }
}

.magic-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.hero h1 {
  background-size: 220% 220%;
  animation: title-shine 9s ease-in-out infinite;
}
@keyframes title-shine {
  0%, 100% { background-position: 50% 0%; filter: drop-shadow(0 0 24px rgba(224, 176, 74, 0.22)); }
  50%      { background-position: 50% 100%; filter: drop-shadow(0 0 36px rgba(224, 176, 74, 0.45)); }
}

.orbs-line i {
  animation: pulse-orb 3.6s ease-in-out infinite;
}
.orbs-line .water { animation-delay: 0.4s; }
.orbs-line .earth { animation-delay: 0.8s; }
.orbs-line .air   { animation-delay: 1.2s; }
@keyframes pulse-orb {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.45); opacity: 1; }
}

.brand-mark .orb {
  animation: pulse-orb 3.2s ease-in-out infinite;
}
.brand-mark .water { animation-delay: 0.4s; }
.brand-mark .air   { animation-delay: 0.8s; }
.brand-mark .earth { animation-delay: 1.2s; }

/* Scroll reveal — only when JS is on, so no-JS stays visible */
html.js .reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Card hover glow + tilt */
.game-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  will-change: transform;
}
.game-card .card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 240, 200, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.game-card.is-hot .card-shine,
a.game-card:hover .card-shine { opacity: 1; }
a.game-card:hover,
.game-card.is-hot {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(224, 176, 74, 0.2),
    0 12px 40px rgba(155, 125, 255, 0.12),
    0 0 48px rgba(224, 176, 74, 0.16);
}
.game-card .card-media,
.game-card .card-body { position: relative; z-index: 1; }

/* Element row on game page */
.elements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0.2rem;
  padding: 0;
  list-style: none;
}
.elements li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 12, 32, 0.6);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.elements i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.elements .fire  { color: var(--fire);  background: var(--fire); }
.elements .water { color: var(--water); background: var(--water); }
.elements .earth { color: var(--earth); background: var(--earth); }
.elements .air   { color: var(--air);   background: var(--air); }

/* Feature bullets cycle elemental colors */
.features li:nth-child(4n+1)::before { background: var(--fire);  box-shadow: 0 0 8px var(--fire); }
.features li:nth-child(4n+2)::before { background: var(--water); box-shadow: 0 0 8px var(--water); }
.features li:nth-child(4n+3)::before { background: var(--earth); box-shadow: 0 0 8px var(--earth); }
.features li:nth-child(4n+4)::before { background: var(--air);   box-shadow: 0 0 8px var(--air); }

/* Game hero particles sit above the art, below the intro */
.game-hero {
  overflow: hidden;
}
.game-hero-art .magic-canvas { z-index: 1; }
.game-intro { z-index: 2; }

/* Lightbox fade / scale */
.lightbox {
  display: grid;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  transform: scale(0.96);
  opacity: 0.4;
  transition: transform 0.4s var(--ease), opacity 0.35s var(--ease);
}
.lightbox.is-open img.is-ready {
  transform: scale(1);
  opacity: 1;
}
.lightbox button {
  transition: background 0.2s, transform 0.2s;
}
.lightbox button:hover { transform: scale(1.06); }
.lightbox-close:hover { transform: none; }

/* Subtle header gold line shimmer */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--fire) 18%, var(--gold) 50%, var(--air) 82%, transparent 100%);
  background-size: 200% 100%;
  opacity: 0.55;
  animation: line-slide 10s linear infinite;
}
@keyframes line-slide {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow .glow,
  .hero h1,
  .orbs-line i,
  .brand-mark .orb,
  .site-header::after {
    animation: none !important;
  }
  .hero-glow .glow { opacity: 0.28; }
  .magic-canvas { display: none; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .game-card {
    transform: none !important;
  }
}
