/* ============================================
   Humungus Games — Landing Page
   Dark space theme · soft cyan accents
   ============================================ */

:root {
  --bg: #050508;
  --bg-elevated: #0b0b12;
  --bg-card: rgba(14, 16, 28, 0.72);
  --border: rgba(94, 234, 212, 0.12);
  --border-strong: rgba(94, 234, 212, 0.28);
  --text: #e8eaf2;
  --text-muted: #9aa0b4;
  --text-soft: #6b728a;
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.14);
  --accent-glow: rgba(56, 189, 248, 0.22);
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --container: 1100px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Background ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 20%, transparent 75%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 30% at 85% 40%, rgba(94, 234, 212, 0.06), transparent 50%),
    radial-gradient(ellipse 35% 25% at 10% 70%, rgba(56, 189, 248, 0.05), transparent 50%);
  pointer-events: none;
}

/* ---------- Layout ---------- */

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

.section {
  padding: 5.5rem 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.label-line {
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  color: var(--text);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(5, 5, 8, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 5, 8, 0.82);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

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

.logo-text {
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.65rem;
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.badge-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #c8d0e8 55%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-support {
  margin: 0 0 2rem;
  font-size: 0.98rem;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.btn-primary {
  color: #041016;
  background: linear-gradient(135deg, var(--accent) 0%, var(--blue) 100%);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2), 0 8px 28px rgba(56, 189, 248, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35), 0 10px 36px rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Hero decorative orbit */
.hero-orbit {
  position: absolute;
  right: -8%;
  top: 50%;
  translate: 0 -50%;
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  pointer-events: none;
  opacity: 0.55;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.orbit-ring::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.orbit-ring.delay {
  inset: 12%;
  border-color: rgba(56, 189, 248, 0.15);
  animation-duration: 18s;
  animation-direction: reverse;
}

.orbit-ring.delay::before {
  top: 20%;
  width: 5px;
  height: 5px;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.orbit-core {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.35), transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.45), rgba(5, 5, 8, 0.2) 70%);
  box-shadow:
    0 0 40px rgba(56, 189, 248, 0.25),
    inset 0 0 30px rgba(94, 234, 212, 0.15);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .hero-orbit {
    opacity: 0.22;
    right: -30%;
    width: 70vw;
    height: 70vw;
  }
}

/* ---------- About ---------- */

.about {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(11, 11, 18, 0.6) 40%, transparent);
}

.about-grid {
  display: grid;
  gap: 1.5rem;
}

.about-content .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.15rem;
}

.about-content p {
  margin: 0 0 1rem;
  color: var(--text-soft);
  max-width: 52ch;
}

.about-content p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 12rem 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .about .section-label {
    margin-top: 0.35rem;
  }
}

/* ---------- Features ---------- */

.features {
  border-top: 1px solid var(--border);
}

.features-header {
  max-width: 36rem;
  margin-bottom: 2.75rem;
}

.features-intro {
  margin: 0;
  color: var(--text-soft);
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
  }
}

.feature-card {
  padding: 1.5rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(94, 234, 212, 0.06);
  transform: translateY(-2px);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ---------- CTA band ---------- */

.cta-band {
  border-top: 1px solid var(--border);
  padding: 4.5rem 0;
}

.cta-inner {
  text-align: center;
  padding: 2.75rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
    var(--bg-elevated);
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.cta-text {
  margin: 0;
  color: var(--text-soft);
  max-width: 36rem;
  margin-inline: auto;
}

/* ---------- Footer ---------- */

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

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

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.footer-tag {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children slightly via transition-delay set in JS or nth-child */
.hero-inner .reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.hero-inner .reveal:nth-child(2) {
  transition-delay: 0.12s;
}
.hero-inner .reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.hero-inner .reveal:nth-child(4) {
  transition-delay: 0.28s;
}
.hero-inner .reveal:nth-child(5) {
  transition-delay: 0.36s;
}

.feature-card.reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.feature-card.reveal:nth-child(2) {
  transition-delay: 0.12s;
}
.feature-card.reveal:nth-child(3) {
  transition-delay: 0.18s;
}
.feature-card.reveal:nth-child(4) {
  transition-delay: 0.24s;
}
