/* ==========================================================================
   Astrym — Global Styles
   Plain hand-authored CSS. No framework, no build step.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  /* Palette */
  --color-bg: #0B0B0F;
  --color-surface: #131318;
  --color-surface-hover: #1A1A21;
  --color-border: rgba(245, 243, 245, 0.08);
  --color-border-strong: rgba(245, 243, 245, 0.16);

  --color-purple: #5A1F7A;
  --color-purple-light: #7A2FA3;
  --color-red: #B21E3D;
  --color-red-light: #D42C4D;

  /* Brightened variants for text on dark backgrounds — the raw brand
     purple/red fall below WCAG AA contrast when used as text color. */
  --color-purple-text: #B366E0;
  --color-red-text: #E2445C;

  --color-text: #F5F3F5;
  --color-text-muted: #A0A0A8;

  /* Type */
  --font-heading: "Rajdhani", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Layout */
  --container-width: 1240px;
  --space-section: clamp(48px, 6vw, 96px);
}

/* ---- Reset ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-purple-text);
  margin-bottom: 16px;
}

.eyebrow-red {
  color: var(--color-red-text);
}

.section-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--color-purple) 0%,
    rgba(90, 31, 122, 0) 60%
  );
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background-color: var(--color-red);
  color: var(--color-text);
}

.btn-primary:hover {
  background-color: var(--color-red-light);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-purple-light);
  background-color: rgba(122, 47, 163, 0.1);
}

.btn-outline-red {
  background-color: transparent;
  border-color: var(--color-red);
  color: var(--color-text);
}

.btn-outline-red:hover {
  background-color: rgba(178, 30, 61, 0.12);
  border-color: var(--color-red-light);
}

.btn-arrow {
  font-size: 1.1em;
  line-height: 1;
  transition: transform 0.18s ease;
}

.btn-outline-red:hover .btn-arrow {
  transform: translateX(2px);
}

.btn-small {
  padding: 10px 18px;
  font-size: 13px;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  position: relative;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: 6px;
  transition: color 0.15s ease;
}

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

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--color-purple);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-socials a {
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

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

.nav-socials svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
}

/* ==========================================================================
   Hero
   The hero image runs full-bleed behind the whole section — the nebula
   texture is meant to be noisy and visible. A scrim sits between the
   image and the text: solid page-bg color directly behind the copy
   column, fading out toward the right so the image reads clearly
   there. The section fills the full viewport as a landing screen, and
   main.js fades the image out as the user scrolls toward the divider
   below, so it dissolves into the page background rather than cutting
   off abruptly.
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  /* take the edge off the nebula's contrast/saturation without
     hiding any of it — the full image stays visible */
  filter: saturate(0.85) brightness(0.9) contrast(0.96);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* uniform dim so body copy stays readable over the busy texture,
     rather than a directional scrim that hides part of the image */
  background-color: rgba(11, 11, 15, 0.4);
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-headline {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero-headline span {
  display: block;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Line 1 stays flat white — only the accent lines below it get the
   gradient treatment, per the reference. */
.hero-headline .word-white {
  color: #FFFFFF;
}

.hero-headline .word-purple,
.hero-headline .word-red {
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-headline .word-purple {
  color: var(--color-purple-text);
  background-image: linear-gradient(180deg, #D4AAF0 0%, #B366E0 100%);
}

.hero-headline .word-red {
  color: var(--color-red-text);
  background-image: linear-gradient(180deg, #FF8A9A 0%, #E2445C 100%);
}

.hero-sub {
  margin-top: 24px;
  max-width: 480px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.hero-sub strong {
  color: var(--color-text);
  font-weight: 600;
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   About / Mission
   ========================================================================== */

.about {
  padding: var(--space-section) 0;
}

.about-content {
  max-width: 700px;
}

.about h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 20px;
}

.about p {
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.75;
}

.about p + p {
  margin-top: 16px;
}

.about-points {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about-point {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.about-point h3 {
  font-size: 18px;
  color: var(--color-purple-text);
  margin-bottom: 8px;
}

.about-point p {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Tournaments / Schedule
   ========================================================================== */

.tournaments {
  padding: var(--space-section) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}

.section-head p {
  color: var(--color-text-muted);
  max-width: 420px;
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tournament-card {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px 24px 24px 28px;
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.tournament-card:hover {
  border-color: var(--color-border-strong);
  background-color: var(--color-surface-hover);
}

.tournament-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--color-purple);
}

.tournament-card.status-open::before {
  background-color: var(--color-red);
}

.tournament-status {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-text);
  margin-bottom: 14px;
}

.tournament-card.status-full .tournament-status,
.tournament-card.status-soon .tournament-status {
  color: var(--color-text-muted);
}

.tournament-game {
  font-size: 21px;
  margin-bottom: 6px;
}

.tournament-meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.tournament-meta div + div {
  margin-top: 4px;
}

.tournament-meta strong {
  color: var(--color-text);
  font-weight: 500;
}

/* ==========================================================================
   Community
   ========================================================================== */

.community {
  padding: var(--space-section) 0;
}

.community-panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: 40px;
}

.community h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 16px;
}

.community-panel > div:first-child p {
  color: var(--color-text-muted);
  max-width: 460px;
  margin-bottom: 28px;
}

.community-stats {
  display: flex;
  gap: 40px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.community-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  justify-self: end;
}

/* ==========================================================================
   Donate / Plans
   ========================================================================== */

.page-header {
  padding: clamp(64px, 10vw, 120px) 0 var(--space-section);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  max-width: 640px;
}

.page-header p {
  margin-top: 20px;
  max-width: 560px;
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.plans {
  padding: var(--space-section) 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--color-purple);
}

.plan-card:hover {
  border-color: var(--color-border-strong);
  background-color: var(--color-surface-hover);
}

.plan-card.is-featured {
  border-color: var(--color-red);
}

.plan-card.is-featured::before {
  background-color: var(--color-red);
}

.plan-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-text);
  margin-bottom: 14px;
}

.plan-name {
  font-size: 22px;
  margin-bottom: 12px;
}

.plan-price {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  color: var(--color-text);
}

.plan-price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.plan-desc {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
  flex-grow: 1;
}

.plan-card .btn {
  margin-top: 28px;
  justify-content: center;
}

.plans-note {
  margin-top: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 960px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo img {
  height: 32px;
  width: auto;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

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

.footer-socials {
  display: flex;
  gap: 18px;
}

.footer-socials a {
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.footer-socials a:hover {
  color: var(--color-text);
}

.footer-socials svg {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .about-points {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tournament-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .community-panel {
    grid-template-columns: 1fr;
  }

  .community-cta {
    justify-self: start;
    align-items: flex-start;
  }
}

@media (max-width: 800px) {
  .nav-links,
  .nav-socials {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.is-open .nav-links {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 24px;
  }

  .site-header.is-open .nav-links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tournament-grid {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

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