:root {
  --bg: #080a0f;
  --bg-alt: #0d111a;
  --surface: #101522;
  --surface-hover: #161d2f;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(240, 180, 41, 0.38);
  --text: #e6ebf5;
  --text-muted: #94a3b8;
  --gold: #f0b429;
  --gold-bright: #ffd166;
  --cyan: #38bdf8;
  --bellato: #f59e0b;
  --cora: #c084fc;
  --accretia: #ef4444;
  --radius: 14px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.1), transparent 36%),
    radial-gradient(circle at 82% 8%, rgba(240, 180, 41, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Rajdhani', system-ui, sans-serif;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
}

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

.container {
  width: min(1140px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ==================== HEADER / NAV ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(8, 10, 15, 0.84);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand strong {
  color: var(--gold);
}

.brand-icon {
  width: 30px;
  height: 30px;
  color: var(--gold);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.nav-links a:not(.btn):hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.52rem 1rem;
  font-size: 0.88rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #d99b18);
  color: #090b10;
  box-shadow: 0 8px 24px rgba(240, 180, 41, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.btn-secondary {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.35);
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.2);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-hover);
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.2rem) 0;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 2.25rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  margin-bottom: 1.15rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 15%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin-top: 1rem;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.85rem;
}

.cw-widget {
  background: linear-gradient(160deg, rgba(20, 27, 45, 0.96), rgba(11, 15, 25, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.cw-tz {
  color: var(--cyan);
}

.cw-target {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cw-timer {
  margin-top: 0.35rem;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: clamp(2.3rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.cw-schedule {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ==================== SECTIONS & CARDS ==================== */
.section {
  padding: clamp(3.2rem, 6vw, 4.8rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 2rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
}

.section-head p {
  margin-top: 0.55rem;
  color: var(--text-muted);
}

.section-note {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 1.55rem;
  color: #ffffff;
}

.cards-grid {
  display: grid;
  gap: 1.15rem;
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.races-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(148, 163, 184, 0.34);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
  color: #ffffff;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==================== RACES ==================== */
.race-card {
  position: relative;
  border-top: 3px solid var(--border);
}

.race-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  margin-bottom: 0.55rem;
}

.race-bellato {
  border-top-color: var(--bellato);
}
.race-bellato .race-badge {
  color: var(--bellato);
}

.race-cora {
  border-top-color: var(--cora);
}
.race-cora .race-badge {
  color: var(--cora);
}

.race-accretia {
  border-top-color: var(--accretia);
}
.race-accretia .race-badge {
  color: var(--accretia);
}

/* ==================== DOWNLOAD & GUIDE ==================== */
.download-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

.download-cards {
  display: grid;
  gap: 1.15rem;
}

.dl-meta {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}

.download-card .btn {
  margin-top: 1.15rem;
}

.steps-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.steps-list li strong {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
}

.steps-list li span {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* ==================== COMMUNITY & FOOTER ==================== */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
}

.community-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.comm-tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--gold);
}

.comm-link {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 860px) {
  .hero-grid,
  .download-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.9rem 1rem 1.15rem;
    background: rgba(10, 14, 22, 0.98);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a:not(.btn) {
    padding: 0.6rem 0.5rem;
  }

  .nav-cta {
    margin-top: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card,
  .nav-toggle span {
    transition: none;
  }
}
