/* SpaceNew */

:root {
  --bg: #0b0d12;
  --bg-elevated: #11141c;
  --bg-card: #161a26;

  --blue: #5EA4FF;
  --blue-light: #93bfff;
  --blue-dark: #3D8AE8;
  --blue-muted: rgba(94, 164, 255, 0.07);

  --gold: #d4a934;
  --gold-light: #e0be5a;

  --text: #cdd1dc;
  --text-muted: rgba(205, 209, 220, 0.4);
  --text-dim: rgba(205, 209, 220, 0.14);

  --green: #34a85a;
  --red: #c24040;

  --max-w: 1200px;
  --nav-h: 60px;
  --radius: 6px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; border: none; cursor: pointer; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Stars */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.starfield::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 50px 80px, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 200px 200px, rgba(94,164,255,0.35), transparent),
    radial-gradient(1px 1px at 400px 50px, rgba(255,255,255,0.22), transparent),
    radial-gradient(1px 1px at 600px 300px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1.5px 1.5px at 750px 120px, rgba(94,164,255,0.28), transparent),
    radial-gradient(1px 1px at 900px 400px, rgba(255,255,255,0.22), transparent),
    radial-gradient(1px 1px at 100px 500px, rgba(255,255,255,0.14), transparent),
    radial-gradient(1.5px 1.5px at 550px 350px, rgba(94,164,255,0.25), transparent),
    radial-gradient(1px 1px at 1100px 200px, rgba(255,255,255,0.22), transparent),
    radial-gradient(1px 1px at 300px 650px, rgba(212,169,52,0.18), transparent),
    radial-gradient(1px 1px at 1200px 450px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 800px 550px, rgba(255,255,255,0.14), transparent);
  background-size: 1400px 800px;
  animation: drift 200s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-800px); }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(11, 13, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.4s var(--ease);
}

.navbar.scrolled { background: rgba(11, 13, 18, 0.95); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.nav-logo { height: 36px; }

.nav-server-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
}

.nav-server-status.online { color: var(--green); border-color: rgba(52,168,90,0.25); background: rgba(52,168,90,0.06); }
.nav-server-status.offline { color: var(--red); border-color: rgba(194,64,64,0.25); background: rgba(194,64,64,0.06); }

.nav-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.nav-server-status.online .nav-status-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nav-separator-brand {
  width: 1px;
  height: 20px;
  background: var(--text-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 0.15rem;
}

.nav-link-sep { display: none; }

.nav-link {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  position: relative;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
  z-index: 1001;
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: rgba(11, 13, 18, 0.97);
  backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { font-size: 1rem; padding: 0.75rem; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 4rem) 2rem 6rem;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 100vw);
  height: 600px;
  background: radial-gradient(ellipse, rgba(94,164,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  width: clamp(80px, 14vw, 140px);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: 0.18em;
  line-height: 0.95;
}

.hero-title span { color: var(--blue); }

.hero-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cta-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2rem;
  background: rgba(94, 164, 255, 0.06);
  border: 1px solid rgba(94, 164, 255, 0.15);
  border-radius: var(--radius);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
  margin-top: 1rem;
}

.cta-discord:hover {
  border-color: rgba(94, 164, 255, 0.4);
  background: rgba(94, 164, 255, 0.1);
}

.cta-discord svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 3rem;
}

.section-title svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  flex-shrink: 0;
}

/* Search bar */
.search-bar {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s var(--ease);
}

.search-bar input::placeholder { color: var(--text-dim); font-size: 0.82rem; }
.search-bar input:focus { border-color: rgba(94, 164, 255, 0.3); }

.search-bar svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-dim);
  pointer-events: none;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card-enterprise {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.4s var(--ease);
}

.card-enterprise:hover { border-color: rgba(94, 164, 255, 0.2); }

.card-enterprise img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card-enterprise:hover img { transform: scale(1.03); }

.card-enterprise-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,13,18,0.88) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.card-enterprise-overlay h3 {
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Illegal variant */
.card-enterprise.illegal { border-color: rgba(212, 169, 52, 0.06); }
.card-enterprise.illegal:hover { border-color: rgba(212, 169, 52, 0.2); }
.card-enterprise.illegal .card-enterprise-overlay {
  background: linear-gradient(to top, rgba(18,14,8,0.88) 0%, transparent 55%);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 2.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo { height: 24px; opacity: 0.35; }

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.footer-links { display: flex; gap: 1.25rem; }

.footer-link {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.footer-link:hover { color: var(--text-muted); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* Page header */
.page-header {
  padding: calc(var(--nav-h) + 4.5rem) 2rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.page-header h1 svg { width: 26px; height: 26px; stroke: var(--blue); }

/* Detail modal */
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 7, 10, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.detail-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  position: fixed;
  z-index: 2001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(480px, calc(100vw - 2rem));
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}

.detail-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  transition: background 0.25s, color 0.25s;
}

.detail-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.detail-close svg { width: 14px; height: 14px; }

.detail-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.detail-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.detail-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  background: rgba(88,101,242,0.08);
  border: 1px solid rgba(88,101,242,0.18);
  border-radius: var(--radius);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b9bef;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.detail-discord:hover {
  background: rgba(88,101,242,0.14);
  border-color: rgba(88,101,242,0.3);
}

.detail-discord svg { width: 16px; height: 16px; flex-shrink: 0; }

.detail-panel.illegal .detail-discord {
  background: rgba(212,169,52,0.06);
  border-color: rgba(212,169,52,0.15);
  color: var(--gold-light);
}

.detail-panel.illegal .detail-discord:hover {
  background: rgba(212,169,52,0.12);
  border-color: rgba(212,169,52,0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .reglement-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 1rem; }
  .hero, .section { padding-left: 1rem; padding-right: 1rem; }
}
