/* ============================================================
   INFINITY CIRCUIT — Global Styles
   Brand tokens sourced from Brand Guide v1.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --void-violet:   #9370c8;
  --deep-void:     #6040a0;
  --cosmic-dark:   #12101e;
  --deep-violet:   #3c2070;
  --circuit-tint:  #f4f2ff;

  --reality:  #c41e3a;
  --mind:     #e8b800;
  --soul:     #e87200;
  --space:    #1a5fe0;
  --time:     #0da85e;
  --power:    #c0357a;

  --font:      'Space Grotesk', sans-serif;
  --fw-body:   400;
  --fw-label:  500;
  --fw-head:   600;

  --max-width: 1100px;
  --nav-height: 64px;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: var(--fw-body);
  background: var(--cosmic-dark);
  color: var(--circuit-tint);
  line-height: 1.6;
}

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

a {
  color: var(--void-violet);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18,16,30,0.97);
  height: var(--nav-height);
  border-bottom: 1px solid rgba(147, 112, 200, 0.2);
  backdrop-filter: blur(8px);
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand-name {
  font-size: 1rem;
  font-weight: var(--fw-head);
  letter-spacing: 0.09em;
  color: #fff;
  text-transform: uppercase;
}

.nav-brand-sub {
  font-size: 0.65rem;
  font-weight: var(--fw-label);
  letter-spacing: 0.08em;
  color: var(--void-violet);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: var(--fw-label);
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: 0.2s;
}

/* ── Hero ── */
.hero {
  background: var(--cosmic-dark);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(147,112,200,0.15);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(147,112,200,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-mark {
  margin: 0 auto 2rem;
  width: 80px;
  height: 80px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: var(--fw-head);
  letter-spacing: 0.09em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 0.875rem;
  font-weight: var(--fw-label);
  letter-spacing: 0.08em;
  color: var(--void-violet);
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.hero-description {
  margin: 1.5rem auto 0;
  max-width: 560px;
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: var(--fw-label);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  border: none;
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--void-violet);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.65);
}

/* ── Sections ── */
.section {
  padding: 4rem 0;
}

.section-light {
  background: #1c1830;
  color: rgba(255,255,255,0.85);
}

.section-tint {
  background: #231f38;
  color: rgba(255,255,255,0.85);
}

.section-dark {
  background: var(--cosmic-dark);
  color: rgba(255,255,255,0.85);
  border-top: 1px solid rgba(147,112,200,0.12);
  border-bottom: 1px solid rgba(147,112,200,0.12);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: var(--fw-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--void-violet);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.375rem;
  font-weight: var(--fw-head);
  color: #fff;
  line-height: 1.2;
}

/* ── Tier Pills ── */
.pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: var(--fw-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.pill-shards {
  color: var(--void-violet);
  background: rgba(147,112,200,0.1);
  border-color: var(--void-violet);
}

.pill-qualifier {
  color: #f0d080;
  background: rgba(232,184,0,0.1);
}

.pill-championship {
  color: #fff;
  background: rgba(147,112,200,0.15);
  border: 2px solid var(--void-violet);
}

/* ── Event Cards ── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(147,112,200,0.2);
  border-left: 4px solid var(--void-violet);
  border-radius: 6px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.event-card:hover {
  border-color: rgba(147,112,200,0.4);
  border-left-color: var(--void-violet);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.event-card-name {
  font-size: 1rem;
  font-weight: var(--fw-head);
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.event-card-meta {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* ── Standings Table ── */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.standings-table th {
  background: var(--deep-void);
  color: #fff;
  font-weight: var(--fw-label);
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.standings-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(147,112,200,0.1);
  color: rgba(255,255,255,0.85);
}

.standings-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

.standings-table tr:hover td {
  background: rgba(147,112,200,0.08);
}

.standings-rank {
  font-weight: var(--fw-head);
  color: var(--void-violet);
  width: 48px;
}

.standings-stone {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* Stone holder row override */
.row-stone-holder td {
  background: rgba(147,112,200,0.08) !important;
}

.row-stone-holder:hover td {
  background: rgba(147,112,200,0.14) !important;
}

/* ── Footer ── */
.site-footer {
  background: var(--cosmic-dark);
  border-top: 1px solid rgba(147,112,200,0.15);
  padding: 2.5rem 0;
  color: rgba(255,255,255,0.35);
  font-size: 0.8125rem;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255,255,255,0.35);
  font-size: 0.8125rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--cosmic-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid rgba(147,112,200,0.2);
  }

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

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(147,112,200,0.1);
  }

  .nav-toggle { display: block; }

  .site-nav { position: relative; }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}