/* ═══════════════════════════════════════════════════════════════════════
   Red Planet Reapers — Main Stylesheet
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Custom Properties ───────────────────────────────────────────────── */
:root {
  --bg:           #080808;
  --bg-secondary: #111111;
  --primary:      #FF1728;
  --crimson:      #990011;
  --text:         #FFFFFF;
  --text-muted:   #929292;

  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Rajdhani', 'Inter', sans-serif;

  --header-h:     72px;
  --ease-out:     cubic-bezier(.22, 1, .36, 1);
}

/* ── Reset & Base ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ── Starfield Canvas ────────────────────────────────────────────────── */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(8, 8, 8, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: background .3s var(--ease-out);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.header-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .18em;
  color: var(--text);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  padding: .5rem .85rem;
  border-radius: 8px;
  transition: color .25s var(--ease-out), background .25s var(--ease-out);
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.header-discord {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  padding: .5rem .85rem;
  border-radius: 8px;
  transition: color .25s var(--ease-out), background .25s var(--ease-out);
}

.header-discord:hover,
.header-discord:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.header-discord svg {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

/* Soft crimson ambient glow */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -58%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 0, 17, .22) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0%   { opacity: .6; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 1;  transform: translate(-50%, -58%) scale(1.12); }
}

/* Content wrapper */
.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
}

/* Logo */
.hero-logo {
  width: clamp(180px, 28vw, 280px);
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 60px rgba(153, 0, 17, .35));
  /* animation handled by JS */
}

/* Label */
.hero-label {
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .35em;
  color: var(--primary);
  margin-bottom: .75rem;
  text-transform: uppercase;
}

/* Heading */
.hero-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  letter-spacing: .14em;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #FFFFFF 30%, rgba(255, 255, 255, .65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tagline */
.hero-tagline {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(.8rem, 1.6vw, 1.05rem);
  letter-spacing: .22em;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Description */
.hero-description {
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

/* CTA Button */
.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .95rem 2.2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .1em;
  color: var(--text);
  background: linear-gradient(135deg, var(--crimson) 0%, var(--primary) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .35s var(--ease-out);
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary) 0%, #cc0014 100%);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(255, 23, 40, .3),
    0 2px 8px rgba(0, 0, 0, .4);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button svg,
.cta-button span {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .04);
  background: rgba(8, 8, 8, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
}

.footer-copy {
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.footer-discord {
  color: var(--text-muted);
  transition: color .25s var(--ease-out);
}

.footer-discord:hover,
.footer-discord:focus-visible {
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }
.reveal-delay-6 { transition-delay: .6s; }

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

  .hero-glow { animation: none; opacity: .8; }
  .reveal    { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  .header-name {
    font-size: .82rem;
    letter-spacing: .12em;
  }

  .header-discord-label { display: none; }

  .hero-logo {
    width: clamp(140px, 42vw, 220px);
    margin-bottom: 1.5rem;
  }

  .hero-glow {
    width: 400px;
    height: 400px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root { --header-h: 60px; }

  .header-logo { width: 32px; height: 32px; }

  .header-name {
    font-size: .72rem;
    letter-spacing: .08em;
  }

  .hero-label   { font-size: .68rem; letter-spacing: .28em; }
  .hero-tagline { font-size: .72rem; letter-spacing: .16em; }

  .hero-description {
    font-size: .88rem;
    padding: 0 .5rem;
  }

  .cta-button {
    padding: .85rem 1.75rem;
    font-size: .9rem;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
    filter: blur(60px);
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
