@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Space+Grotesk:wght@300..700&display=swap');

/* --- Custom CSS Properties for GPU Animation --- */
@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg-color: #0F172A;
  /* Deep Midnight Blue */
  --glow-blue: rgba(59, 130, 246, 0.45);
  --glow-purple: rgba(139, 92, 246, 0.4);
  --glow-cyan: rgba(6, 182, 212, 0.3);
  --glow-pink: rgba(236, 72, 153, 0.35);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans: 'Geist', sans-serif;
}

/* --- Base Reset & Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  font-family: var(--font-sans);
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Full-Screen Cinematic Scene --- */
.scene-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  perspective: 1000px;
}

/* Deep background backdrop */
.deep-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 100%, #1E1B4B 0%, #0F172A 70%, #030712 100%);
  z-index: 1;
}

/* Cinematic reveal overlay (Reveal from pitch darkness) */
.intro-overlay {
  position: fixed;
  inset: 0;
  background-color: #030712;
  z-index: 9999;
  pointer-events: none;
  animation: fade-out-overlay 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity;
}

@keyframes fade-out-overlay {
  0% {
    opacity: 1;
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Animated living film grain */
.noise-overlay {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.024'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 5;
  animation: grain-animation 0.8s steps(6) infinite;
  will-change: transform;
}

@keyframes grain-animation {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-1%, -1%);
  }

  20% {
    transform: translate(-2%, 1%);
  }

  30% {
    transform: translate(1%, -2%);
  }

  40% {
    transform: translate(-1%, 2%);
  }

  50% {
    transform: translate(-2%, 1%);
  }

  60% {
    transform: translate(2%, -1%);
  }

  70% {
    transform: translate(1%, 2%);
  }

  80% {
    transform: translate(-2%, -2%);
  }

  90% {
    transform: translate(2%, 1%);
  }
}

/* Volumetric bottom depth fog */
.depth-fog {
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 110%;
  height: 60%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0) 100%);
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* --- Flowing Aurora Background Gradients --- */
.aurora-container {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  overflow: hidden;
  z-index: 2;
  filter: blur(140px);
  opacity: 0.82;
  mix-blend-mode: screen;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.aurora-blue {
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--glow-blue) 0%, rgba(59, 130, 246, 0) 70%);
  top: -10%;
  left: -10%;
  animation: float-aurora-blue 28s ease-in-out infinite alternate;
}

.aurora-purple {
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, var(--glow-purple) 0%, rgba(139, 92, 246, 0) 75%);
  bottom: -20%;
  right: -15%;
  animation: float-aurora-purple 34s ease-in-out infinite alternate;
}

.aurora-cyan {
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--glow-cyan) 0%, rgba(6, 182, 212, 0) 70%);
  top: 30%;
  left: 25%;
  animation: float-aurora-cyan 22s ease-in-out infinite alternate;
}

.aurora-pink {
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, var(--glow-pink) 0%, rgba(236, 72, 153, 0) 70%);
  bottom: 20%;
  left: 10%;
  animation: float-aurora-pink 30s ease-in-out infinite alternate;
}

@keyframes float-aurora-blue {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  50% {
    transform: translate(12vw, 8vh) scale(1.12) rotate(120deg);
  }

  100% {
    transform: translate(4vw, 16vh) scale(0.92) rotate(240deg);
  }
}

@keyframes float-aurora-purple {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  50% {
    transform: translate(-8vw, -12vh) scale(1.08) rotate(-90deg);
  }

  100% {
    transform: translate(-16vw, -4vh) scale(1.15) rotate(-180deg);
  }
}

@keyframes float-aurora-cyan {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-6vw, 10vh) scale(1.15) rotate(180deg);
  }

  100% {
    transform: translate(8vw, -6vh) scale(0.85) rotate(360deg);
  }
}

@keyframes float-aurora-pink {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(8vw, -10vh) scale(1.18) rotate(180deg);
  }
  100% {
    transform: translate(-4vw, 5vh) scale(0.9) rotate(360deg);
  }
}

/* --- Volumetric Conic Light Rays --- */
.light-rays {
  position: absolute;
  inset: -50%;
  z-index: 2;
  background: conic-gradient(from var(--border-angle) at 50% 30%,
      transparent 0deg,
      rgba(59, 130, 246, 0.04) 15deg,
      transparent 45deg,
      rgba(139, 92, 246, 0.06) 100deg,
      transparent 130deg,
      rgba(6, 182, 212, 0.04) 210deg,
      transparent 240deg,
      transparent 360deg);
  mix-blend-mode: color-dodge;
  pointer-events: none;
  animation: rotate-rays 100s linear infinite;
  will-change: transform;
  filter: blur(8px);
}

@keyframes rotate-rays {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- Neural Network Particles Canvas --- */
.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* --- Parallax Card Wrapper --- */
.parallax-container {
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
  will-change: transform;
  transition: transform 0.12s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Premium Floating Crystal-Glass Card --- */
.glass-panel {
  position: relative;
  width: 100%;
  max-width: 530px;
  padding: 55px 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 45px;
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform;

  /* Frosted transparency & blur */
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 28px;

  /* Initial fallback border */
  border: 1px solid rgba(255, 255, 255, 0.08);

  /* Multiple layer high-end box shadows */
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 12px 24px rgba(255, 255, 255, 0.02),
    0 30px 70px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(59, 130, 246, 0.15),
    0 0 90px rgba(139, 92, 246, 0.1);

  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Luminous Rotating Border */
.glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 1.5px;
  /* border thickness */
  background: conic-gradient(from var(--border-angle),
      rgba(255, 255, 255, 0.25) 0deg,
      rgba(59, 130, 246, 0.45) 90deg,
      rgba(139, 92, 246, 0.45) 180deg,
      rgba(6, 182, 212, 0.45) 270deg,
      rgba(255, 255, 255, 0.25) 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: rotate-border 7s linear infinite;
  z-index: 2;
}

@keyframes rotate-border {
  0% {
    --border-angle: 0deg;
  }

  100% {
    --border-angle: 360deg;
  }
}

/* Ambient Backlighting Volumetric Flare centered directly behind the logo */
.glass-panel::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 70%);
  top: -20%;
  left: -20%;
  pointer-events: none;
  z-index: -1;
  filter: blur(25px);
}

/* Realistic Glass reflection sheen layer */
.glass-reflection {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle at calc(50% + var(--reflection-x, 0) * 1px) calc(50% + var(--reflection-y, 0) * 1px),
      rgba(255, 255, 255, 0.06) 0%,
      transparent 55%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  will-change: background;
}

/* --- Expanding Energy Rings (behind card) --- */
.energy-rings-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 0;
}

.energy-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.12);
  width: 320px;
  height: 320px;
  transform: translateZ(-35px);
  animation: energy-pulse 7.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  opacity: 0;
  will-change: transform, opacity;
}

.energy-ring:nth-child(2) {
  animation-delay: 2.5s;
  border-color: rgba(139, 92, 246, 0.12);
  width: 340px;
  height: 340px;
}

.energy-ring:nth-child(3) {
  animation-delay: 5s;
  border-color: rgba(6, 182, 212, 0.12);
  width: 360px;
  height: 360px;
}

@keyframes energy-pulse {
  0% {
    transform: scale(0.7) translateZ(-35px);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    transform: scale(2.3) translateZ(-35px);
    opacity: 0;
  }
}

/* --- Premium Lens Flare (atop card) --- */
.lens-flare {
  position: absolute;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(139, 92, 246, 0.08) 35%, rgba(6, 182, 212, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  top: -12%;
  left: -12%;
  filter: blur(12px);
  mix-blend-mode: screen;
  animation: flare-glow 12s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes flare-glow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.65;
  }

  100% {
    transform: translate(25px, 20px) scale(1.12);
    opacity: 0.85;
  }
}

/* --- Brand Logo Container --- */
.logo-wrapper {
  position: relative;
  width: clamp(260px, 60vw, 420px);
  height: auto;
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateZ(50px);
  /* 3D depth pop out */
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.75));
  animation: logo-float 6s ease-in-out infinite;
  will-change: transform;
}

.m8a-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  /* Strips black background and merges metal shines */
}

@keyframes logo-float {

  0%,
  100% {
    transform: translateZ(50px) translateY(0);
  }

  50% {
    transform: translateZ(62px) translateY(-10px);
  }
}

/* --- Card Sub-text (Inside Glass Card) --- */
.card-sub-text {
  font-family: var(--font-sans);
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.48em;
  margin-right: -0.48em;
  color: rgba(165, 243, 252, 0.7); /* Soft glowing cyan */
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
  transform: translateZ(28px);
  margin-top: -12px;
  will-change: transform, opacity;
}

/* --- Bezel Dots on Card Edges --- */
.glass-bezel-dot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 1px 1.5px rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) translateZ(10px);
  pointer-events: none;
}
.glass-bezel-dot.left-dot { left: 18px; }
.glass-bezel-dot.right-dot { right: 18px; }

/* --- Concentric Hologram Floor Projector Ripples --- */
.ripple-floor {
  position: absolute;
  bottom: -40px;
  width: 100%;
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transform: rotateX(78deg) translateY(40px);
  transform-style: preserve-3d;
  z-index: 1;
}

.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 130, 246, 0.22);
  box-shadow: 
    0 0 15px rgba(59, 130, 246, 0.18),
    inset 0 0 15px rgba(59, 130, 246, 0.08);
  width: 200px;
  height: 200px;
  animation: ripple-out 8s linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}

.ripple-ring:nth-child(2) {
  animation-delay: 2.66s;
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: 
    0 0 15px rgba(139, 92, 246, 0.18),
    inset 0 0 15px rgba(139, 92, 246, 0.08);
}

.ripple-ring:nth-child(3) {
  animation-delay: 5.33s;
  border-color: rgba(6, 182, 212, 0.18);
  box-shadow: 
    0 0 15px rgba(6, 182, 212, 0.12),
    inset 0 0 15px rgba(6, 182, 212, 0.05);
}

@keyframes ripple-out {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* --- Typography Wrapper (COMING SOON & Cosmic Subtexts) --- */
.coming-soon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  transform: translateZ(20px);
  will-change: transform, opacity;
}

.coming-soon-text {
  font-family: var(--font-display);
  font-size: clamp(2.0rem, 5.5vw, 3.4rem); /* Large mockup typography */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6em;
  margin-right: -0.6em;
  
  /* Luminous metallic texture gradient */
  background: linear-gradient(180deg, #FFFFFF 0%, #E5E7EB 50%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* Subtle glow */
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 45px rgba(59, 130, 246, 0.25);
    
  animation: breathing-glow 8s ease-in-out infinite alternate;
}

.cosmic-subtexts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtext-line {
  font-family: var(--font-sans);
  font-size: clamp(0.58rem, 1.6vw, 0.72rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.52em;
  margin-right: -0.52em;
  color: rgba(59, 130, 246, 0.85); /* Cyan glow text */
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.subtext-line:nth-child(2) {
  color: rgba(139, 92, 246, 0.8); /* Purple glow text */
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

@keyframes breathing-glow {
  0% {
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.08));
    letter-spacing: 0.58em;
  }

  100% {
    filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.28));
    letter-spacing: 0.62em;
  }
}

/* --- Cinematic Reveal Intro Sequence Target Properties --- */
.fade-in-element {
  opacity: 0;
  filter: blur(10px);
  will-change: transform, opacity, filter;
}

/* --- Interactive Spotlight Cursor Trail --- */
.cursor-light {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.015) 40%, transparent 70%);
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: screen;
  transition: opacity 0.6s ease;
  opacity: 0;
}

body:hover .cursor-light {
  opacity: 1;
}

/* --- Responsive Adaptations --- */
@media (max-width: 768px) {
  .glass-panel {
    max-width: 320px;
    padding: 30px 20px;
    gap: 22px;
    border-radius: 18px;
  }

  .glass-panel::before {
    border-radius: 18px;
  }

  .glass-bezel-dot {
    width: 5px;
    height: 5px;
  }
  .glass-bezel-dot.left-dot { left: 10px; }
  .glass-bezel-dot.right-dot { right: 10px; }

  .logo-wrapper {
    width: clamp(180px, 70vw, 230px);
  }

  .card-sub-text {
    font-size: clamp(0.48rem, 2.5vw, 0.58rem);
    letter-spacing: 0.38em;
    margin-right: -0.38em;
  }

  .coming-soon-wrapper {
    gap: 12px;
    margin-top: 15px;
  }

  .coming-soon-text {
    font-size: clamp(1.4rem, 6.5vw, 1.85rem);
    letter-spacing: 0.5em;
    margin-right: -0.5em;
  }

  .subtext-line {
    font-size: clamp(0.48rem, 2.8vw, 0.56rem);
    letter-spacing: 0.42em;
    margin-right: -0.42em;
  }
  
  .energy-ring {
    width: 220px;
    height: 220px;
  }
  
  .energy-ring:nth-child(2) {
    width: 230px;
    height: 230px;
  }
  
  .energy-ring:nth-child(3) {
    width: 240px;
    height: 240px;
  }
  
  .lens-flare {
    width: 170px;
    height: 170px;
  }

  .ripple-floor {
    bottom: -20px;
    height: 200px;
  }
}

@media (min-width: 2000px) {
  .glass-panel {
    max-width: 720px;
    padding: 70px 60px;
    gap: 60px;
    border-radius: 36px;
  }
  
  .glass-panel::before {
    border-radius: 36px;
  }

  .logo-wrapper {
    width: 580px;
  }

  .card-sub-text {
    font-size: 1.1rem;
    letter-spacing: 0.6em;
    margin-right: -0.6em;
  }

  .coming-soon-wrapper {
    gap: 26px;
    margin-top: 50px;
  }

  .coming-soon-text {
    font-size: 4.5rem;
    letter-spacing: 0.7em;
    margin-right: -0.7em;
  }

  .subtext-line {
    font-size: 1.1rem;
    letter-spacing: 0.65em;
    margin-right: -0.65em;
  }
  
  .energy-ring {
    width: 440px;
    height: 440px;
  }
  
  .energy-ring:nth-child(2) {
    width: 460px;
    height: 460px;
  }
  
  .energy-ring:nth-child(3) {
    width: 480px;
    height: 480px;
  }
}