/* ==========================================================================
   VigilMind - Modern Glassmorphic Design System
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --bg-obsidian: #050505;
  --bg-card: rgba(20, 20, 20, 0.6);
  --bg-card-hover: rgba(30, 30, 30, 0.8);
  --bg-input: rgba(10, 10, 10, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  
  --text-white: #f5f5f7;
  --text-dim: #94949e;
  --text-dark: #121212;
  
  --accent-glow: rgba(255, 255, 255, 0.15);
  --accent-light: rgba(255, 255, 255, 0.8);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  --section-spacing: 120px;
  --dock-height: 4.5rem;
}

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

html {
  background-color: var(--bg-obsidian);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-white);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Cinematic Ambient Glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.01) 0%, transparent 40%);
  pointer-events: none;
  z-index: -2;
}

/* Cinematic Dynamic Ambient Glow */
.ambient-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 75vw;
  height: 75vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
  transition: background 3s ease, transform 4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ambient-glow.glow-inhale {
  background: radial-gradient(circle at center, rgba(147, 197, 253, 0.12) 0%, transparent 70%);
  transform: translateX(-50%) scale(1.35);
  transition: background 4s ease, transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ambient-glow.glow-hold {
  background: radial-gradient(circle at center, rgba(253, 224, 71, 0.08) 0%, transparent 70%);
  transform: translateX(-50%) scale(1.35);
  transition: background 1.5s ease;
}

.ambient-glow.glow-exhale {
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.04) 0%, transparent 70%);
  transform: translateX(-50%) scale(0.85);
  transition: background 8s ease, transform 8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance-friendly Grain Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Accessibility & Focus --- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--text-white);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transform: translateY(-200%);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
}

/* --- Typography --- */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #ffffff 40%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

p.lead {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-dim);
  max-width: 600px;
  margin-inline: auto;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

p.sub-text {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 8rem; /* Space for the dock */
}

/* --- Watermark Header --- */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.25rem 5%;
  z-index: 1000;
  pointer-events: none;
  background-color: rgba(5, 5, 5, 0);
  border-bottom: 1px solid transparent;
  transition: 
    background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header.site-header.scrolled {
  background-color: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  padding: 1.25rem 5%;
  pointer-events: auto;
}

header.site-header a,
header.site-header div {
  pointer-events: auto;
}

header.site-header .logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

header.site-header .logo:hover {
  opacity: 1;
}

/* Dynamic status overlay */
header.site-header .status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(10, 10, 10, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-dim);
  box-shadow: 0 0 8px currentColor;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.calibrating-mode .status-indicator {
  color: #00ff66;
}

body.calibrating-mode .status-dot {
  background-color: #00ff66;
  animation: status-pulse 1.5s infinite alternate;
}

@keyframes status-pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* --- Visibility Helpers --- */
.mobile-only {
  display: none;
}

/* --- Floating Navigation Dock --- */
.floating-dock {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.dock-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: 
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
  text-decoration: none;
}

/* Link Hover state */
.dock-link:hover {
  color: var(--text-white);
  transform: scale(1.18) translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Dock Link Tooltip */
.dock-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

.dock-link:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Active State indicator */
.dock-link.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.dock-link.active::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-white);
  box-shadow: 0 0 8px var(--text-white);
}

/* Icon Mask Base styling */
.dock-link-icon {
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform 0.3s ease;
}

.dock-link:hover .dock-link-icon {
  transform: scale(1.05);
}

/* --- SVG Icon Paths Mapping --- */
.dock-home .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9' stroke-dasharray='40 16' transform='rotate(-45 12 12)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9' stroke-dasharray='40 16' transform='rotate(-45 12 12)'/%3E%3C/svg%3E");
}

.dock-explore .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='5' cy='5' r='1.5'/%3E%3Ccircle cx='19' cy='19' r='1.5'/%3E%3Ccircle cx='19' cy='5' r='1.5'/%3E%3Cpath d='M5 5l14 14M5 5l14 0'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='5' cy='5' r='1.5'/%3E%3Ccircle cx='19' cy='19' r='1.5'/%3E%3Ccircle cx='19' cy='5' r='1.5'/%3E%3Cpath d='M5 5l14 14M5 5l14 0'/%3E%3C/svg%3E");
}

.dock-vision .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v18M3 21h18L12 6zM2 15h20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v18M3 21h18L12 6zM2 15h20'/%3E%3C/svg%3E");
}

.dock-philosophy .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7v10l10 5 10-5V7l-10-5zM12 12l10-5M12 12v10M12 12L2 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7v10l10 5 10-5V7l-10-5zM12 12l10-5M12 12v10M12 12L2 7'/%3E%3C/svg%3E");
}

.dock-signal .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 12c2 0 2-3 4-3s2 3 4 3 2-8 2-8 2 14 2 14 2-6 4-6 2 3 4 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 12c2 0 2-3 4-3s2 3 4 3 2-8 2-8 2 14 2 14 2-6 4-6 2 3 4 3'/%3E%3C/svg%3E");
}

.dock-unfolding .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
}

.dock-contact .dock-link-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l9 5v10l-9 5-9-5V7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 15v3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l9 5v10l-9 5-9-5V7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 15v3'/%3E%3C/svg%3E");
}

@media (max-width: 480px) {
  .floating-dock {
    bottom: 1.5rem;
    gap: 0.4rem;
    padding: 0.5rem;
    width: 90%;
    justify-content: space-around;
  }

  .dock-link {
    width: 2.75rem;
    height: 2.75rem;
  }

  .dock-link-icon {
    width: 18px;
    height: 18px;
  }

  .dock-link::after {
    display: none; /* Hide tooltips on mobile */
  }

  @media (max-width: 360px) {
    .floating-dock {
      gap: 0.2rem;
      padding: 0.4rem;
      width: 95%;
    }

    .dock-link {
      width: 2.15rem;
      height: 2.15rem;
    }

    .dock-link-icon {
      width: 14px;
      height: 14px;
    }
  }

  header.site-header {
    padding: 1.5rem 5%;
  }
  header.site-header.scrolled {
    padding: 0.85rem 5%;
  }
}

/* --- Hero Section & Central Ring --- */
.hero-section {
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  position: relative;
}

.ring-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  position: relative;
  cursor: pointer;
}

/* Calibration Progress Circle */
.calibration-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  width: 240px;
  height: 240px;
  pointer-events: none;
  z-index: 5;
}

.calibration-progress-bar {
  fill: none;
  stroke: var(--text-white);
  stroke-width: 2px;
  stroke-dasharray: 628; /* Approx 2 * PI * 100 */
  stroke-dashoffset: 628;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px var(--text-white));
  opacity: 0;
}

body.calibrating-mode .calibration-progress-bar {
  opacity: 0.6;
}

/* Glowing ring redesign */
.glowing-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 80%);
  box-shadow:
    0 0 30px rgba(255, 255, 255, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.08);
  animation: pulse-idle 8s ease-in-out infinite alternate;
  transition: 
    transform 4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 4s ease;
  z-index: 2;
}

.ring-container:hover .glowing-ring {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 40px rgba(255, 255, 255, 0.25),
    inset 0 0 30px rgba(255, 255, 255, 0.12);
}

@keyframes pulse-idle {
  0% {
    transform: scale(0.97);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.05);
  }
  100% {
    transform: scale(1.03);
    box-shadow: 0 0 45px rgba(255, 255, 255, 0.25), inset 0 0 35px rgba(255, 255, 255, 0.12);
  }
}

/* Breathing Animation States (JS Driven) */
.glowing-ring.breath-inhale {
  transform: scale(1.35) !important;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.05);
  transition-duration: 4s;
}

.glowing-ring.breath-hold {
  transform: scale(1.35) !important;
  animation: hold-pulsate 1.5s ease-in-out infinite alternate;
  box-shadow: 0 0 70px rgba(255, 255, 255, 0.5), inset 0 0 50px rgba(255, 255, 255, 0.25) !important;
  transition-duration: 0.3s;
}

.glowing-ring.breath-exhale {
  transform: scale(0.85) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08), inset 0 0 10px rgba(255, 255, 255, 0.03) !important;
  background-color: transparent;
  transition-duration: 8s;
}

@keyframes hold-pulsate {
  0% { transform: scale(1.33); }
  100% { transform: scale(1.37); }
}

/* --- Attention Calibrator Mode Overlay --- */
.calibration-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
  text-align: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.5rem;
}

.calibration-instruction {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  color: var(--text-white);
  min-height: 3.5rem; /* Reserve space to prevent layout shifts */
}

.calibration-sub {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  max-width: 180px;
  margin: 0 auto;
  line-height: 1.45;
}

.calibration-exit-btn {
  position: absolute;
  bottom: -110px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  z-index: 20;
  white-space: nowrap;
}

body.calibrating-mode .calibration-exit-btn {
  opacity: 0.45;
  pointer-events: auto;
}

.calibration-exit-btn:hover {
  color: var(--text-white);
  opacity: 0.95;
  transform: translateX(-50%) translateY(-2px);
}

/* Active State Transitions */
body.calibrating-mode .hero-section h1,
body.calibrating-mode .hero-section p.lead,
body.calibrating-mode .cards-section,
body.calibrating-mode .info-section,
body.calibrating-mode footer,
body.calibrating-mode .floating-dock {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ensure smooth fade away */
.hero-section h1,
.hero-section p.lead,
.cards-section,
.info-section,
footer,
.floating-dock {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.calibrating-mode .calibration-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Hint to guide the user on landing */
.calibration-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 3.5rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  text-align: center;
}

body.calibrating-mode .calibration-hint {
  opacity: 0 !important;
  pointer-events: none !important;
}

.ring-container:hover + .calibration-hint {
  opacity: 0.8;
}

/* --- Scroll Animations --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Glassmorphic Feature Cards --- */
.cards-section {
  padding-bottom: 4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    background-color 0.4s ease,
    box-shadow 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Card hover glow and subtle shift */
.feature-card:hover {
  transform: translateY(-6px);
  background-color: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 255, 255, 0.02);
}

/* Tactical micro-details */
.feature-card::before {
  content: '//';
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  position: absolute;
  top: 1.5rem;
  left: 2.5rem;
}

.feature-card h3 {
  margin-top: 0.5rem;
}

/* --- Info Section --- */
.info-section {
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.align-left {
  text-align: left;
}

.align-right {
  text-align: right;
}

@media (max-width: 768px) {
  .align-left,
  .align-right {
    text-align: left; /* Reset to left on mobile for readability */
  }

  .cta-section {
    padding: 2.5rem 0 4rem;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline !important;
  }
}

/* --- CTA & Email Capture --- */
.cta-section {
  padding: 4rem 0 6rem;
}


/* --- Footer --- */
footer {
  text-align: center;
  padding: 4rem 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  letter-spacing: 0.05em;
}


/* ==========================================================================
   Page Specific Visual Graphics
   ========================================================================== */

/* --- Page Philosophy: Tesseract hypercube --- */
#page-philosophy {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
}

.tesseract-container {
  perspective: 1000px;
  width: 200px;
  height: 200px;
  margin: 0 auto 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tesseract {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: tesseract-spin 24s linear infinite;
}

.cube {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
}

.cube.outer {
  width: 150px;
  height: 150px;
}

.cube.inner {
  width: 75px;
  height: 75px;
  animation: inner-spin 12s linear infinite reverse;
}

.cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.01);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.02);
}

/* Outer Cube Faces */
.cube.outer .face.front  { transform: translateZ(75px); }
.cube.outer .face.back   { transform: rotateY(180deg) translateZ(75px); }
.cube.outer .face.right  { transform: rotateY(90deg) translateZ(75px); }
.cube.outer .face.left   { transform: rotateY(-90deg) translateZ(75px); }
.cube.outer .face.top    { transform: rotateX(90deg) translateZ(75px); }
.cube.outer .face.bottom { transform: rotateX(-90deg) translateZ(75px); }

/* Inner Cube Faces */
.cube.inner .face {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.cube.inner .face.front  { transform: translateZ(37.5px); }
.cube.inner .face.back   { transform: rotateY(180deg) translateZ(37.5px); }
.cube.inner .face.right  { transform: rotateY(90deg) translateZ(37.5px); }
.cube.inner .face.left   { transform: rotateY(-90deg) translateZ(37.5px); }
.cube.inner .face.top    { transform: rotateX(90deg) translateZ(37.5px); }
.cube.inner .face.bottom { transform: rotateX(-90deg) translateZ(37.5px); }

@keyframes tesseract-spin {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes inner-spin {
  0% { transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg); }
  100% { transform: translate(-50%, -50%) rotateX(360deg) rotateY(-360deg); }
}

/* --- Page Vision: Lens Array --- */
.lens-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 600px;
}

.lens {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 70%, transparent 100%);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.lens-1 {
  width: 180px;
  height: 180px;
  transform: translateZ(0px);
  opacity: 0.3;
}

.lens-2 {
  width: 130px;
  height: 130px;
  transform: translateZ(40px);
  opacity: 0.5;
}

.lens-3 {
  width: 90px;
  height: 90px;
  transform: translateZ(80px);
  opacity: 0.7;
}

.lens-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #ffffff 20%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 40px 10px rgba(255, 255, 255, 0.7);
  opacity: 0.8;
  animation: beam-intensify 4s infinite ease-in-out;
  z-index: 10;
}

@keyframes beam-intensify {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.5;
    box-shadow: 0 0 30px 5px rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
    box-shadow: 0 0 55px 15px rgba(255, 255, 255, 0.8);
  }
}

#page-vision .hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100vh;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent 70%);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
  opacity: 0.4;
  animation: beam-pulse 6s infinite ease-in-out;
}

@keyframes beam-pulse {
  0%, 100% { opacity: 0.25; height: 70vh; }
  50% { opacity: 0.5; height: 85vh; }
}

/* --- Page Explore: Noise Field Canvas --- */
#noise-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.explore-title-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.explore-title-wrapper h1 {
  margin-bottom: 0;
}

.orbit-path {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  pointer-events: none;
  animation: orbit-rotate 12s linear infinite;
}

.orbiter {
  position: absolute;
  width: 16px;
  height: 16px;
  color: var(--text-white);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.orbiter.plane {
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
}

.orbiter.earth {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-90deg);
}

@keyframes orbit-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Page Signal: Event Horizon Ripple --- */
.ripple-container {
  perspective: 600px;
  width: 300px;
  height: 180px;
  margin: 0 auto 3.5rem;
  overflow: hidden;
}

.ripple-plane {
  width: 100%;
  height: 100%;
  transform: rotateX(65deg);
  transform-style: preserve-3d;
  position: relative;
}

.ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  opacity: 0;
  width: 0;
  height: 0;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.r-1 { animation: ripple-expand 4s infinite ease-out 0s; }
.r-2 { animation: ripple-expand 4s infinite ease-out 1.33s; }
.r-3 { animation: ripple-expand 4s infinite ease-out 2.66s; }

@keyframes ripple-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
    border-width: 1.5px;
  }
  100% {
    width: 350px;
    height: 350px;
    opacity: 0;
    border-width: 0;
  }
}

/* --- Page Unfolding: Quantum Lotus --- */
.lotus-container {
  perspective: 1000px;
  width: 200px;
  height: 200px;
  margin: 0 auto 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lotus {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: lotus-rotate 24s linear infinite;
}

.petal-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.petal {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 36px;
  height: 72px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50% 50% 0 0;
  transform-origin: bottom center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.02);
  margin-left: -18px;
}

.layer-1 .petal {
  height: 54px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

.layer-1 .p1 { transform: rotateY(0deg);   animation: bloom-1-p1 6s ease-in-out infinite alternate; }
.layer-1 .p2 { transform: rotateY(90deg);  animation: bloom-1-p2 6s ease-in-out infinite alternate; }
.layer-1 .p3 { transform: rotateY(180deg); animation: bloom-1-p3 6s ease-in-out infinite alternate; }
.layer-1 .p4 { transform: rotateY(270deg); animation: bloom-1-p4 6s ease-in-out infinite alternate; }

@keyframes bloom-1-p1 { from { transform: rotateY(0deg) rotateX(10deg); } to { transform: rotateY(0deg) rotateX(50deg); } }
@keyframes bloom-1-p2 { from { transform: rotateY(90deg) rotateX(10deg); } to { transform: rotateY(90deg) rotateX(50deg); } }
@keyframes bloom-1-p3 { from { transform: rotateY(180deg) rotateX(10deg); } to { transform: rotateY(180deg) rotateX(50deg); } }
@keyframes bloom-1-p4 { from { transform: rotateY(270deg) rotateX(10deg); } to { transform: rotateY(270deg) rotateX(50deg); } }

.layer-2 { transform: rotateY(45deg); }
.layer-2 .p1 { transform: rotateY(0deg);   animation: bloom-2-p1 6s ease-in-out infinite alternate; }
.layer-2 .p2 { transform: rotateY(90deg);  animation: bloom-2-p2 6s ease-in-out infinite alternate; }
.layer-2 .p3 { transform: rotateY(180deg); animation: bloom-2-p3 6s ease-in-out infinite alternate; }
.layer-2 .p4 { transform: rotateY(270deg); animation: bloom-2-p4 6s ease-in-out infinite alternate; }

@keyframes bloom-2-p1 { from { transform: rotateY(0deg) rotateX(20deg); } to { transform: rotateY(0deg) rotateX(65deg); } }
@keyframes bloom-2-p2 { from { transform: rotateY(90deg) rotateX(20deg); } to { transform: rotateY(90deg) rotateX(65deg); } }
@keyframes bloom-2-p3 { from { transform: rotateY(180deg) rotateX(20deg); } to { transform: rotateY(180deg) rotateX(65deg); } }
@keyframes bloom-2-p4 { from { transform: rotateY(270deg) rotateX(20deg); } to { transform: rotateY(270deg) rotateX(65deg); } }

.layer-3 .petal { height: 90px; opacity: 0.6; }
.layer-3 .p1 { transform: rotateY(0deg);   animation: bloom-3-p1 6s ease-in-out infinite alternate; }
.layer-3 .p2 { transform: rotateY(90deg);  animation: bloom-3-p2 6s ease-in-out infinite alternate; }
.layer-3 .p3 { transform: rotateY(180deg); animation: bloom-3-p3 6s ease-in-out infinite alternate; }
.layer-3 .p4 { transform: rotateY(270deg); animation: bloom-3-p4 6s ease-in-out infinite alternate; }

@keyframes bloom-3-p1 { from { transform: rotateY(0deg) rotateX(30deg); } to { transform: rotateY(0deg) rotateX(75deg); } }
@keyframes bloom-3-p2 { from { transform: rotateY(90deg) rotateX(30deg); } to { transform: rotateY(90deg) rotateX(75deg); } }
@keyframes bloom-3-p3 { from { transform: rotateY(180deg) rotateX(30deg); } to { transform: rotateY(180deg) rotateX(75deg); } }
@keyframes bloom-3-p4 { from { transform: rotateY(270deg) rotateX(30deg); } to { transform: rotateY(270deg) rotateX(75deg); } }

.lotus-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px #ffffff;
  animation: core-glow 3s ease-in-out infinite alternate;
}

@keyframes core-glow {
  0% { transform: translate(-50%, -50%) scale(0.9); box-shadow: 0 0 10px #fff; }
  100% { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 0 25px #fff; }
}

@keyframes lotus-rotate {
  to { transform: rotateY(360deg); }
}


.keyhole-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.keyhole-shape {
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  animation: keyhole-pulse 4s ease-in-out infinite alternate;
}

.keyhole-top {
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  margin: 0 auto -8px;
  position: relative;
  z-index: 2;
}

.keyhole-bottom {
  width: 22px;
  height: 36px;
  background: #ffffff;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  margin: 0 auto;
}

.keyhole-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: glow-pulse 3s ease-in-out infinite alternate;
}

.keyhole-rings {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.keyhole-rings .ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  border-left-color: rgba(255, 255, 255, 0.3);
  border-right-color: rgba(255, 255, 255, 0.3);
}

.keyhole-rings .r1 {
  width: 130px;
  height: 130px;
  animation: spin-ring 12s linear infinite;
}

.keyhole-rings .r2 {
  width: 160px;
  height: 160px;
  animation: spin-ring 18s linear infinite reverse;
  border-top-color: transparent;
  border-bottom-color: transparent;
}

.keyhole-rings .r3 {
  width: 190px;
  height: 190px;
  animation: spin-ring 24s linear infinite;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

@keyframes keyhole-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); }
}

@keyframes glow-pulse {
  0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.85); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes spin-ring {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}


/* --- Email Display Container --- */
.email-display-wrapper {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  font-family: var(--font-mono);
}

.email-label {
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.email-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.email-link:hover {
  color: var(--text-white);
  border-bottom-color: var(--text-white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.email-display-wrapper.centered {
  align-items: center;
  margin-top: 0;
  text-align: center;
}




/* ==========================================================================
   Prefers Reduced Motion Overrides
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in-section {
    opacity: 1 !important;
    transform: none !important;
  }

  .glowing-ring,
  .tesseract,
  .cube.inner,
  .lens-beam,
  .ripple,
  .petal,
  .orbit-path,
  .keyhole-rings .ring,
  .keyhole-glow {
    animation: none !important;
    transform: none !important;
  }
}
