/* ==========================================================================
   SAFECIRCLE AI - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Deep Navy Glassmorphism, Modern Fintech/Health-Tech Precision
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core Color Palette */
  --bg-base: #040711;
  --bg-surface: #080D1A;
  --bg-surface-elevated: #0E1626;
  --bg-card: rgba(13, 20, 36, 0.72);
  --bg-card-hover: rgba(19, 30, 54, 0.82);
  --bg-glass-subtle: rgba(255, 255, 255, 0.03);
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(99, 102, 241, 0.35);
  --border-safe-glow: rgba(16, 185, 129, 0.4);
  --border-danger-glow: rgba(244, 63, 94, 0.5);

  /* Primary Accents */
  --accent-primary: #6366F1;
  --accent-primary-hover: #4F46E5;
  --accent-secondary: #38BDF8;
  --accent-purple: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%);
  --accent-gradient-purple: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);

  /* State Colors */
  --safe-green: #10B981;
  --safe-green-light: #34D399;
  --safe-bg: rgba(16, 185, 129, 0.12);
  --safe-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  
  --danger-red: #F43F5E;
  --danger-red-dark: #E11D48;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-gradient: linear-gradient(135deg, #F43F5E 0%, #BE123C 100%);

  --warning-amber: #F59E0B;
  --warning-amber-light: #FBBF24;
  --warning-bg: rgba(245, 158, 11, 0.12);

  /* Typography Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #040711;

  /* Typography Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-primary: 0 0 30px rgba(99, 102, 241, 0.25);
  --shadow-glow-safe: 0 0 35px rgba(16, 185, 129, 0.3);
  --shadow-glow-danger: 0 0 40px rgba(244, 63, 94, 0.45);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Interactive Mouse Glow Light (Desktop) */
#cursorGlow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(56, 189, 248, 0.03) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   AMBIENT BACKGROUND SYSTEM
   ========================================================================== */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #4F46E5 0%, #38BDF8 60%, transparent 80%);
  top: -150px;
  right: -100px;
  animation: orbFloat1 22s infinite alternate;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #8B5CF6 0%, #6366F1 50%, transparent 80%);
  bottom: 10%;
  left: -120px;
  animation: orbFloat2 26s infinite alternate;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0284C7 0%, #0F766E 60%, transparent 80%);
  top: 45%;
  right: 15%;
  animation: orbFloat3 18s infinite alternate;
  opacity: 0.25;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 120px) scale(1.1); }
  100% { transform: translate(-140px, 40px) scale(0.95); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, -90px) scale(1.08); }
  100% { transform: translate(60px, -160px) scale(0.92); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(-100px, 80px) scale(1.15); }
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.container-narrow {
  max-width: 900px;
}

section {
  position: relative;
  z-index: 2;
  padding: 96px 0;
}

/* ==========================================================================
   TYPOGRAPHY & GRADIENTS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.gradient-text-hero {
  background: linear-gradient(135deg, #FFFFFF 15%, #E0E7FF 55%, #818CF8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-safe {
  background: var(--safe-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-danger {
  background: var(--danger-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ==========================================================================
   GLASSMORPHISM PANELS & CARDS
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-glass);
}

.glass-card-interactive {
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card-interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-lg), var(--shadow-glow-primary);
}

/* Card Subtle Sheen Effect */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  pointer-events: none;
  transition: left 0.7s ease;
}

.glass-panel:hover::before {
  left: 100%;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 24px;
  background: rgba(8, 13, 26, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-normal);
}

.navbar-scrolled {
  background: rgba(6, 10, 20, 0.9);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-icon-shield {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: transform var(--transition-fast);
}

.nav-brand:hover .brand-icon-shield {
  transform: scale(1.05) rotate(4deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-secondary);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* System Status Pill */
.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--safe-green-light);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--safe-green-light);
  box-shadow: 0 0 10px var(--safe-green-light);
  animation: pulseDot 2s infinite ease-in-out;
}

.status-dot.danger {
  background: var(--danger-red);
  box-shadow: 0 0 10px var(--danger-red);
  animation: pulseDanger 1s infinite ease-in-out;
}

.status-dot.warning {
  background: var(--warning-amber-light);
  box-shadow: 0 0 10px var(--warning-amber);
}

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

@keyframes pulseDanger {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

/* Demo Mode Toggle in Navbar */
.demo-mode-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

/* ==========================================================================
   BUTTONS & CTAS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-safe {
  background: var(--safe-gradient);
  color: white;
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
  font-size: 1.125rem;
  font-weight: 700;
}

.btn-safe:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px rgba(16, 185, 129, 0.6);
}

/* Distinct SOS Button with Breathing Animation */
.btn-sos {
  background: var(--danger-gradient);
  color: white;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 30px rgba(244, 63, 94, 0.5);
  animation: sosBreathing 2.4s infinite ease-in-out;
}

.btn-sos:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 45px rgba(244, 63, 94, 0.8);
  animation: none;
}

@keyframes sosBreathing {
  0%, 100% {
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4), 0 0 0 0 rgba(244, 63, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 35px rgba(244, 63, 94, 0.7), 0 0 0 12px rgba(244, 63, 94, 0);
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: 170px;
  padding-bottom: 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Hero Right: Futuristic Interactive Live Safety Preview Card */
.hero-visual {
  position: relative;
}

.hero-preview-card {
  padding: 32px;
  background: rgba(11, 18, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.2);
  position: relative;
  overflow: hidden;
  animation: heroCardFloat 8s infinite ease-in-out;
}

@keyframes heroCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-title {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.preview-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--safe-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--safe-green-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.preview-metric {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.metric-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-radar-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radar-ping-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-ping-circle::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--safe-green);
  animation: radarWave 2s infinite ease-out;
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ==========================================================================
   TRUST STATS SECTION
   ========================================================================== */
.trust-section {
  padding: 20px 0 60px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.trust-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  font-size: 1.35rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.trust-card:hover .trust-icon-box {
  transform: scale(1.1) rotate(5deg);
  background: var(--accent-gradient);
  color: white;
}

.trust-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.trust-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   SAFETY SESSION FORM & ACTIVATOR
   ========================================================================== */
.session-section {
  padding: 60px 0 90px;
}

.session-container-box {
  max-width: 820px;
  margin: 0 auto;
}

.session-form-card {
  padding: 44px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.form-group-full {
  grid-column: span 2;
}

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.form-control {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: rgba(8, 13, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 0 20px rgba(99, 102, 241, 0.15);
  background: rgba(14, 22, 38, 0.95);
}

.form-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-secondary);
}

/* Arrival Presets Pills */
.arrival-presets {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover, .preset-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* Activation Loading Sequence Overlay */
.activation-sequence {
  display: none;
  padding: 40px 20px;
  text-align: center;
}

.activation-sequence.active {
  display: block;
}

.activation-step-list {
  max-width: 400px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.activation-step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  opacity: 0.4;
  transition: all 0.4s ease;
}

.activation-step-item.active {
  color: var(--text-primary);
  opacity: 1;
  transform: translateX(4px);
}

.step-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.activation-step-item.active .step-icon-circle {
  background: var(--safe-green);
  border-color: var(--safe-green-light);
  color: white;
  box-shadow: 0 0 12px var(--safe-green);
}

/* ==========================================================================
   ACTIVE SAFETY DASHBOARD
   ========================================================================== */
#activeDashboard {
  display: none;
  animation: fadeInDashboard 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInDashboard {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-hero-header {
  padding: 32px;
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.dashboard-hero-header.missed-state {
  border-color: var(--danger-red);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
}

.active-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--safe-green-light);
}

.dashboard-grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

/* Countdown Card */
.countdown-card {
  padding: 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.countdown-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.countdown-display-large {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.countdown-display-large.urgent {
  color: var(--danger-red);
  text-shadow: 0 0 30px rgba(244, 63, 94, 0.6);
  animation: pulseUrgent 1s infinite alternate;
}

@keyframes pulseUrgent {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.countdown-bar-wrapper {
  width: 100%;
  max-width: 280px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.countdown-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width 1s linear, background-color 0.3s ease;
}

/* Location Card */
.location-card {
  padding: 32px;
}

.location-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.location-coords-box {
  padding: 16px;
  background: rgba(8, 13, 26, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.coord-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.coord-row:last-child {
  margin-bottom: 0;
}

.maps-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.maps-link-btn:hover {
  color: white;
  text-decoration: underline;
}

/* Main Action Buttons Grid */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.action-btn-large {
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.action-btn-title {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.action-btn-sub {
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* Missed Checkin Alert Box */
.missed-alert-banner {
  display: none;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--danger-red);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 32px;
  animation: shakeAlert 0.5s ease;
}

.missed-alert-banner.active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Timeline & Status Grid */
.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

/* Safety Event Timeline */
.timeline-card {
  padding: 32px;
}

.timeline-list {
  list-style: none;
  position: relative;
  padding-left: 28px;
  margin-top: 20px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-item {
  position: relative;
  margin-bottom: 22px;
  animation: fadeInItem 0.4s ease forwards;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.timeline-dot.safe {
  border-color: var(--safe-green);
  background: rgba(16, 185, 129, 0.2);
}

.timeline-dot.danger {
  border-color: var(--danger-red);
  background: rgba(244, 63, 94, 0.3);
}

.timeline-time {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* System Status Mini Panel */
.system-panel-card {
  padding: 32px;
}

.system-status-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

/* ==========================================================================
   AI SAFETY CHECK SECTION
   ========================================================================== */
.ai-section {
  padding: 80px 0;
}

.ai-card-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.ai-assistant-card {
  padding: 40px;
}

.scenario-pills-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.scenario-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.scenario-pill {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scenario-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.ai-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: rgba(8, 13, 26, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all var(--transition-fast);
  margin-bottom: 24px;
}

.ai-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* AI Scanning Animation State */
.ai-processing-state {
  display: none;
  padding: 36px 20px;
  text-align: center;
}

.ai-processing-state.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ai-orb-scanner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #6366F1 0%, #38BDF8 70%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
  animation: orbPulse 1.8s infinite ease-in-out;
  margin-bottom: 20px;
}

.ai-orb-ring {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed rgba(56, 189, 248, 0.6);
  animation: rotateRing 6s linear infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-scan-text {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ai-scan-subtext {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* AI Result Card */
.ai-result-box {
  display: none;
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: rgba(8, 13, 26, 0.95);
  border: 1px solid var(--border-glass);
  animation: fadeInResult 0.5s ease forwards;
}

.ai-result-box.active {
  display: block;
}

@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.risk-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.risk-level-badge.low {
  background: var(--safe-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--safe-green-light);
}

.risk-level-badge.medium {
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--warning-amber-light);
}

.risk-level-badge.high {
  background: var(--danger-bg);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: var(--danger-red);
  animation: pulseDanger 1.2s infinite ease-in-out;
}

.risk-meter-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 18px 0 24px;
}

.risk-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
}

.recommended-actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 24px;
}

.recommended-action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}

.action-check-icon {
  color: var(--safe-green-light);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.ai-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  margin-top: 18px;
  line-height: 1.5;
}

/* ==========================================================================
   HOW IT WORKS SECTION
   ========================================================================== */
.how-it-works-section {
  padding: 80px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  padding: 36px 28px;
  position: relative;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.step-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   EMERGENCY SOS MODAL
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.emergency-modal-card {
  max-width: 540px;
  width: 100%;
  padding: 40px;
  background: rgba(14, 20, 36, 0.95);
  border: 1px solid var(--danger-red);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(244, 63, 94, 0.4);
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
}

.emergency-icon-pulse {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.2);
  border: 2px solid var(--danger-red);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--danger-red);
  animation: sosModalStrobe 1.5s infinite ease-in-out;
}

@keyframes sosModalStrobe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(244, 63, 94, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 40px rgba(244, 63, 94, 0.8); }
}

/* ==========================================================================
   TOAST SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 16px 20px;
  background: rgba(14, 22, 40, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.toast-safe {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.2);
}

.toast.toast-danger {
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(244, 63, 94, 0.3);
}

.toast.toast-warning {
  border-color: rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   CANVAS CONFETTI (Lightweight Custom Overlay)
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2500;
}

/* ==========================================================================
   MOBILE BOTTOM QUICK BAR
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 20px;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  z-index: 999;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SCROLL REVEAL UTILITIES
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile First & Breakpoints)
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .dashboard-grid-main,
  .dashboard-secondary-grid,
  .trust-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none; /* Hide on small screens to keep clean */
  }
}

@media (max-width: 768px) {
  section {
    padding: 64px 0;
  }
  .hero-section {
    padding-top: 120px;
    padding-bottom: 40px;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group-full {
    grid-column: span 1;
  }
  .session-form-card,
  .ai-assistant-card,
  .countdown-card,
  .location-card,
  .timeline-card,
  .system-panel-card {
    padding: 24px 18px;
  }
  .dashboard-actions-grid {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-bar {
    display: flex;
  }
  body {
    padding-bottom: 70px;
  }
  #cursorGlow {
    display: none; /* Disable cursor glow on touch screens */
  }
}

/* ==========================================================================
   ACCESSIBILITY: 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;
    scroll-behavior: auto !important;
  }
  .orb {
    display: none;
  }
  .hero-preview-card,
  .btn-sos,
  .status-dot,
  .ai-orb-scanner,
  .ai-orb-ring {
    animation: none !important;
  }
}
