/*
  Auteur : @edsnicolas
  Feuille de style principale pour THE_GHOST_GAMING
*/

:root {
  --bg: #05060d;
  --bg-soft: #0b0f1c;
  --bg-card: rgba(14, 18, 34, 0.76);
  --text: #f5f7ff;
  --muted: #a7b0d8;
  --blue: #00d5ff;
  --violet: #8f3cff;
  --red: #ff315d;
  --line: rgba(255, 255, 255, 0.12);
  --shadow-blue: 0 0 32px rgba(0, 213, 255, 0.28);
  --shadow-violet: 0 0 34px rgba(143, 60, 255, 0.28);
  --radius: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.site-bg,
#particle-canvas,
.cyber-grid,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site-bg {
  z-index: -3;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 213, 255, 0.16), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(143, 60, 255, 0.18), transparent 34%),
    radial-gradient(circle at 70% 80%, rgba(255, 49, 93, 0.10), transparent 30%),
    linear-gradient(135deg, #03040a 0%, #090c18 52%, #05060d 100%);
}

#particle-canvas {
  z-index: -1;
  opacity: 0.9;
}

.cyber-grid {
  z-index: -2;
  background-image:
    linear-gradient(rgba(0, 213, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 60, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 16%, black 78%, transparent 100%);
  animation: gridMove 18s linear infinite;
}

.scanline {
  z-index: 0;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.045), transparent);
  height: 18vh;
  animation: scan 7s ease-in-out infinite;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 110px 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.header.scrolled {
  border-color: var(--line);
  background: rgba(5, 6, 13, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 36px, 1280px);
  min-height: 82px;
  margin-inline: auto;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(0, 213, 255, 0.4);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(0, 213, 255, 0.18), rgba(143, 60, 255, 0.16)),
    rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-blue);
  color: var(--text);
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo img[src$="logo.png"] {
  padding: 8px;
}

.brand-text,
h1,
h2,
h3,
.eyebrow {
  font-family: "Orbitron", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.brand-text {
  overflow: hidden;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-menu a {
  position: relative;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-menu a:not(.discord-btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  box-shadow: var(--shadow-blue);
  transition: width 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--text);
  text-shadow: 0 0 18px rgba(0, 213, 255, 0.55);
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn,
.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible,
.discord-btn:hover,
.discord-btn:focus-visible {
  transform: translateY(-3px);
}

.btn-primary,
.discord-btn {
  border-color: rgba(0, 213, 255, 0.5);
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #05060d !important;
  box-shadow: 0 0 28px rgba(0, 213, 255, 0.34), 0 0 44px rgba(143, 60, 255, 0.22);
}

.btn-primary:hover,
.discord-btn:hover,
.btn-primary:focus-visible,
.discord-btn:focus-visible {
  box-shadow: 0 0 36px rgba(0, 213, 255, 0.52), 0 0 64px rgba(143, 60, 255, 0.38);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.discord-btn.small {
  min-height: 42px;
  padding-inline: 18px;
  font-size: 0.95rem;
}

.hero {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 82px);
  padding-top: 72px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 13% 7%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 42px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 0 70px rgba(0, 213, 255, 0.06);
}

.hero-content {
  max-width: 980px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 213, 255, 0.72);
}

.hero-title {
  display: grid;
  margin-bottom: 22px;
  font-size: clamp(3rem, 10vw, 8.2rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(0, 213, 255, 0.36), 0 0 54px rgba(143, 60, 255, 0.32);
  animation: titlePulse 4s ease-in-out infinite;
}

.hero-title span:last-child {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(245, 247, 255, 0.92);
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 48px auto 0;
}

.hero-stats article {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
}

.hero-stats strong {
  display: block;
  color: var(--text);
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 1.7rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.5;
  animation: floatGlow 9s ease-in-out infinite;
}

.hero-glow-blue {
  top: 22%;
  left: 12%;
  background: var(--blue);
}

.hero-glow-violet {
  right: 12%;
  bottom: 18%;
  background: var(--violet);
  animation-delay: -3s;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading h2,
.join-card h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.section-heading p:not(.eyebrow),
.join-card p {
  color: var(--muted);
  font-size: 1.1rem;
}

.feature-grid,
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card,
.game-card,
.timeline-item,
.voice-panel,
.join-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.feature-card,
.game-card,
.timeline-item {
  padding: 26px;
}

.feature-card::before,
.game-card::before,
.timeline-item::before,
.voice-panel::before,
.join-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(0, 213, 255, 0.16), rgba(143, 60, 255, 0.1), rgba(255, 49, 93, 0.08));
  transition: opacity 0.25s ease;
}

.feature-card:hover,
.game-card:hover,
.timeline-item:hover {
  border-color: rgba(0, 213, 255, 0.46);
  box-shadow: var(--shadow-blue), 0 24px 70px rgba(0, 0, 0, 0.32);
  transform: translateY(-8px);
}

.feature-card,
.game-card,
.timeline-item {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover::before,
.game-card:hover::before,
.timeline-item:hover::before,
.voice-panel:hover::before,
.join-card:hover::before {
  opacity: 1;
}

.feature-card > *,
.game-card > *,
.timeline-item > *,
.voice-panel > *,
.join-card > * {
  position: relative;
  z-index: 1;
}

.feature-icon,
.game-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 213, 255, 0.35);
  border-radius: 18px;
  background: rgba(0, 213, 255, 0.08);
  box-shadow: inset 0 0 26px rgba(0, 213, 255, 0.12);
  font-size: 1.7rem;
}

.feature-card h3,
.game-card h3,
.timeline-item h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.feature-card p,
.game-card p,
.timeline-item p {
  color: var(--muted);
  font-size: 1rem;
}

.voice-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: 42px;
}

.voice-panel {
  padding: 24px;
}

.voice-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 0.95rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #39ff88;
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.8);
}

.voice-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.voice-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.voice-list li:hover {
  border-color: rgba(143, 60, 255, 0.52);
  background: rgba(143, 60, 255, 0.12);
  transform: translateX(6px);
}

.voice-list small {
  color: var(--muted);
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.timeline-item span {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--blue);
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.join-card {
  padding: clamp(34px, 7vw, 72px);
  text-align: center;
}

.join-card p {
  max-width: 680px;
  margin: 0 auto 28px;
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 6, 13, 0.72);
  backdrop-filter: blur(16px);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 0;
}

.footer strong {
  font-family: "Orbitron", system-ui, sans-serif;
}

.footer p,
.footer span,
.footer a {
  color: var(--muted);
  font-size: 1rem;
}

.footer a:hover {
  color: var(--blue);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes gridMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(54px);
  }
}

@keyframes scan {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  45%,
  55% {
    opacity: 1;
  }
  100% {
    transform: translateY(620%);
    opacity: 0;
  }
}

@keyframes titlePulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(0, 213, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(0, 213, 255, 0.28));
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -18px, 0) scale(1.08);
  }
}

@media (max-width: 1060px) {
  .feature-grid,
  .game-grid,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .voice-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 17px;
  }

  .navbar {
    min-height: 72px;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 61;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 24px;
    padding: 90px 28px;
    background: rgba(5, 6, 13, 0.94);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-menu a {
    font-size: 1.35rem;
  }

  .discord-btn.small {
    min-height: 52px;
    padding-inline: 24px;
    font-size: 1rem;
  }

  .section {
    padding: 84px 0;
  }

  .hero {
    min-height: calc(100vh - 72px);
  }

  .hero::before {
    inset: 10% 20px;
    border-radius: 28px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .brand-text {
    max-width: 190px;
  }

  .hero-title {
    font-size: clamp(2.7rem, 17vw, 5.2rem);
  }

  .hero-actions,
  .hero-actions .btn,
  .join-card .btn {
    width: 100%;
  }

  .feature-grid,
  .game-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .voice-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .join-card {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
