html {
  background-color: #000 !important;
  height: 100%; overflow-x: hidden; scroll-behavior: smooth;
}
body {
  background-color: #000; color: #f5f5f7; margin: 0; padding: 0;
  min-height: 100%; -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative;
}

.text-hero { font-size: clamp(2.5rem, 8vw, 7rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1.05; }
.text-headline { font-size: clamp(2rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }

.glass-panel {
  background: rgba(29, 29, 31, 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 2rem;
}

.media-container {
  border: 1px solid #333333;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  position: relative;
  transform: translateZ(0);
}

.media-container::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0), inset 0 0 20px rgba(0, 113, 227, 0);
  transition: box-shadow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
}

.media-container img {
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

@media (min-width: 769px) {
  .media-container:hover::after {
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.4), inset 0 0 30px rgba(0, 113, 227, 0.2);
  }
  .media-container:hover img {
    transform: scale(1.03);
  }
}

.media-filter {
  filter: saturate(0.8) brightness(0.8);
  transition: filter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) {
  .media-filter:hover { filter: saturate(1) brightness(1); }
}
.media-filter.in-view { filter: saturate(1) brightness(1); }

.play-overlay {
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shimmer-btn {
  position: relative;
  overflow: hidden;
}
@media (min-width: 769px) {
  .shimmer-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
  }
  .shimmer-btn:hover::after {
    animation: shimmerSweep 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  @keyframes shimmerSweep {
    100% { left: 150%; }
  }
}

.btn-blue, .btn-glass {
  border-radius: 9999px; font-weight: 500;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-blue { background-color: #0071e3; color: white; border: 1px solid transparent; }
.btn-glass {
  background-color: rgba(255, 255, 255, 0.1); color: white;
  backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2);
}

.haptic-trigger {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}
.haptic-trigger:active {
  transform: scale(0.97) !important;
  opacity: 0.8 !important;
  transition: transform 0.1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

@keyframes slowBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.breathe-element {
  will-change: transform;
  transform-origin: center center;
}
.breathe-active {
  animation: slowBreathe 20s ease-in-out infinite;
}

#dock-expanded {
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: bottom center;
}
#dock-expanded.active {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: auto;
}

@keyframes drawEye {
  0% { stroke-dashoffset: 250; }
  100% { stroke-dashoffset: 0; }
}
.animate-draw-eye { animation: drawEye 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

@keyframes eyeBlink {
  0% { d: path("M 5 50 Q 50 10 95 50 Q 50 90 5 50 Z"); }
  35% { d: path("M 5 50 Q 50 48 95 50 Q 50 52 5 50 Z"); }
  45% { d: path("M 5 50 Q 50 50 95 50 Q 50 50 5 50 Z"); }
  100% { d: path("M 5 50 Q 50 -10 95 50 Q 50 110 5 50 Z"); }
}

@keyframes pupilBlink {
  0% { transform: scale(1); opacity: 1; background-color: #ffffff; }
  35% { transform: scale(0.1); opacity: 0.5; background-color: #ffffff; }
  45% { transform: scale(0); opacity: 0; background-color: #0071e3; }
  100% { transform: scale(8); opacity: 0; background-color: #0071e3; }
}

.unlock-success .eye-shape { animation: eyeBlink 0.7s cubic-bezier(0.8, 0, 0.2, 1) forwards; }
.unlock-success #unlock-ring { stroke: #0077ED; filter: drop-shadow(0 0 12px rgba(0, 113, 227, 0.6)); }
.unlock-success #unlock-core { animation: pupilBlink 0.7s cubic-bezier(0.8, 0, 0.2, 1) forwards; }
.unlock-success .eye-pupil-bg { opacity: 0; }
.unlock-success #unlock-text { color: #0071e3; text-shadow: 0 0 8px rgba(0, 113, 227, 0.4); }

nav {
  background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-link {
  font-size: 12px; color: #e8e8ed; transition: color 0.2s ease; opacity: 0.8;
  position: relative; padding-bottom: 4px;
}
.nav-link::after {
  content: ''; position: absolute; width: 0; height: 1px;
  bottom: 0; left: 0; background-color: #fff;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover { color: #fff; opacity: 1; }
.nav-link:hover::after { width: 100%; }

.io-reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.io-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  #home { height: 60dvh !important; max-height: 65dvh !important; }
  #hero-bg { background-size: cover !important; background-position: center !important; height: 100% !important; top: 0 !important; }

  #intro-section {
    padding-top: 40px !important;
    position: relative;
    z-index: 50;
  }

  #intro-title { margin-top: 0 !important; }

  #main-nav .desktop-nav { display: none !important; }

  body, html {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .tactical-dock {
    z-index: 999 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-button-container {
    position: relative;
    z-index: 1;
  }
  .mobile-button-container > *:not(:last-child) {
    margin-bottom: 20px;
  }
  .mobile-button-container > *:last-child {
    margin-bottom: 60px;
  }
}

@media (max-width: 768px) {
  html, body { -ms-overflow-style: none; scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
}

@media (min-width: 769px) {
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: #000000; }
  ::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 10px;
    border: 2px solid #000000;
    transition: background 0.3s ease;
  }
  ::-webkit-scrollbar-thumb:hover { background: #0071e3; }
}

@media (max-width: 768px) {
  #side-nav {
    top: 50%;
    right: 20px;
    transform: translate(0, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  #side-nav.is-visible {
    transform: translate(0, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .side-nav-dot {
    width: 12px;
    height: 2px;
    background-color: #333333;
    border-radius: 2px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    padding: 0;
    border: none;
    outline: none;
  }
  .side-nav-dot:hover:not(.active) {
    background-color: #ffffff;
    width: 16px;
  }
  .side-nav-dot.active {
    background-color: #0071e3;
    width: 24px;
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.6);
  }
}

@media (min-width: 769px) {
  #side-nav {
    top: 50%;
    right: 20px;
    transform: translate(0, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  #side-nav.is-visible {
    transform: translate(0, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .side-nav-dot {
    width: 12px;
    height: 2px;
    background-color: #333333;
    border-radius: 2px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    padding: 0;
    border: none;
    outline: none;
  }
  .side-nav-dot:hover:not(.active) {
    background-color: #ffffff;
    width: 16px;
  }
  .side-nav-dot.active {
    background-color: #0071e3;
    width: 24px;
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.6);
  }
}

#theater-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 8000; opacity: 0; pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.theater-active #theater-overlay {
  opacity: 1; pointer-events: auto;
}
body.theater-active main > *:not(.theater-focus-section) {
  opacity: 0.1; pointer-events: none;
}
body.theater-active nav, body.theater-active #side-nav, body.theater-active #mobile-dock-container {
  opacity: 0.1; pointer-events: none;
}
.theater-focus-section {
  position: relative; z-index: 8010;
}
main > * { transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }

#btn-exit-theater-fixed {
  opacity: 0; pointer-events: none; transform: translateY(-20px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.theater-active #btn-exit-theater-fixed {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

#hero-video-container {
  position: absolute; inset: 0; z-index: 20; opacity: 0; pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.theater-active #hero-video-container {
  opacity: 1; pointer-events: auto;
}

@keyframes chromaticGlitch {
  0% { text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(0,255,255,0.8); transform: translate(1px, -1px); }
  20% { text-shadow: -2px 2px 0 rgba(255,0,0,0.8), 2px -2px 0 rgba(0,255,255,0.8); transform: translate(-1px, 1px); }
  40% { text-shadow: 2px -2px 0 rgba(255,0,0,0.8), -2px 2px 0 rgba(0,255,255,0.8); transform: translate(0, 0); }
  60% { text-shadow: -2px 0 0 rgba(255,0,0,0.8), 2px 0 0 rgba(0,255,255,0.8); transform: translate(1px, 1px); }
  80% { text-shadow: 2px 2px 0 rgba(255,0,0,0.8), -2px -2px 0 rgba(0,255,255,0.8); transform: translate(-1px, -1px); }
  100% { text-shadow: 0 0 0 transparent; transform: translate(0, 0); }
}
.glitch-active { animation: chromaticGlitch 0.1s infinite; }

/* Scroll-triggered animations */
@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.7); }
  50% { box-shadow: 0 0 0 15px rgba(0, 113, 227, 0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-slide-left { animation: slideInFromLeft 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.animate-slide-right { animation: slideInFromRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.animate-fade-up { animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.animate-scale-in { animation: scaleIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.animate-pulse-glow { animation: pulseGlow 2s infinite; }
.animate-float { animation: float 6s ease-in-out infinite; }

/* Stagger animations */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* Button hover animations */
.btn-blue, .btn-glass {
  position: relative;
  overflow: hidden;
}
.btn-blue::before, .btn-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 0;
  border-radius: inherit;
}
.btn-blue:hover::before, .btn-glass:hover::before {
  left: 100%;
}

/* Text reveal animation */
@keyframes textReveal {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
.animate-text-reveal { animation: textReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* Glow effect on hover */
.glow-on-hover {
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.glow-on-hover:hover {
  filter: drop-shadow(0 0 15px rgba(0, 113, 227, 0.5));
  transform: scale(1.02);
}

/* Mobile-specific animations */
@media (max-width: 768px) {
  .mobile-slide-up {
    animation: slideInFromLeft 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .mobile-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  
  /* Reduce animation on lower-end devices */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* Desktop-specific animations */
@media (min-width: 769px) {
  .desktop-only-animation {
    animation: float 8s ease-in-out infinite;
  }
  
  .hero-element {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
  }
  
  .hero-element:nth-child(1) { animation-delay: 0.2s; }
  .hero-element:nth-child(2) { animation-delay: 0.4s; }
  .hero-element:nth-child(3) { animation-delay: 0.6s; }
}

/* Scroll parallax text effect */
.parallax-text {
  position: relative;
}
.parallax-text::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  opacity: 0.1;
}