/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #161616;
  --bg-card: #1e1e1e;
  --white: #ffffff;
  --muted: #888888;
  --accent: #a2d80c;
  --accent-dark: #8bbf08;
  --radius-card: 16px;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Space Grotesk', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* ── Keyframes ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  background: transparent;
  transition: background 0.3s, backdrop-filter 0.3s;
  animation: fadeIn 0.7s ease both;
}

.nav.scrolled {
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav__links a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav__links a:hover { opacity: 1; color: var(--accent); }
.nav__links a:hover::after { width: 100%; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 48px 80px;
  background-image: url('assets/cover.webp');
  background-size: cover;
  background-position: top center;
  background-attachment: scroll;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(22,22,22,0.72) 0%, rgba(22,22,22,0.82) 60%, rgba(22,22,22,1) 100%),
              radial-gradient(ellipse 80% 60% at 50% 40%, rgba(162, 216, 12, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__characters {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__char {
  position: absolute;
  width: 160px;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.5));
}

.hero__char--left {
  bottom: 22%;
  left: calc(50% - clamp(170px, 31vw, 360px) - 160px + 50px);
  animation: floatLeft 6s ease-in-out infinite, fadeIn 0.9s ease 0.5s both;
}

.hero__char--right {
  top: 22%;
  right: calc(50% - clamp(170px, 31vw, 360px) - 160px + 50px);
  animation: floatRight 7s ease-in-out infinite, fadeIn 0.9s ease 0.7s both;
}

@keyframes floatLeft {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-18px) rotate(2deg); }
}

@keyframes floatRight {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50%       { transform: translateY(-22px) rotate(-2deg); }
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 2;
  animation: fadeSlideUp 1s cubic-bezier(0.23, 1, 0.32, 1) 0.15s both;
}

/* ── Three.js logo canvas ── */
.logo3d-canvas {
  width: clamp(340px, 62vw, 720px);
  max-width: calc(100vw - 32px);
  aspect-ratio: 238 / 120;
  margin: 0 auto;
  display: block;
}
.logo3d-canvas canvas {
  display: block;
  width:  100% !important;
  height: 100% !important;
}

.hero__sub {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ── Ticker ── */
.ticker-scene {
  position: relative;
  z-index: 10;
  margin: 0;
  perspective: 900px;
  overflow: visible;
}

.ticker {
  position: relative;
  overflow: hidden;
  transform: rotate(-2.5deg) scaleX(1.08) rotateX(3deg);
  transform-style: preserve-3d;
  margin: 0 -8%;
  padding: 18px 0;
  background: transparent;
}

.ticker__track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 64s linear infinite;
  width: max-content;
  position: relative;
  z-index: 4;
}

.ticker__track span {
  font-family: var(--font-body);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0 4px;
  color: #7169c0;
  text-shadow: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.bolt {
  display: inline-block;
  width: 22px;
  height: 34px;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Games ── */
.games {
  padding: 16px 48px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-body);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 24px;
}

.games__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── Game Card ── */
.game-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s ease;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}

.game-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.game-card:hover .game-card__bg {
  transform: scale(1.06);
}

.game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.25) 40%,
    rgba(0,0,0,0.75) 100%
  );
  transition: opacity 0.3s;
}

.game-card:hover .game-card__overlay {
  opacity: 0.85;
}

.game-card__content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-card__tags {
  display: flex;
  gap: 8px;
}

.game-card__status {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  width: fit-content;
}

.game-card__status--progress {
  background: rgba(162, 216, 12, 0.18);
  color: var(--accent);
  border: 1px solid rgba(162, 216, 12, 0.4);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

a.game-card__status--progress:hover {
  background: rgba(162, 216, 12, 0.32);
  border-color: rgba(162, 216, 12, 0.7);
  cursor: pointer;
}

.game-card__status--soon {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}

.game-card__title {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--white);
  white-space: nowrap;
}

/* ── Footer ── */
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 48px 48px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer__logo img {
  height: 36px;
  width: auto;
}

.footer__links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.footer__links a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.footer__links a:hover { opacity: 1; color: var(--accent); }

.footer__divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 28px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
}

.footer__copy {
  font-size: 14px;
  color: var(--muted);
  flex: 1 1 100%;
}

.footer__info {
  font-size: 14px;
  color: var(--muted);
}

.footer__email {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__email:hover { color: var(--accent); }

/* ── Scroll reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (min-width: 769px) {
  .hero { padding-top: 156px; padding-bottom: 104px; min-height: 0; }
  .logo3d-canvas { width: clamp(170px, 40vw, 480px); }
}

@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 14px; }

  .hero { padding: 160px 24px 60px; min-height: auto; }

  .games { padding: 80px 24px 60px; }
  .games__grid { grid-template-columns: 1fr; gap: 16px; }

  .footer { padding: 48px 24px 36px; }
  .footer__top { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 480px) {
  .ticker__track span { font-size: 28px; }
}

/* ── Nav scroll script ── */
