/* ===== Base & Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #180809;
  color: #ffffff;
  font-family: 'Inter', 'Noto Serif SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

::selection {
  background-color: #FF4756;
  color: #ffffff;
}

/* ===== Typography ===== */
.font-brush {
  font-family: 'Ma Shan Zheng', cursive;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #180809;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 71, 86, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 71, 86, 0.6);
}

/* ===== Hero Canvas ===== */
#hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== Hero Title Characters ===== */
.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
}

/* ===== Glass Card Effect ===== */
.feature-card,
.pricing-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.pricing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 211, 106, 0.15), transparent 40%, transparent 60%, rgba(255, 71, 86, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature-card:hover::before,
.pricing-card:hover::before {
  opacity: 1;
}

/* ===== Feature Cards Glow ===== */
.feature-card {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px -20px rgba(255, 71, 86, 0.25);
}

/* ===== Community Radar ===== */
.community-visual {
  position: relative;
}

.radar-ring {
  position: absolute;
  border-radius: 50%;
  animation: radarPulse 3s ease-out infinite;
}

.radar-ring:nth-child(2) {
  animation-delay: 0.5s;
}

.radar-ring:nth-child(3) {
  animation-delay: 1s;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.radar-sweep {
  position: absolute;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(52, 211, 153, 0.15) 60deg, transparent 60deg);
  animation: radarSweep 4s linear infinite;
}

@keyframes radarSweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== Pricing Card Highlight ===== */
.pricing-card:nth-child(2) {
  box-shadow: 0 0 60px -20px rgba(255, 211, 106, 0.2);
}

/* ===== Navigation ===== */
#navbar {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
  background-color: rgba(24, 8, 9, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
  transition: opacity 0.3s ease;
}

#mobile-menu.active {
  display: flex;
  opacity: 1;
}

/* ===== Canvas Containers ===== */
#furnace-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.immersive-canvas-wrapper {
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5);
}

/* ===== Button Hover Effects ===== */
a, button {
  transition: all 0.3s ease;
}

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

  .radar-ring,
  .radar-sweep {
    animation: none;
  }

  #hero-canvas,
  #furnace-canvas {
    display: none;
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .feature-card,
  .pricing-card {
    padding: 1.5rem;
  }

  .community-visual {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 3.5rem;
  }

  h2.font-brush {
    font-size: 2.5rem;
  }
}

/* ===== Loading State ===== */
.loading {
  opacity: 0;
  transform: translateY(20px);
}

.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ===== Accent Glow ===== */
.glow-gold {
  box-shadow: 0 0 40px rgba(255, 211, 106, 0.3);
}

.glow-red {
  box-shadow: 0 0 40px rgba(255, 71, 86, 0.3);
}
