/* ============================================================
   MJoy Games — styles.css
   Structure:
   1. CSS Variables & Reset
   2. Utilities
   3. Buttons
   4. Navbar
   5. Hero
   6. Ticker
   7. Games Section
   8. About Section
   9. Contact Section
   10. Footer
   11. Animations & Reveal
   12. Responsive
   ============================================================ */

/* ── 1. CSS Variables & Reset ─────────────────────────────── */
:root {
  /* Colors */
  --color-bg:        #08080F;
  --color-bg-card:   rgba(255, 255, 255, 0.03);
  --color-border:    rgba(255, 255, 255, 0.08);
  --color-text:      #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.45);
  --color-accent:    #FF6B35;
  --color-accent-glow: rgba(255, 107, 53, 0.35);
  --color-accent-dim:  rgba(255, 107, 53, 0.08);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Syne', sans-serif;

  /* Spacing */
  --section-gap: 8rem;
  --container:   1200px;
  --radius-card: 1.5rem;
  --radius-btn:  0.75rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.6s;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ── 2. Utilities ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: var(--section-gap);
}

.section__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.section__desc {
  margin-top: 1rem;
  color: var(--color-text-muted);
  max-width: 40rem;
  font-size: 1rem;
}

.section__header {
  margin-bottom: 4rem;
}

/* ── 3. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  padding: 0.625rem 1.25rem;
}

.btn:hover  { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }

.btn--lg {
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: 1rem;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 28px var(--color-accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 0 44px var(--color-accent-glow);
}

.btn--ghost {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--color-text);
}

.btn--play {
  background: var(--card-color, var(--color-accent));
  color: #fff;
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-color, var(--color-accent)) 50%, transparent);
}

.btn--locked {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-btn);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: default;
}

/* ── 4. Navbar ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.is-scrolled .navbar__inner {
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-radius: 1rem;
  padding: 0.75rem 1.5rem;
  transition: background 0.3s ease, border 0.3s ease;
  border: 1px solid transparent;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.navbar__logo-icon { font-size: 1.3rem; }
.navbar__logo-text strong { color: var(--color-accent); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar__link {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
  transition: color 0.2s;
}

.navbar__link:hover { color: var(--color-text); }

.navbar__cta { display: none; }

/* Burger */
.navbar__burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.navbar__drawer {
  background: rgba(12, 12, 22, 0.98);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  margin: 0.5rem 1.5rem;
  padding: 2rem 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.navbar__drawer.is-open { display: flex; }

.navbar__drawer-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.navbar__drawer-links .navbar__link {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── 5. Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

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

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hero__glow--orange {
  top: 20%;
  left: 20%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,107,53,0.25), transparent 70%);
  animation: glowPulse 6s ease-in-out infinite;
}

.hero__glow--purple {
  bottom: 15%;
  right: 15%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
  animation: glowPulse 8s ease-in-out infinite reverse;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.15); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,53,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,53,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  border: 1px solid rgba(255,107,53,0.25);
  background: rgba(255,107,53,0.08);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero__title-outline {
  -webkit-text-stroke: 2px var(--color-accent);
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 38rem;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.2);
  animation: scrollBounce 2.5s ease-in-out infinite;
}

.hero__scroll-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── 6. Ticker ────────────────────────────────────────────── */
.ticker {
  overflow: hidden;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 107, 53, 0.04);
}

.ticker--subtle {
  background: transparent;
}

.ticker__track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: tickerScroll 25s linear infinite;
}

.ticker--subtle .ticker__track {
  animation-duration: 18s;
  gap: 2rem;
}

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

.ticker__track:hover { animation-play-state: paused; }

.ticker__item {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  color: rgba(255, 107, 53, 0.55);
  letter-spacing: 0.05em;
}

.ticker__item--tag {
  padding: 0.35rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ── 7. Games Section ─────────────────────────────────────── */
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Game card */
.game-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: linear-gradient(135deg,    color-mix(in srgb, var(--card-from, #1a1a2e) 100%, transparent),    color-mix(in srgb, var(--card-via, #16213e) 100%, transparent),    color-mix(in srgb, var(--card-to, #0f3460) 100%, transparent)  );
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
  cursor: default;
  -webkit-transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
  -moz-transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
  -ms-transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
  -o-transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.14);
}

.game-card:hover .game-card__glow {
  opacity: 0.3;
}

.game-card--available { cursor: pointer; }

/* Glow overlay */
.game-card__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, var(--card-color, var(--color-accent)), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.game-card__content {
  position: relative;
  z-index: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: unset;
  justify-content: space-between;
}

.game-card__media {
  width: 100%;
  height: 300px;
  border-radius: 1.5rem 1.5rem 0 0;
  position: relative;
  align-self: flex-start;
  -webkit-border-radius: 1.5rem 1.5rem 0 0;
  -moz-border-radius: 1.5rem 1.5rem 0 0;
  -ms-border-radius: 1.5rem 1.5rem 0 0;
  -o-border-radius: 1.5rem 1.5rem 0 0;
}

.game-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card:not(.game-card--available) .game-card__image {
  object-fit: none;
}

.game-card__top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 1.2rem;
  bottom: unset;
  z-index: 2;
}

.game-card__genre {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: color-mix(in srgb, var(--card-accent, #fff) 0%, #ffffff);
  background: color-mix(in srgb, var(--card-accent, #000000) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent, #fff) 25%, transparent);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.game-card__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.game-card__status--live { color: #4ade80;}

.game-card__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

.game-card__emoji {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 16px rgba(255,255,255,0.2));
  user-select: none;
}

.game-card__body { margin-top: auto; padding: 1.25rem 1.5rem 1.5rem;}

.game-card__name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.game-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ── 8. About Section ─────────────────────────────────────── */
.about {
  background: rgba(255, 107, 53, 0.025);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__body {
  color: var(--color-text-muted);
  margin-top: 1.25rem;
  line-height: 1.8;
}

.about__body strong { color: var(--color-text); }

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.stat-card:hover { border-color: rgba(255, 107, 53, 0.3); }

.stat-card__value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.stat-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ── 9. Contact Section ───────────────────────────────────── */
.contact__inner {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.contact__title { margin-bottom: 1rem; }

.contact__desc {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.contact__btn {
  box-shadow: 0 0 48px rgba(255, 107, 53, 0.4);
}

/* ── 10. Footer ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.2);
}

.footer__link {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.2);
  transition: color 0.2s;
}

.footer__link:hover { color: rgba(255,255,255,0.6); }

/* ── 11. Animations & Reveal ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 12. Responsive ───────────────────────────────────────── */
@media (min-width: 768px) {
  .navbar__cta    { display: inline-flex; }
  .navbar__burger { display: none; }
  .navbar__links  { display: flex; }
}

@media (max-width: 767px) {
  .navbar__links { display: none; }

  :root { --section-gap: 5rem; }

  .about__grid  { grid-template-columns: 1fr; gap: 3rem; }
  .about__stats { grid-template-columns: 1fr 1fr; }

  .hero__title { line-height: 1; }

  .games__grid { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .about__stats  { grid-template-columns: 1fr; }
}
