/* ============================================
   WebXR Portal Door - Modern Immersive Styles
   Ocean Blue Theme
   ============================================ */

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

:root {
  --primary: #0ea5e9;
  --primary-light: #38bdf8;
  --primary-dark: #0284c7;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --bg-dark: #0a1929;
  --bg-darker: #060e1a;
  --bg-card: rgba(10, 25, 41, 0.6);
  --bg-card-solid: rgba(10, 25, 41, 0.85);
  --text: #f0f9ff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(14, 165, 233, 0.15);
  --border-hover: rgba(14, 165, 233, 0.4);
  --glow: rgba(14, 165, 233, 0.25);
  --glow-strong: rgba(14, 165, 233, 0.45);
  --glass-blur: 24px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Animated Gradient Background --- */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-animation::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse 600px 600px at 20% 20%, rgba(14, 165, 233, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 60% 40%, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  animation: bgDrift 25s ease-in-out infinite alternate;
}

.bg-animation::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 800px at 75% 25%, rgba(2, 132, 199, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 600px 600px at 25% 75%, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
  animation: bgDriftReverse 30s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -40px) scale(1.05); }
  66%  { transform: translate(-20px, 25px) scale(0.98); }
  100% { transform: translate(15px, -15px) scale(1.02); }
}

@keyframes bgDriftReverse {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(-25px, 30px) rotate(1deg); }
  100% { transform: translate(20px, -20px) rotate(-1deg); }
}

/* Floating orbs for extra depth */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.bg-orb--1 {
  width: 400px;
  height: 400px;
  top: 10%;
  left: -10%;
  background: var(--primary);
  animation: orbFloat1 20s ease-in-out infinite;
}

.bg-orb--2 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  right: -5%;
  background: var(--accent);
  animation: orbFloat2 25s ease-in-out infinite;
}

.bg-orb--3 {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  background: var(--accent-light);
  animation: orbFloat3 18s ease-in-out infinite;
  opacity: 0.2;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  25%  { transform: translate(60px, 40px); }
  50%  { transform: translate(20px, 80px); }
  75%  { transform: translate(-30px, 30px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  25%  { transform: translate(-50px, -30px); }
  50%  { transform: translate(-20px, -60px); }
  75%  { transform: translate(40px, -20px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33%  { transform: translate(-40%, -60%) scale(1.1); }
  66%  { transform: translate(-60%, -40%) scale(0.9); }
}

/* --- Loading Screen --- */
#loading {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Portal-style loader */
.loader {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 32px;
}

.loader-portal {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loader-portal:nth-child(1) {
  border-top-color: var(--primary-light);
  border-right-color: var(--primary-light);
  animation: portalSpin 1.4s cubic-bezier(0.6, 0.15, 0.35, 0.85) infinite;
}

.loader-portal:nth-child(2) {
  inset: 10px;
  border-bottom-color: var(--accent);
  border-left-color: var(--accent);
  animation: portalSpin 1.8s cubic-bezier(0.6, 0.15, 0.35, 0.85) infinite reverse;
}

.loader-portal:nth-child(3) {
  inset: 20px;
  border-top-color: var(--accent-light);
  animation: portalSpin 1s cubic-bezier(0.6, 0.15, 0.35, 0.85) infinite;
}

.loader-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--glow-strong), 0 0 40px var(--glow);
  animation: corePulse 1.5s ease-in-out infinite;
}

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

@keyframes corePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%      { transform: translate(-50%, -50%) scale(1.5); opacity: 0.7; }
}

/* Progress bar under loader */
.loader-progress {
  width: 200px;
  height: 3px;
  background: rgba(14, 165, 233, 0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent-light));
  border-radius: 10px;
  animation: progressFill 2s ease-in-out forwards;
  box-shadow: 0 0 10px var(--glow);
}

@keyframes progressFill {
  0%   { width: 0%; }
  30%  { width: 40%; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

#loading p {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  animation: textFade 2s ease-in-out infinite alternate;
}

@keyframes textFade {
  0%   { opacity: 0.6; }
  100% { opacity: 1; }
}

/* --- UI Layer --- */
#ui-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

/* --- Glass-morphism Header Card --- */
.header {
  pointer-events: auto;
  max-width: 560px;
  width: 100%;
  padding: 48px 40px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(14, 165, 233, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Subtle shimmer on card border */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(14, 165, 233, 0.06),
    transparent
  );
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { left: -100%; }
  50%      { left: 100%; }
}

/* Top accent line on card */
.header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), var(--accent-light), transparent);
}

.header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--accent-light) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  font-weight: 400;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Button Group --- */
.button-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

/* --- Primary AR Button --- */
.ar-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-smooth);
  box-shadow:
    0 4px 20px var(--glow),
    0 0 0 0 var(--glow);
  overflow: hidden;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Shimmer sweep effect */
.ar-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.ar-button:hover::before {
  left: 130%;
}

.ar-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 30px var(--glow-strong),
    0 0 60px rgba(14, 165, 233, 0.15);
}

.ar-button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
  box-shadow:
    0 4px 20px var(--glow),
    0 0 0 4px rgba(34, 211, 238, 0.3);
}

.ar-button:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

/* Pulse ring animation on button */
.ar-button:not([style*="not-allowed"]) {
  animation: buttonPulse 3s ease-in-out infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--glow), 0 0 0 0 rgba(14, 165, 233, 0.3); }
  50%      { box-shadow: 0 4px 20px var(--glow), 0 0 0 8px rgba(14, 165, 233, 0); }
}

/* Disabled state */
.ar-button[style*="not-allowed"],
.ar-button:disabled {
  animation: none;
  cursor: not-allowed;
  opacity: 0.5;
  filter: grayscale(0.5);
}

/* --- Status Text --- */
.status-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  font-weight: 400;
  transition: color var(--transition-fast);
}

.status-text:hover {
  color: var(--text-muted);
}

/* --- Bottom Status Bar --- */
#status {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card-solid);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--primary-light);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 100;
  display: none;
  border: 1px solid var(--border);
  text-align: center;
  max-width: calc(100vw - 40px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(14, 165, 233, 0.08);
  letter-spacing: 0.02em;
  animation: statusSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes statusSlideUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* --- Reticle Guide --- */
#reticle-guide {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 50%;
  z-index: 50;
  display: none;
  pointer-events: none;
  animation: reticlePulse 2s ease-in-out infinite;
}

#reticle-guide::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--primary-light);
}

#reticle-guide::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 50%;
  animation: reticleExpand 2s ease-in-out infinite;
}

@keyframes reticlePulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 0.8; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes reticleExpand {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.3); opacity: 0; }
}

/* --- Scene Container --- */
#scene-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* --- Decorative Particles (CSS only, for landing page feel) --- */
.particle-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle-field::before,
.particle-field::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-light);
  border-radius: 50%;
  box-shadow:
    10vw 20vh 0 0 rgba(56, 189, 248, 0.3),
    30vw 60vh 0 0 rgba(34, 211, 238, 0.2),
    50vw 10vh 0 0 rgba(14, 165, 233, 0.25),
    70vw 80vh 0 0 rgba(6, 182, 212, 0.3),
    85vw 40vh 0 0 rgba(56, 189, 248, 0.15),
    15vw 90vh 0 0 rgba(34, 211, 238, 0.2),
    45vw 50vh 0 0 rgba(14, 165, 233, 0.2),
    65vw 30vh 0 0 rgba(6, 182, 212, 0.25),
    25vw 75vh 0 0 rgba(56, 189, 248, 0.15),
    90vw 15vh 0 0 rgba(34, 211, 238, 0.2);
  animation: particlesDrift 30s linear infinite;
}

.particle-field::after {
  animation: particlesDrift 25s linear infinite reverse;
  width: 3px;
  height: 3px;
  box-shadow:
    20vw 45vh 0 0 rgba(56, 189, 248, 0.2),
    40vw 85vh 0 0 rgba(34, 211, 238, 0.15),
    60vw 20vh 0 0 rgba(14, 165, 233, 0.2),
    80vw 65vh 0 0 rgba(6, 182, 212, 0.15),
    10vw 35vh 0 0 rgba(56, 189, 248, 0.1),
    55vw 55vh 0 0 rgba(34, 211, 238, 0.2);
}

@keyframes particlesDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-100vh); }
}

/* --- Nav Links (for extended layouts) --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 15, 30, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px var(--glow);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.logo:hover {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 6px 24px var(--glow-strong);
}

.brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 28px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text);
}

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

.nav-links a:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --- Feature Cards (glass-morphism) --- */
.features-section {
  padding: 100px 40px;
  position: relative;
}

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

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Gradient overlay on hover */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.08) 0%,
    rgba(6, 182, 212, 0.05) 50%,
    rgba(34, 211, 238, 0.03) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

/* Top border accent */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
  transform-origin: left;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow:
    0 12px 40px rgba(14, 165, 233, 0.15),
    0 0 60px rgba(14, 165, 233, 0.05);
}

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

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-card:focus-within {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 18px;
  display: inline-block;
  transition: transform var(--transition-spring);
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) translateY(-2px);
}

.feature-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.feature-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* --- Hero (legacy support) --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
  letter-spacing: 0.04em;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.title-line {
  display: block;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light), var(--primary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 130%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 6px 24px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 36px var(--glow-strong);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  transition: transform var(--transition-smooth);
}

.stat:hover {
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 4px;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-stats {
    gap: 24px;
  }

  .features-section {
    padding: 60px 16px;
  }

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

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

  .header {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
    margin: 16px;
  }

  .ar-button {
    padding: 16px 32px;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }

  .subtitle {
    margin-bottom: 28px;
    font-size: 0.95rem;
  }

  .bg-orb--1 {
    width: 250px;
    height: 250px;
  }

  .bg-orb--2 {
    width: 200px;
    height: 200px;
  }

  .bg-orb--3 {
    width: 150px;
    height: 150px;
  }

  #status {
    bottom: 16px;
    padding: 12px 20px;
    font-size: 0.8rem;
    max-width: calc(100vw - 32px);
  }

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

@media (max-width: 480px) {
  .header {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .loader {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
  }

  .loader-progress {
    width: 160px;
  }

  #reticle-guide {
    width: 40px;
    height: 40px;
  }
}

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

  .bg-animation::before,
  .bg-animation::after {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(14, 165, 233, 0.5);
    --text-muted: #b0c4de;
  }

  .header {
    border-width: 2px;
  }

  .ar-button {
    border: 2px solid var(--accent-light);
  }
}

/* Dark light sensor - enhance on very dark environments */
@media (prefers-color-scheme: dark) {
  .bg-orb {
    opacity: 0.5;
  }
}
