/* ===== Tokens ===== */
:root {
  --bg: #05070a;
  --surface: #0d151f;
  --surface-2: #101c2a;
  --chrome: #eef2f6;
  --chrome-dim: #a7b3c2;
  --blue: #4fa3e8;
  --blue-dim: #2c5f88;
  --orange: #ff8a3d;
  --slate: #8b97ab;
  --line: rgba(238, 242, 246, 0.1);

  --font-display: 'Oswald', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1180px;
}

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

/* El atributo [hidden] debe ganar siempre, aunque otra clase del
   mismo elemento fije "display" (p.ej. .btn o .admin__panel). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--chrome);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--blue);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--chrome);
}

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.section__intro {
  color: var(--slate);
  max-width: 46ch;
  margin: 0 auto;
}

/* ===== Fixed ambient background behind everything ===== */
.road-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 25% -10%, rgba(79,163,232,0.07), transparent 55%),
    radial-gradient(ellipse at 82% 0%, rgba(255,138,61,0.05), transparent 45%),
    var(--bg);
}

/* ===== Nav ===== */
.nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding: 0 5vw;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  background:
    radial-gradient(120% 160% at 10% 0%, rgba(79,163,232,0.06), transparent 60%),
    rgba(8, 12, 18, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.5rem;
}

.nav__logo { height: 38px; width: auto; }

.nav__tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

/* Pill nav */
.nav__pill {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0 auto;
  padding: 0.3rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover { color: var(--chrome); }

.nav__link.is-active {
  color: var(--blue);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--blue-dim);
}

.nav__chevron { transition: transform 0.2s ease; }

/* Dropdown */
.nav__dropdown { position: relative; }

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: 0 16px 30px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav__dropdown.is-open .nav__dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown.is-open .nav__chevron { transform: rotate(180deg); }

.nav__dropdown-menu a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--slate);
}

.nav__dropdown-menu a:hover { background: var(--surface-2); color: var(--blue); }

/* Right side */
.nav__right { display: flex; align-items: center; gap: 0.6rem; margin-left: 0.5rem; }

.btn--discord {
  background: #5865f2;
  color: #fff;
  border: none;
  cursor: pointer;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.65rem 1.3rem 0.65rem 1.1rem;
  font-family: var(--font-display);
}
.btn--discord:hover { box-shadow: 0 6px 20px rgba(88,101,242,0.4); transform: translateY(-1px); }

.btn--discord.is-connected {
  background: var(--surface-2);
  color: var(--chrome);
  box-shadow: inset 0 0 0 1px var(--blue-dim);
}

.btn--discord img.discord-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.nav__burger { display: none; }
.nav__mobile { display: none; }

@media (max-width: 900px) {
  .nav__pill { display: none; }
}

@media (max-width: 760px) {
  .nav-wrap { top: 10px; }
  .nav { padding: 0.5rem 0.6rem 0.5rem 0.9rem; border-radius: 16px; }
  .nav__tagline { display: none; }
  .btn--discord span { display: none; }
  .btn--discord { padding: 0.6rem; }
  .nav__burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
  .nav__burger span { height: 2px; width: 100%; background: var(--chrome); border-radius: 2px; }

  .nav__mobile {
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.6rem;
    padding: 0.8rem;
    background: rgba(8,12,18,0.92);
    border: 1px solid var(--line);
    border-radius: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  }
  .nav__mobile.is-open {
    display: flex;
    max-height: 400px;
    opacity: 1;
  }
  .nav__mobile a {
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    color: var(--slate);
    font-weight: 500;
  }
  .nav__mobile a:hover { background: var(--surface-2); color: var(--blue); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  /* Reset para cuando .btn se usa sobre un <button> real (el panel
     de staff), que si no trae el fondo gris por defecto del navegador. */
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  font-family: var(--font-display);
  cursor: pointer;
}

.btn--orange {
  background: var(--orange);
  color: #1a0e02;
  box-shadow: 0 0 0 rgba(255,138,61,0);
}
.btn--orange:hover { box-shadow: 0 6px 24px rgba(255,138,61,0.35); transform: translateY(-1px); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--chrome);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 4.5rem 5vw 0;
  text-align: center;
  overflow: hidden;
}

.hero__compass {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  color: var(--blue);
  opacity: 0.05;
  z-index: 1;
  animation: spin 120s linear infinite;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__compass { animation: none; }
}

.hero__inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }

.hero__logo {
  width: min(460px, 78vw);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 40px rgba(79,163,232,0.2));
}

.hero__tagline {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 auto 2.4rem;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.4rem 0 4.5rem;
}

.hero__road {
  position: relative;
  z-index: 2;
  height: 190px;
  background-image: url('assets/road.svg');
  background-repeat: repeat-x;
  background-size: 800px 190px;
  background-position: bottom;
  opacity: 0.95;
}

/* ===== HUD ===== */
.hud {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hud__box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
}

.hud__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: pulse 1.8s ease-in-out infinite;
}

.hud__dot.is-offline { background: var(--slate); box-shadow: none; animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hud__label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  text-transform: uppercase;
}

.hud__value {
  font-weight: 700;
  color: var(--chrome);
  font-size: 0.95rem;
}

.hud__value--countdown { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  .hud__dot { animation: none; }
}

/* ===== Sections ===== */
.section {
  padding: 5.5rem 5vw;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section--alt { background: linear-gradient(180deg, transparent, rgba(13,21,31,0.6), transparent); max-width: 100%; }
.section--alt > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

.section__head { text-align: center; margin-bottom: 3rem; }

.grid { display: grid; gap: 1.25rem; }
.grid--rules { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--staff { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid--gallery { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--blue-dim); transform: translateY(-2px); }

.card__mark {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  border: 1px solid var(--blue-dim);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.9rem;
}

.card p { color: var(--slate); font-size: 0.94rem; margin: 0; }

/* ===== Steps (unirte) ===== */
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.steps__item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.steps__item:last-child { border-bottom: none; }

.steps__num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--blue);
  min-width: 2.4rem;
}

.steps__item p { color: var(--slate); margin: 0; font-size: 0.95rem; }

.whitelist__cta { text-align: center; margin-top: 3rem; }

/* ===== Staff ===== */
.staff-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.6rem;
  text-align: center;
}

.staff-card__avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: #05070c;
  background: linear-gradient(140deg, var(--chrome), var(--blue-dim));
}

.staff-card h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.staff-card p { color: var(--slate); font-size: 0.82rem; margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }

/* ===== Gallery ===== */
.gallery-tile {
  aspect-ratio: 4/3;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--tile-a), var(--tile-b));
  position: relative;
}
.gallery-tile::after {
  content: 'Captura próximamente';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate);
  text-align: center;
  padding: 0 1rem;
}

.gallery-tile--photo {
  overflow: hidden;
  background: var(--surface);
}
.gallery-tile--photo::after { content: none; }
.gallery-tile--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-tile__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--chrome);
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}

/* ===== Closer ===== */
.closer { text-align: center; }
.closer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3.5rem 5vw 3rem;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.85rem;
}

.footer__logo { height: 40px; width: auto; margin: 0 auto 1rem; opacity: 0.9; }
.footer__disclaimer { max-width: 50ch; margin: 0.4rem auto; opacity: 0.75; }
.footer a { color: var(--blue); }
