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

/* Enable GPU acceleration for better performance */
.blackhole,
.accretion-disk,
.event-horizon,
.lens-ring,
.wave,
.cursor,
.cursor-trail {
  will-change: transform;
  transform: translateZ(0);
}

/* Smooth scrolling for all browsers */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Optimize animations for mobile */
@media (max-width: 768px) {
  .blackhole {
    animation-duration: 120s; /* Slower on mobile */
  }

  .accretion-disk {
    animation-duration: 40s; /* Slower on mobile */
  }

  .wave {
    animation-duration: 8s; /* Slower on mobile */
  }

  .viz-bar {
    animation-duration: 3s; /* Slower on mobile */
  }

  :root {
    --hero-audio-size: clamp(48px, 11vw, 58px);
    --hero-audio-gap: clamp(6px, 1.2vh, 10px);
    --hero-audio-wave-offset: clamp(16px, 7vh, 30px);
  }

  .hero-audio__status {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }
}

:root {
  --cosmos: #0a0a0a;
  --void: #050505;
  --pure: #ffffff;
  --dust: rgba(255, 255, 255, 0.03);
  --glow: rgba(255, 255, 255, 0.95);
  --quantum: cubic-bezier(0.23, 1, 0.32, 1);
  --liquid: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --hero-audio-size: clamp(52px, 6.2vw, 68px);
  --hero-audio-gap: clamp(8px, 1.5vh, 14px);
  --hero-audio-wave-offset: clamp(18px, 5.5vh, 36px);
}

@font-face {
  font-family: "SF";
  font-weight: 100;
  font-style: normal;
}

html {
  background: var(--cosmos);
  cursor: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  background: var(--cosmos);
  color: var(--pure);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

/* Apple-style Custom Cursor */
.cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.2s var(--liquid);
}

.cursor::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50%;
  filter: blur(2px);
  transform: scale(0.3);
  transition: transform 0.3s var(--liquid);
}

.cursor.hover::before {
  transform: scale(1);
}

.cursor-trail {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.8s var(--liquid);
}

/* Navigation - Floating Glass */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: clamp(18px, 4vw, 30px) clamp(20px, 6vw, 60px);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  background: transparent;
  transition: all 0.6s var(--quantum);
}

nav.scrolled {
  padding: clamp(14px, 3vw, 20px) clamp(20px, 5vw, 60px);
  background: transparent;
}

.nav-container {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  height: clamp(70px, 6.5vw, 96px);
  opacity: 0;
  animation: liquidFadeIn 1.5s var(--liquid) forwards;
  flex-shrink: 0;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
}

@keyframes liquidFadeIn {
  from {
    opacity: 0;
    filter: blur(20px);
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.nav-items {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 50px);
  flex-wrap: nowrap;
}

/* Mobile Navigation Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  border: 0;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  margin: 3px 0;
  transition: all 0.3s var(--liquid);
  border-radius: 2px;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

.nav-toggle:focus-visible span {
  background: var(--pure);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 50px);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(28px, 7vh, 40px);
    transition: right 0.5s var(--liquid);
    z-index: 1000;
    padding: calc(120px + env(safe-area-inset-top, 0px)) 24px
      calc(48px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: none;
  }

  .nav-menu.active {
    right: 0;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 24px;
    font-weight: 300;
    opacity: 0;
    transform: translateX(50px);
    animation: none;
  }

  .nav-menu.active .nav-link {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s var(--liquid);
  }

  .nav-menu.active .nav-link:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-menu.active .nav-link:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav-menu.active .nav-link:nth-child(3) {
    transition-delay: 0.3s;
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.2px;
  position: relative;
  transition: all 0.3s var(--liquid);
  opacity: 0;
  animation: liquidFadeIn 1.5s var(--liquid) 0.2s forwards;
}

.nav-link:hover {
  color: var(--pure);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--pure);
  transition: width 0.4s var(--liquid);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--pure);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.4s var(--liquid);
  opacity: 0;
  animation: liquidFadeIn 1.5s var(--liquid) 0.4s forwards;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Black Hole Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

/* The Black Hole */
.blackhole-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  /* Isolate hero composite to avoid full-page repaints under nav backdrop-filter */
  contain: layout paint style;
  isolation: isolate;
}

/* Starfield canvas layer hints for smoother compositing */
#starfield-canvas {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint size;
}

.blackhole {
  width: 600px;
  height: 600px;
  position: relative;
  animation: blackholeRotate 60s linear infinite;
  contain: paint;
}

@keyframes blackholeRotate {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

/* Event Horizon */
.event-horizon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at center,
    var(--cosmos) 0%,
    var(--cosmos) 30%,
    rgba(0, 0, 0, 0.8) 40%,
    transparent 60%
  );
  border-radius: 50%;
  /* Avoid animating box-shadow: use transform/opacity glow instead */
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}

/* Event Horizon soft glow via transform/opacity (no box-shadow) */
.event-horizon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate3d(-50%, -50%, 0) scale(1);
  border-radius: 50%;
  pointer-events: none;
  /* Simulate outer glow using gradient falloff */
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.14) 30%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(255, 255, 255, 0) 75%
  );
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: eventHorizonGlow 4s ease-in-out infinite;
}

@keyframes eventHorizonGlow {
  0%, 100% {
    transform: translate3d(-50%, -50%, 0) scale(1);
    opacity: 0.45;
  }
  50% {
    transform: translate3d(-50%, -50%, 0) scale(1.06);
    opacity: 0.85;
  }
}

/* Accretion Disk */
.accretion-disk {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%) rotateX(70deg);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02),
    transparent
  );
  animation: diskRotate 20s linear infinite;
  filter: blur(1px);
}

@keyframes diskRotate {
  from {
    transform: translate3d(-50%, -50%, 0) rotateX(70deg) rotateZ(0deg);
  }
  to {
    transform: translate3d(-50%, -50%, 0) rotateX(70deg) rotateZ(360deg);
  }
}

/* Gravitational Lensing Rings */
.lens-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  --ring-thickness: 1.2px;
  --ring-opacity: 0.05;
  background: radial-gradient(
    circle,
    transparent calc(50% - var(--ring-thickness)),
    rgba(255, 255, 255, var(--ring-opacity))
      calc(50% - var(--ring-thickness)),
    rgba(255, 255, 255, var(--ring-opacity))
      calc(50% + var(--ring-thickness)),
    transparent calc(50% + var(--ring-thickness))
  );
  background-repeat: no-repeat;
  background-position: center;
}

.lens-ring:nth-of-type(1) {
  width: 400px;
  height: 400px;
  animation: lensDistort 8s ease-in-out infinite;
}

.lens-ring:nth-of-type(2) {
  width: 450px;
  height: 450px;
  animation: lensDistort 8s ease-in-out infinite 0.5s;
}

.lens-ring:nth-of-type(3) {
  width: 500px;
  height: 500px;
  animation: lensDistort 8s ease-in-out infinite 1s;
}

.lens-ring:nth-of-type(4) {
  width: 550px;
  height: 550px;
  animation: lensDistort 8s ease-in-out infinite 1.5s;
}

@keyframes lensDistort {
  0%,
  100% {
    --ring-opacity: 0.05;
    transform: translate3d(-50%, -50%, 0) scale(1) rotateX(0deg);
  }
  25% {
    --ring-opacity: 0.1;
    transform: translate3d(-50%, -50%, 0) scale(1.05) rotateX(10deg);
  }
  50% {
    --ring-opacity: 0.15;
    transform: translate3d(-50%, -50%, 0) scale(1.1) rotateX(-10deg);
  }
  75% {
    --ring-opacity: 0.1;
    transform: translate3d(-50%, -50%, 0) scale(1.05) rotateX(10deg);
  }
}

/* Sound Waves - Liquid Style */
.sound-waves {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  /* Isolate paints to avoid full-page repaints */
  contain: paint;
  isolation: isolate;
}

.wave {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Use max size and scale down for perf */
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  /* Composite on GPU: only transform + opacity */
  transform: translate3d(-50%, -50%, 0) scale(0.125);
  animation: waveExpand 6s ease-out infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint size;
}

.wave:nth-child(1) {
  animation-delay: 0s;
}
.wave:nth-child(2) {
  animation-delay: 1s;
}
.wave:nth-child(3) {
  animation-delay: 2s;
}
.wave:nth-child(4) {
  animation-delay: 3s;
}
.wave:nth-child(5) {
  animation-delay: 4s;
}

body.audio-is-playing .sound-waves .wave {
  animation-duration: 5s;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.16) 0%,
    transparent 70%
  );
}

@keyframes waveExpand {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(0.125);
    opacity: 0.8;
  }
  70% {
    opacity: 0.15;
  }
  100% {
    transform: translate3d(-50%, -50%, 0) scale(1);
    opacity: 0;
  }
}

/* Hero Content - Liquid Typography with smooth transitions */
.hero-content {
  position: relative;
  z-index: 100;
  text-align: center;
  max-width: 900px;
  padding: 0 clamp(20px, 6vw, 40px);
  pointer-events: none;
  /* Add smooth transitions for opacity and filter changes */
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Ensure hardware acceleration */
  will-change: opacity, filter;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint style;
  isolation: isolate;
}

.hero-content.is-static {
  opacity: 1;
  filter: none;
  transition: none;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: liquidReveal 2s var(--liquid) 1s forwards;
  color: rgba(255, 255, 255, 0.6);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes liquidReveal {
  from {
    opacity: 0;
    filter: blur(40px);
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.hero-title {
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 100;
  letter-spacing: -2px;
  line-height: 0.9;
  margin-bottom: 32px;
  opacity: 0;
  animation: liquidReveal 2s var(--liquid) 1.3s forwards;
  background: linear-gradient(
    180deg,
    var(--pure) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-description {
  font-size: 20px;
  font-weight: 200;
  line-height: 1.6;
  margin-bottom: 60px;
  opacity: 0;
  animation: liquidReveal 2s var(--liquid) 1.6s forwards;
  color: rgba(255, 255, 255, 0.7);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* iOS Safari-specific: Avoid filter animation on gradient text to prevent flicker */
@keyframes liquidRevealIOS {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply iOS-specific keyframes and disable filter during reveal */
.ios-safari .hero-subtitle {
  animation: liquidRevealIOS 2s var(--liquid) 1s forwards;
}
.ios-safari .hero-title {
  animation: liquidRevealIOS 2s var(--liquid) 1.3s forwards;
}
.ios-safari .hero-description {
  animation: liquidRevealIOS 2s var(--liquid) 1.6s forwards;
}

/* Ensure no filter is applied to hero content on iOS during scroll */
.ios-safari .hero-content {
  filter: none !important;
}

/* CTA Buttons - Glass Morphism */
.cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  opacity: 0;
  animation: liquidReveal 2s var(--liquid) 1.9s forwards;
  pointer-events: all;
}

.cta {
  padding: 16px 40px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: all 0.4s var(--liquid);
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.cta-primary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--cosmos);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cta-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--pure);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s var(--liquid);
}

.cta-primary:hover::before {
  width: 400px;
  height: 400px;
}

.cta-primary span {
  position: relative;
  z-index: 1;
}

.cta-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.2);
}

.cta-secondary {
  background: transparent;
  color: var(--pure);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

/* 3D Starfield Canvas Styling */
#starfield-canvas {
  background: transparent;
}

/* Liquid Section */
.liquid-section {
  min-height: 100vh;
  padding: clamp(120px, 18vh, 160px) clamp(20px, 8vw, 60px);
  position: relative;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.2) 0%,
    rgba(5, 5, 5, 0.1) 50%,
    rgba(5, 5, 5, 0.2) 100%
  );
}

.section-container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 120px;
  opacity: 0;
  transform: translateY(60px);
  transition: all 1.2s var(--liquid);
}

.section-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 100;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 24px;
}

.section-description {
  font-size: 20px;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Feature Cards - Glass Design */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 80px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(60px) saturate(150%);
  -webkit-backdrop-filter: blur(60px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.8s var(--liquid);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 80px rgba(255, 255, 255, 0.02),
    inset 0 0 60px rgba(255, 255, 255, 0.01);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s var(--liquid);
  pointer-events: none;
}

.feature-card:hover::before {
  opacity: 1;
  animation: cardGlow 3s ease-in-out infinite;
}

@keyframes cardGlow {
  0%,
  100% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.02);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 120px rgba(255, 255, 255, 0.05),
    inset 0 0 80px rgba(255, 255, 255, 0.02);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
  position: relative;
}

.icon-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: iconWave 3s ease-in-out infinite;
}

.icon-wave:nth-child(1) {
  animation-delay: 0s;
}
.icon-wave:nth-child(2) {
  animation-delay: 0.3s;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
}
.icon-wave:nth-child(3) {
  animation-delay: 0.6s;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
}

@keyframes iconWave {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
}

.feature-title {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.feature-description {
  font-size: 16px;
  font-weight: 200;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

/* Sound Visualizer */

.hero-audio {
  position: fixed;
  bottom: calc(
    var(--hero-audio-wave-offset) + var(--hero-audio-size) + var(--hero-audio-gap)
  );
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-audio-gap);
  z-index: 120;
  pointer-events: none;
}

.hero-audio__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vh, 12px);
  pointer-events: auto;
}

.hero-audio__toggle {
  position: relative;
  width: var(--hero-audio-size);
  height: var(--hero-audio-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 8, 8, 0.6);
  color: var(--pure);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.35s var(--quantum),
    background 0.35s var(--quantum),
    transform 0.3s var(--quantum),
    box-shadow 0.35s var(--quantum);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  overflow: hidden;
}

.hero-audio__toggle:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.hero-audio__toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.hero-audio__toggle[data-state="playing"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.22);
}

.hero-audio__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.05) 52%,
    transparent 74%
  );
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.4s var(--quantum), transform 0.4s var(--quantum);
  pointer-events: none;
}

.hero-audio__toggle[data-state="playing"] .hero-audio__pulse {
  opacity: 1;
  transform: scale(1.15);
  animation: heroAudioPulse 2.4s var(--liquid) infinite;
}

@keyframes heroAudioPulse {
  0% {
    transform: scale(1.05);
    opacity: 0.5;
  }
  58% {
    transform: scale(1.25);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.05);
    opacity: 0.5;
  }
}

.hero-audio__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(20px, 3vw, 26px);
  height: clamp(20px, 3vw, 26px);
}

.hero-audio__icon-shape {
  width: 100%;
  height: 100%;
  fill: var(--pure);
  transition: transform 0.28s var(--quantum),
    opacity 0.28s var(--quantum);
}

.hero-audio__icon-shape--pause {
  position: absolute;
  opacity: 0;
  transform: scale(0.7);
}

.hero-audio__toggle[data-state="playing"] .hero-audio__icon-shape--play {
  opacity: 0;
  transform: scale(0.7);
}

.hero-audio__toggle[data-state="playing"] .hero-audio__icon-shape--pause {
  opacity: 1;
  transform: scale(1);
}

.hero-audio__text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-audio__status {
  font-size: clamp(0.64rem, 1.5vw, 0.74rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
  transition: color 0.3s var(--quantum), opacity 0.3s var(--quantum);
  pointer-events: none;
}

.hero-audio[data-active="true"] .hero-audio__status {
  color: rgba(255, 255, 255, 0.88);
}

.sound-viz {
  position: fixed;
  bottom: var(--hero-audio-wave-offset);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
  z-index: 110;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.25s var(--quantum), transform 0.25s var(--quantum);
}

body.audio-is-playing .sound-viz {
  opacity: 0.85;
  transform: translateX(-50%) translateY(-4px);
}

.viz-bar {
  width: 2px;
  background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.85));
  animation: vizWave 2s ease-in-out infinite;
  border-radius: 2px;
  transform-origin: center bottom;
  animation-play-state: paused;
}

body.audio-is-playing .viz-bar {
  animation-play-state: running;
}

.viz-bar:nth-child(1) {
  height: 12px;
  animation-delay: 0s;
}
.viz-bar:nth-child(2) {
  height: 18px;
  animation-delay: 0.1s;
}
.viz-bar:nth-child(3) {
  height: 24px;
  animation-delay: 0.2s;
}
.viz-bar:nth-child(4) {
  height: 30px;
  animation-delay: 0.3s;
}
.viz-bar:nth-child(5) {
  height: 26px;
  animation-delay: 0.4s;
}
.viz-bar:nth-child(6) {
  height: 20px;
  animation-delay: 0.5s;
}
.viz-bar:nth-child(7) {
  height: 14px;
  animation-delay: 0.6s;
}

@keyframes vizWave {
  0%,
  100% {
    transform: scaleY(0.5);
    opacity: 0.35;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Footer */
footer {
  padding: 120px 60px 60px;
  text-align: center;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-title {
  font-size: 48px;
  font-weight: 100;
  letter-spacing: -1px;
  margin-bottom: 24px;
  opacity: 0.9;
}

.footer-subtitle {
  font-size: 16px;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (320px and up) */
@media (max-width: 359px) {
  nav {
    padding: 15px 20px;
  }

  .nav-container {
    max-width: 100%;
  }

  .nav-items {
    width: 100%;
    justify-content: flex-end;
    gap: 16px;
  }

  .blackhole {
    width: 250px;
    height: 250px;
  }

  .event-horizon {
    width: 180px;
    height: 180px;
  }

  .accretion-disk {
    width: 300px;
    height: 300px;
  }

  .lens-ring:nth-of-type(1) {
    width: 200px;
    height: 200px;
  }

  .lens-ring:nth-of-type(2) {
    width: 220px;
    height: 220px;
  }

  .lens-ring:nth-of-type(3) {
    width: 240px;
    height: 240px;
  }

  .lens-ring:nth-of-type(4) {
    width: 260px;
    height: 260px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-subtitle {
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .hero-description {
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 1.5;
  }

  .cta-group {
    flex-direction: column;
    gap: 12px;
  }

  .cta {
    padding: 14px 28px;
    font-size: 14px;
    width: 100%;
    text-align: center;
  }

  .liquid-section {
    padding: 80px 20px;
  }

  .section-header {
    margin-bottom: 60px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-description {
    font-size: 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 32px 24px;
  }

  .feature-title {
    font-size: 22px;
  }

  .feature-description {
    font-size: 14px;
  }

  .sound-viz {
    bottom: 20px;
  }

  footer {
    padding: 80px 20px 40px;
  }

  .footer-title {
    font-size: 32px;
  }
}

/* Small Devices (360px - 575px) */
@media (min-width: 360px) and (max-width: 575px) {
  nav {
    padding: 16px 24px;
  }

  .nav-items {
    width: 100%;
    justify-content: flex-end;
    gap: 20px;
  }

  .blackhole {
    width: 300px;
    height: 300px;
  }

  .event-horizon {
    width: 200px;
    height: 200px;
  }

  .accretion-disk {
    width: 350px;
    height: 350px;
  }

  .lens-ring:nth-of-type(1) {
    width: clamp(220px, 55vw, 360px);
    height: clamp(220px, 55vw, 360px);
  }

  .lens-ring:nth-of-type(2) {
    width: clamp(260px, 60vw, 400px);
    height: clamp(260px, 60vw, 400px);
  }

  .lens-ring:nth-of-type(3) {
    width: clamp(300px, 65vw, 440px);
    height: clamp(300px, 65vw, 440px);
  }

  .lens-ring:nth-of-type(4) {
    width: clamp(340px, 70vw, 480px);
    height: clamp(340px, 70vw, 480px);
  }

  .hero-content {
    padding: 0 24px;
  }

  .hero-subtitle {
    font-size: 14px;
    letter-spacing: 3px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-description {
    font-size: 17px;
  }

  .cta-group {
    flex-direction: column;
    gap: 14px;
  }

  .cta {
    padding: 15px 32px;
    font-size: 15px;
  }

  .liquid-section {
    padding: 100px 24px;
  }

  .section-title {
    font-size: 36px;
  }

  .section-description {
    font-size: 17px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 500px;
  }

  .feature-card {
    padding: 36px 28px;
  }

  footer {
    padding: 100px 24px 50px;
  }

  .footer-title {
    font-size: 36px;
  }
}

/* Medium Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  nav {
    padding: 18px 30px;
  }

  .nav-items {
    gap: 16px;
  }

  .nav-link {
    font-size: 13px;
  }

  .blackhole {
    width: 400px;
    height: 400px;
  }

  .event-horizon {
    width: 240px;
    height: 240px;
  }

  .accretion-disk {
    width: 420px;
    height: 420px;
  }

  .hero-content {
    padding: 0 30px;
  }

  .hero-title {
    font-size: 52px;
  }

  .hero-description {
    font-size: 18px;
  }

  .cta-group {
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .cta {
    min-width: 160px;
  }

  .liquid-section {
    padding: 120px 30px;
  }

  .section-title {
    font-size: 48px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 500px;
  }

  .feature-card {
    padding: 40px 32px;
    max-width: 500px;
    margin: 0 auto;
  }

  footer {
    padding: 100px 30px 50px;
  }

  .footer-title {
    font-size: 42px;
  }
}

/* Large Devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  nav {
    padding: 20px 40px;
  }

  .nav-items {
    gap: 20px;
  }

  .nav-link {
    font-size: 13px;
  }

  .blackhole {
    width: 450px;
    height: 450px;
  }

  .hero-content {
    padding: 0 40px;
  }

  .hero-title {
    font-size: 64px;
  }

  .cta-group {
    flex-direction: row;
    gap: 18px;
  }

  .liquid-section {
    padding: 140px 40px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
  }

  .feature-card {
    padding: 44px 36px;
  }

  footer {
    padding: 110px 40px 55px;
  }
}

/* Extra Large Devices (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  nav {
    padding: 25px 50px;
  }

  .nav-items {
    gap: 30px;
  }

  .blackhole {
    width: 500px;
    height: 500px;
  }

  .hero-content {
    padding: 0 50px;
  }

  .hero-title {
    font-size: 80px;
  }

  .liquid-section {
    padding: 150px 50px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 900px;
  }

  .feature-card {
    padding: 42px 34px;
  }

  footer {
    padding: 115px 50px 58px;
  }
}

/* XXL Devices (1200px and up) */
@media (min-width: 1200px) {
  nav {
    padding: 30px 60px;
  }

  .nav-items {
    gap: 50px;
  }

  .blackhole {
    width: 600px;
    height: 600px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .nav-container {
    max-width: 1600px;
  }

  .section-container {
    max-width: 1600px;
  }

  .blackhole {
    width: 700px;
    height: 700px;
  }

  .hero-title {
    font-size: 140px;
  }

  .features-grid {
    gap: 40px;
  }

  .feature-card {
    padding: 56px 48px;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 60px 0;
  }

  .blackhole {
    width: 300px;
    height: 300px;
  }

  .hero-content {
    margin-top: 40px;
  }

  .hero-title {
    font-size: 48px;
    margin-bottom: 20px;
  }

  .hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .liquid-section {
    padding: 80px 30px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cursor::before {
    filter: blur(1px);
  }

  .feature-card {
    border-width: 0.5px;
  }

  .viz-bar {
    width: 1.5px;
  }

  .lens-ring {
    --ring-thickness: 1px;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .blackhole {
    animation: none;
  }

  .accretion-disk {
    animation: none;
  }

  .wave {
    animation: none;
  }

  .hero-audio__toggle[data-state="playing"] .hero-audio__pulse,
  .viz-bar {
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  .cursor,
  .cursor-trail,
  nav,
  .sound-waves,
  .hero-audio,
  .sound-viz,
  #starfield-canvas {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .hero,
  .liquid-section {
    page-break-inside: avoid;
  }
}

/* Loading Screen */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cosmos);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-blackhole {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 40%,
    transparent 50%
  );
  animation: loaderSpin 2s linear infinite;
}

@keyframes loaderSpin {
  from {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}
