/* =========================================================
   Gamers4Life — Design System
   ========================================================= */

:root {
  --bg: #0a0d14;
  --bg-alt: #0f1420;
  --surface: #151b28;
  --surface-2: #1b2333;
  --border: #262f42;
  --text: #eef1f8;
  --text-dim: #9aa5bd;
  --text-faint: #6b7488;

  --accent: #7c5cff;
  --accent-2: #22d3c9;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #22d3c9 100%);
  --danger: #ff5470;
  --success: #2ecc71;
  --warning: #ffb020;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(124, 92, 255, 0.25), 0 20px 40px -18px rgba(124, 92, 255, 0.35);

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0a0d14; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-dim); }
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
ul { padding: 0; margin: 0; list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent-grad);
  display: inline-block;
  border-radius: 2px;
  animation: eyebrow-pulse 2.4s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.section {
  padding: 96px 0;
  position: relative;
}
.section--alt { background: var(--bg-alt); }
.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent-grad);
  color: #0a0d14;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); color: #0a0d14; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #0a0d14;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.brand-name span { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a.active,
.nav-links a:hover { color: var(--text); }
.nav-links__cloud { display: none; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links__cloud { display: block; color: var(--accent-2); }
  .nav-actions .btn-ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #05070c;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,13,20,0.6) 0%, rgba(10,13,20,0.88) 78%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(10,13,20,0.55) 0%, rgba(10,13,20,0.15) 60%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 0 90px;
  text-align: center;
}
.hero-content .eyebrow { color: var(--accent-2); justify-content: center; }
.hero-content h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  margin-bottom: 20px;
}
.hero-content h1 .grad {
  background: linear-gradient(90deg, #7c5cff, #22d3c9, #7c5cff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 5s linear infinite;
}
@keyframes text-shimmer {
  to { background-position: -200% center; }
}
.hero-content p {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 auto 34px;
  max-width: 520px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-cta .btn-primary { animation: cta-glow 2.6s ease-in-out infinite; }
.hero-cta .btn-primary:hover { animation-play-state: paused; }
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 8px 20px -8px rgba(124,92,255,0.35); }
  50% { box-shadow: 0 0 28px 8px rgba(124,92,255,0.4), 0 8px 20px -8px rgba(34,211,201,0.35); }
}
.hero-dots {
  position: absolute;
  right: 32px; bottom: 32px;
  z-index: 2;
  display: flex; gap: 8px;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  padding: 0;
}
.hero-dots button.active { background: var(--accent-2); width: 22px; border-radius: 5px; }

/* ---------- News ticker ---------- */
.ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-label {
  flex-shrink: 0;
  background: var(--accent-grad);
  color: #0a0d14;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 24px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a0d14;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(10,13,20,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(10,13,20,0); }
  100% { box-shadow: 0 0 0 0 rgba(10,13,20,0); }
}
.ticker-track-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: ticker 24s linear infinite;
  padding: 14px 0;
  width: max-content;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item { display: inline-flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 14px; }
.tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent-2);
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,92,255,0.5);
  box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,255,0.12), 0 24px 50px -18px rgba(124,92,255,0.4);
}

.member-card { text-align: center; padding-bottom: 28px; }
.member-photo {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: filter .3s ease;
}
.card:hover .member-photo { filter: brightness(1.12) saturate(1.15); }
.member-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,13,20,0.9) 100%);
}
.member-card h5 { margin: 22px 0 4px; font-size: 18px; }
.member-card .role { color: var(--accent-2); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.member-card.open {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px;
  border-style: dashed;
}
.avatar-placeholder {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--text-faint);
  margin-bottom: 18px;
}

.game-card { padding: 26px; text-align: center; display: flex; flex-direction: column; }
.game-thumb {
  height: 170px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.game-thumb-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .5s ease;
}
.game-card:hover .game-thumb-bg { transform: scale(1.08); }
.game-badge {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent-grad);
  color: #0a0d14;
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.game-card h4 { font-size: 20px; margin-bottom: 10px; }
.game-card p { font-size: 14.5px; margin: 0 0 18px; flex-grow: 1; }
.game-card .btn { align-self: center; }

.feature-card { padding: 30px 26px; text-align: center; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #0a0d14;
  margin: 0 auto 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h4 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface);
  background-image:
    radial-gradient(ellipse at top left, rgba(124,92,255,0.18), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(34,211,201,0.15), transparent 55%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 14px; }
.cta-band p { max-width: 520px; margin: 0 auto 30px; }

/* ---------- Page header (subpages) ---------- */
.page-header {
  padding: 150px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(124,92,255,0.15), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.page-header .eyebrow { justify-content: center; }
.page-header h1 { font-size: clamp(30px, 5vw, 46px); }
.page-header p { max-width: 560px; margin: 12px auto 0; }

/* ---------- Content blocks (about / rules) ---------- */
.prose {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.prose h3 { font-size: 20px; margin-top: 40px; }
.prose p, .prose li { color: var(--text-dim); font-size: 15.5px; }
.prose ul {
  list-style: none;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prose li { position: relative; }
.prose li::before {
  content: "";
  display: block;
  width: 28px; height: 2px;
  margin: 0 auto 10px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.rule-list {
  counter-reset: rule;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .rule-list { grid-template-columns: 1fr; }
}
.rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.rule-num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent-2);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rule-body h4 { font-size: 16px; margin-bottom: 6px; }
.rule-body p { margin: 0; font-size: 14.5px; }

/* ---------- Legal pages ---------- */
.legal-note {
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid rgba(255, 176, 32, 0.3);
  color: #ffcf7a;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 32px;
}
.legal-placeholder h3:first-of-type { margin-top: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 900px; margin: 0 auto; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  padding: 34px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.contact-card .feature-icon { margin: 0 auto 4px; }
.contact-card h4 { font-size: 18px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  text-align: center;
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr; gap: 36px; } }
.footer-brand { display: flex; flex-direction: column; align-items: center; }
.footer-brand .brand { justify-content: center; }
.footer-brand p { max-width: 320px; font-size: 14.5px; text-align: center; }
.footer-col h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-col a { color: var(--text-dim); font-size: 14.5px; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text-faint);
}

.social-row { display: flex; gap: 12px; justify-content: center; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}
.social-row a:hover { border-color: var(--accent); color: var(--accent-2); }

/* ---------- Scroll-reveal ----------
   Progressive enhancement: content only hides behind JS + motion checks
   (html.js is set by an inline script in <head>), so it stays fully
   visible if JavaScript fails to load or never runs. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
  }
  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Utility ---------- */
.section-title-standalone {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* ---------- Scrollbar polish ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border); }
