/* Landing Page Animations and Simulator Styles */

/* 1. Canvas Background */
#hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* 2. Hero Section Layout Overrides */
.hero {
  position: relative;
  max-width: 100% !important;
  padding: 120px 40px !important;
  overflow: hidden;
  display: block !important;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 70% 30%, rgba(0, 163, 169, 0.08) 0%, rgba(60, 179, 113, 0.03) 40%, rgba(11, 15, 25, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
  text-align: left;
}

.hero-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #FFFFFF 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fade-in-down 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 35px;
  text-align: left;
  margin-left: 0 !important;
  margin-right: 0 !important;
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fade-in-scale 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* 3. Interactive Lock Simulator styling */
.sim-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

/* Smartphone Mockup */
.sim-phone {
  width: 230px;
  height: 420px;
  background: #111827;
  border: 10px solid #1f2937;
  border-radius: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 163, 169, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.3s ease;
  user-select: none;
}

.sim-phone:hover {
  transform: translateY(-5px) rotate(1deg);
}

/* Phone Notch and Screen */
.sim-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  background: #1f2937;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.sim-phone-screen {
  width: 100%;
  height: 100%;
  padding: 24px 14px 14px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, #1b2436 0%, #0d121f 100%);
  font-family: 'Inter', sans-serif;
  color: white;
}

/* Status Bar */
.sim-phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
  font-weight: 500;
}

.sim-phone-status i {
  margin-left: 3px;
}

/* App Header */
.sim-phone-header {
  text-align: center;
  margin-bottom: 20px;
}

.sim-phone-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--primary);
  text-transform: uppercase;
}

.sim-phone-appname {
  font-size: 0.55rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Emergency Banner */
.sim-phone-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sim-phone-alert-title {
  color: #ef4444;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.sim-phone-alert-desc {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Main Display Box */
.sim-phone-display {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 15px;
}

.sim-phone-lock-icon {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.sim-phone-lock-icon.active {
  color: var(--success);
  filter: drop-shadow(0 0 10px var(--success-glow));
}

.sim-phone-info-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Code Display Box */
.sim-phone-code-box {
  display: flex;
  gap: 8px;
  margin: 5px 0;
}

.sim-phone-code-digit {
  width: 28px;
  height: 36px;
  background: rgba(0, 163, 169, 0.08);
  border: 1px solid rgba(0, 163, 169, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: monospace;
}

.sim-phone-code-digit.revealed {
  color: var(--success);
  border-color: rgba(60, 179, 113, 0.3);
  background: rgba(60, 179, 113, 0.08);
  box-shadow: 0 0 8px var(--success-glow);
}

/* Action Button */
.sim-phone-action-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 163, 169, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.sim-phone-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 163, 169, 0.5);
}

.sim-phone-action-btn:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Countdown Display */
.sim-phone-timer {
  font-size: 0.65rem;
  color: var(--success);
  font-weight: 600;
  display: none;
}

/* Keybox Mockup */
.sim-keybox {
  width: 150px;
  height: 210px;
  background: #0d121f;
  border: 4px solid #1f2937;
  border-radius: 20px;
  position: relative;
  z-index: 2;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 0, 0, 0.4);
  perspective: 600px;
  transition: transform 0.3s ease;
  user-select: none;
}

.sim-keybox:hover {
  transform: translateY(-5px) rotate(-1deg);
}

/* Outer Door (Rotates) */
.sim-keybox-door {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e2533, #0d121f);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transform-origin: left center;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  backface-visibility: hidden;
}

.sim-keybox.open .sim-keybox-door {
  transform: rotateY(-115deg);
}

/* LED Ring on Door */
.sim-keybox-led {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1rem;
  background: rgba(239, 68, 68, 0.05);
  transition: all 0.3s ease;
}

.sim-keybox-led.state-processing {
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.05);
  animation: pulse-glow-amber 1s infinite alternate;
}

.sim-keybox-led.state-unlocked {
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 20px var(--success-glow);
  background: rgba(60, 179, 113, 0.05);
}

/* Tiny Keypad on Door */
.sim-keybox-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: rgba(0,0,0,0.3);
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
}

.sim-keybox-keypad-btn {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #374151;
  border: none;
  font-size: 0.45rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.sim-keybox-keypad-btn.active {
  background-color: var(--success);
  color: white;
  box-shadow: 0 0 5px var(--success);
}

/* Inside Chamber (visible when open) */
.sim-keybox-chamber {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: radial-gradient(circle, rgba(0, 163, 169, 0.15) 0%, #080c14 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Floating Key in Chamber */
.sim-keybox-key {
  font-size: 2.8rem;
  color: #f59e0b; /* Gold key color */
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.7));
  opacity: 0;
  transform: scale(0.6) translateY(20px);
  transition: opacity 0.5s ease 0.4s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.sim-keybox.open .sim-keybox-key {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: key-levitate 2.5s ease-in-out infinite 1s;
}

.sim-keybox-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 15px;
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}

.sim-keybox.open .sim-keybox-label {
  opacity: 1;
}

/* Connection Line / SVG Overlay */
.sim-connector-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Reset Button */
.sim-reset-btn {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

.sim-reset-btn.visible {
  opacity: 1;
  visibility: visible;
  bottom: -25px;
}

.sim-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Keyframes */
@keyframes key-levitate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}

@keyframes pulse-red {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}

@keyframes pulse-glow-amber {
  0% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
  100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.7); }
}

/* Animations helper */
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* 4. Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Delay modifiers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }


/* 5. Custom Premium Hover Effects for Features & Pricing */
.feature-card {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 163, 169, 0.08) 0%, transparent 60%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
  pointer-events: none;
}

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

.feature-card:hover .feature-icon i {
  animation: icon-wiggle 0.5s ease-in-out;
}

@keyframes icon-wiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-8deg); }
  75% { transform: scale(1.1) rotate(8deg); }
}

/* Comparison and pricing hover refinements */
.comparison-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s !important;
}

.comparison-card:hover {
  transform: translateY(-5px) scale(1.01);
}

.comparison-card.card-digital:hover {
  border-color: rgba(0, 163, 169, 0.45);
  box-shadow: 0 15px 40px rgba(0, 163, 169, 0.08);
}

.comparison-card.card-physical:hover {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 15px 40px rgba(239, 68, 68, 0.04);
}

/* 6. Responsive adjustments */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }
  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-content h2 {
    font-size: 2.6rem;
    text-align: center;
  }
  .hero-content p {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 10px;
  }
}

@media (max-width: 600px) {
  .hero-content h2 {
    font-size: 2rem;
  }
  .sim-wrapper {
    gap: 20px;
    padding: 10px;
  }
  .sim-phone {
    width: 200px;
    height: 360px;
  }
  .sim-keybox {
    width: 130px;
    height: 180px;
  }
  .sim-keybox-door {
    gap: 8px;
  }
  .sim-keybox-led {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }
  .sim-phone-screen {
    padding: 18px 10px 10px 10px;
  }
  .sim-phone-display {
    padding: 10px 5px;
    gap: 8px;
  }
}
