/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette - matches guild icon */
  --navy: #0a0d14;
  --navy-light: #141a26;
  --indigo: #1e2a3d;
  --silver: #c8d4e0;
  --silver-warm: #e0e8f0;
  --ice-blue: #7dd3fc;
  --ice-blue-light: #a5e8ff;
  --cyan: #7dd3fc;
  --cyan-glow: rgba(125, 211, 252, 0.4);
  --purple-hint: #818cf8;
  --purple: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.4);

  /* Functional */
  --bg: #0a0e1a;
  --text: #e2e4ea;
  --text-muted: #8b92a8;

  /* Animation */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.transparent {
  background: transparent;
  box-shadow: none;
  transition: all 0.3s var(--ease-smooth);
}

nav.transparent.scrolled {
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--silver);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.3s var(--ease-out);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  width: 100%;
}

/* ===== MOBILE MENU ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--silver);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding-top: 100px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.mobile-menu-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.2s;
}

.mobile-menu-links a:hover {
  color: var(--ice-blue);
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 140px 20px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: var(--cyan);
  filter: blur(150px);
  opacity: 0.08;
  pointer-events: none;
}

.page-header.purple-glow::before {
  background: var(--purple-hint);
}

.page-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -1px;
  position: relative;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 20px;
  position: relative;
}

.section.compact {
  padding: 60px 20px 100px;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(125, 211, 252, 0.1);
  padding: 60px 20px 30px;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: var(--ice-blue);
  filter: blur(150px);
  opacity: 0.05;
  pointer-events: none;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  position: relative;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--silver);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(26, 35, 64, 0.6);
  border: 1px solid rgba(125, 211, 252, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-out);
}

.footer-social a:hover {
  background: rgba(26, 35, 64, 0.9);
  border-color: var(--ice-blue);
  color: var(--ice-blue);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-column h4 {
  color: var(--silver);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--ice-blue);
}

.footer-links a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.7;
}

.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(125, 211, 252, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}

.footer-bottom a {
  color: var(--ice-blue);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-column h4 {
    margin-bottom: 16px;
  }

  .footer-links {
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
