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

:root {
  --bg: #16161a;
  --bg-deep: #101014;
  --bg-elevated: #1e1e24;
  --text: #f5f0f2;
  --text-muted: rgba(200, 190, 195, 0.72);
  --accent: #e85a7a;
  --accent-soft: rgba(232, 90, 122, 0.35);
  --accent-glow: rgba(232, 74, 111, 0.22);
  --border: rgba(232, 90, 120, 0.14);
  --surface: rgba(30, 30, 36, 0.55);
  --surface-solid: rgba(28, 28, 34, 0.92);
  --nav-bg: rgba(24, 24, 30, 0.6);
  --btn-dark: rgba(34, 34, 40, 0.72);
  --glow-pink: rgba(232, 74, 111, 0.16);
  --font: "Fredoka", "Segoe UI", system-ui, sans-serif;
}

html {
  font-size: 17px;
}

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

/* Animated aurora background */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 18% 38%, rgba(232, 74, 111, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 82% 58%, rgba(180, 60, 90, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(232, 90, 120, 0.06) 0%, transparent 45%),
    linear-gradient(165deg, #101014 0%, #16161a 40%, #1a181c 70%, #121216 100%);
  background-size: 200% 200%, 200% 200%, 180% 180%, 100% 100%;
  animation: aurora-drift 14s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0% {
    background-position:
      0% 30%,
      100% 70%,
      50% 100%,
      0% 0%;
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    background-position:
      40% 60%,
      60% 30%,
      30% 80%,
      0% 0%;
    filter: hue-rotate(12deg) brightness(1.08);
  }
  100% {
    background-position:
      100% 40%,
      0% 50%,
      70% 90%,
      0% 0%;
    filter: hue-rotate(-8deg) brightness(1.05);
  }
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow-left {
  width: 480px;
  height: 480px;
  left: -140px;
  top: 28%;
  background: var(--glow-pink);
  opacity: 0.55;
  animation: float-glow-left 10s ease-in-out infinite alternate;
}

.glow-right {
  width: 440px;
  height: 440px;
  right: -120px;
  top: 22%;
  background: rgba(232, 90, 120, 0.12);
  opacity: 0.7;
  animation: float-glow-right 12s ease-in-out infinite alternate;
}

.glow-center {
  width: 520px;
  height: 320px;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  background: rgba(200, 70, 110, 0.08);
  animation: float-glow-center 9s ease-in-out infinite alternate;
}

@keyframes float-glow-left {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }
  100% {
    transform: translate(40px, -30px) scale(1.15);
    opacity: 0.65;
  }
}

@keyframes float-glow-right {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  100% {
    transform: translate(-35px, 25px) scale(1.1);
    opacity: 0.75;
  }
}

@keyframes float-glow-center {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -48%) scale(1.2);
    opacity: 0.7;
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: center;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  padding: 0.65rem 1.25rem;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
}

.nav-logo {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  transform: scale(1.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.btn-discord-nav {
  background: #ffffff;
  color: #000000;
  padding: 0.55rem 1.25rem;
}

.btn-discord-nav:hover {
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  padding: 0.9rem 2.1rem;
  font-size: 1.1rem;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 0 44px rgba(255, 255, 255, 0.35);
}

.btn-secondary {
  background: var(--btn-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.9rem 2.1rem;
  font-size: 1.1rem;
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: rgba(232, 90, 120, 0.4);
  background: rgba(40, 38, 44, 0.85);
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.5rem 5rem;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 900px;
  pointer-events: auto;
  transform: translateY(-1.25rem);
}

.hero-logo-wrap {
  margin-bottom: 0.5rem;
  animation: logo-float 5s ease-in-out infinite;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-logo {
  width: min(400px, 72vw);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(232, 74, 111, 0.3));
}

.hero-title {
  font-size: clamp(3rem, 9vw, 4.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: -0.35rem;
  margin-bottom: 0.6rem;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(232, 90, 120, 0.22);
  animation: title-glow 4s ease-in-out infinite alternate;
}

@keyframes title-glow {
  0% {
    text-shadow: 0 0 30px rgba(232, 74, 111, 0.18);
  }
  100% {
    text-shadow: 0 0 50px rgba(232, 90, 120, 0.32);
  }
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.65rem;
  line-height: 1.45;
  max-width: 36ch;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 2.25rem;
}

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

/* Studio / inner pages */
.page-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7.5rem 1.5rem 4rem;
}

.page-inner {
  text-align: center;
  max-width: 520px;
}

.page-inner h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.page-lead {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .site-header {
    padding: 1rem;
  }

  .nav-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    border-radius: 1.25rem;
    padding: 0.85rem 1rem;
  }

  .nav-links {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
  }

  .btn-discord-nav {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* Performance: mobile, low-power, reduced motion */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .bg-aurora,
  .glow,
  .hero-logo-wrap,
  .hero-title {
    animation: none;
  }

  .glow {
    filter: blur(60px);
    opacity: 0.4;
  }
}

html.reduce-effects .bg-aurora,
html.reduce-effects .glow,
html.reduce-effects .hero-logo-wrap,
html.reduce-effects .hero-title,
html.reduce-effects .scroll-hint {
  animation: none !important;
}

html.reduce-effects .glow {
  filter: blur(50px);
  opacity: 0.35;
}

html.touch-device .hero-logo {
  filter: drop-shadow(0 8px 24px rgba(232, 74, 111, 0.25));
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-logo,
.compare-section,
.nav-bar {
  transform: translateZ(0);
}
