/* CSS Variables */
:root {
  --primary: #153A5B;
  --primary-hover: #1e4a6b;
  --text: #ffffff;
  --bg: rgba(0, 0, 0, 0.055);
  --overlay: rgba(0, 0, 0, 0.5);
  --success: #4CAF50;
  --error: #F44336;
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Theme variations */
[data-theme="light"] {
  --text: var(--primary);
  --bg: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .title {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .subtitle {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --text: #ffffff;
  --bg: rgba(0, 0, 0, 0.075);
}

[data-theme="dark"] .title {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .subtitle {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Screen reader only */
.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;
}

/* Theme Toggle */
.theme-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.theme-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.1) translateZ(0);
}

.theme-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: url('background.webp');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.container {
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 139, 139, 0.356);
  max-width: 600px;
  margin: 0 auto;
}

/* Logo */
.logo-section {
  margin-bottom: 40px;
}

.logo {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.6));
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

/* Main Content */
.main-content {
  margin-bottom: 60px;
}

.title {
  font-size: 2.626rem;
  font-weight: 700;
  margin-top: 50px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  line-height: 0.9;
}

.subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 70px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Lead Capture */
.lead-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* Lead Type Selector */
.lead-type-selector {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 1px;
}

.lead-type-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 15px;
  opacity: 0.9;
  cursor: pointer;
}

/* Toggle Switch */
.toggle-switch-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-input {
  display: none;
}

.toggle-label {
  display: flex;
  align-items: center;
  position: relative;
  width: 80px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.toggle-label:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.toggle-label:hover .toggle-slider {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 36px;
  height: 32px;
  background: var(--primary);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  will-change: transform;
}

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

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text);
  transition: var(--transition);
}

.toggle-icon i {
  font-size: 1.3em;
}

.toggle-input:not(:checked) ~ .email-icon {
  color: var(--primary);
  font-weight: 600;
}

.toggle-input:checked ~ .whatsapp-icon {
  color: var(--primary);
  font-weight: 600;
}

/* Dark theme icons */
[data-theme="dark"] .whatsapp-icon {
  color: var(--text) !important;
}

[data-theme="dark"] .toggle-input:checked ~ .whatsapp-icon {
  color: var(--text) !important;
  font-weight: 600;
}

[data-theme="dark"] .email-icon {
  color: var(--text) !important;
}

[data-theme="dark"] .toggle-input:not(:checked) ~ .email-icon {
  color: var(--text) !important;
  font-weight: 600;
}

[data-theme="dark"] .social-link i {
  color: var(--text);
}

/* Accessibility - focus */
.toggle-input:focus + .toggle-label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Form Styles */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  width: 100%;
  align-items: center;
  margin-bottom: 0;
}

.input-group {
  display: flex;
  gap: 15px;
  width: 100%;
  align-items: center;
}

.lead-input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  outline: none;
  transition: var(--transition);
}

.lead-input::placeholder {
  color: #666;
}

.lead-input:focus {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}



.whatsapp-input {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.whatsapp-input::placeholder {
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: normal;
}

/* Error messages */
.error-message {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 5px;
  text-align: left;
  width: 100%;
}

/* Button Styles */
.lead-button {
  padding: 15px 25px;
  border: none;
  border-radius: 25px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  transform: translateZ(0);
  position: relative;
  overflow: hidden;
}

.lead-button:hover:not(:disabled) {
  transform: translateY(-2px) translateZ(0);
  background: var(--primary-hover);
  box-shadow: var(--shadow-hover);
}



.lead-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.button-loading {
  display: none;
}

.lead-button:disabled .button-text {
  display: none;
}

.lead-button:disabled .button-loading {
  display: inline-block;
}

.spam-notice {
  font-size: 0.9rem;
  font-weight: 300;
  opacity: 0.8;
  margin-top: 1px;
}

/* Popup Modal */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.popup-overlay[hidden] {
  display: none;
}

.popup-modal {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  animation: popupSlideIn 0.3s ease;
  box-shadow: var(--shadow-hover);
  will-change: transform, opacity;
}

.popup-content {
  position: relative;
}

.popup-icon {
  margin-bottom: 20px;
}

.popup-icon i {
  font-size: 3rem;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.popup-icon i.success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success);
  border: 2px solid var(--success);
}

.popup-icon i.error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error);
  border: 2px solid var(--error);
}

.popup-modal h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.popup-modal p {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 0;
}

.popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.popup-close:hover {
  background: var(--primary-hover);
  transform: scale(1.1) translateZ(0);
}

.popup-close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Social Links */
.social-section {
  margin-top: 40px;
}

.social-section h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 25px;
  opacity: 0.9;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  width: 60px;
  height: 60px;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.social-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.social-link i {
  font-size: 1.5em;
}

/* Animated Dots */
.animated-dots .dot {
  display: inline-block;
  opacity: 0;
  animation: dotSequence 2s infinite;
}

.animated-dots .dot:nth-child(1) { animation-delay: 0s; }
.animated-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.animated-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotSequence {
  0%, 20% { opacity: 0; }
  40%, 60% { opacity: 1; }
  70%, 100% { opacity: 0; }
}

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

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Performance optimizations */
.hero-section,
.toggle-slider {
  will-change: transform;
}

.popup-modal {
  will-change: transform, opacity;
}

/* Reduce paint operations */
.theme-btn,
.lead-button,
.popup-close {
  transform: translateZ(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .title { font-size: 2.016rem; }
  .subtitle { font-size: 1.1rem; }
  
  .lead-form {
    flex-direction: column;
    gap: 15px;
  }
  
  .input-group {
    flex-direction: column;
    gap: 15px;
  }
  
  .lead-input,
  .lead-button {
    width: 100%;
  }
  
  .lead-type-selector {
    margin-top: 15px;
    margin-bottom: 10px;
  }
  
  .spam-notice {
    margin-top: 8px;
  }
  
  .toggle-switch {
    gap: 12px;
  }
  
  .toggle-label {
    width: 70px;
    height: 35px;
  }
  
  .toggle-slider {
    width: 31px;
    height: 27px;
  }
  
  .toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(35px);
  }
  
  .toggle-icon {
    font-size: 1.2rem;
  }
  
  .social-links {
    gap: 15px;
  }
  
  .social-link {
    width: 55px;
    height: 55px;
  }
}

@media (max-width: 480px) {
  .content-wrapper { padding: 0 15px; }
  .title { font-size: 1.713rem; }
  .subtitle { font-size: 1rem; }
  .logo { width: 70px; }
  
  .lead-type-label {
    font-size: 1rem;
  }
  
  .toggle-switch {
    gap: 10px;
  }
  
  .toggle-label {
    width: 60px;
    height: 30px;
  }
  
  .toggle-slider {
    width: 26px;
    height: 22px;
  }
  
  .toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(30px);
  }
  
  .toggle-icon {
    font-size: 1.1rem;
  }
  
  .toggle-icon i {
    font-size: 1.1em;
  }
  
  .spam-notice {
    margin-top: 6px;
  }
  
  .popup-modal {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .popup-icon i {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
  }
  
  .popup-modal h3 { font-size: 1.3rem; }
  
  .social-link {
    width: 50px;
    height: 50px;
  }
  
  .social-link i {
    font-size: 1.3em;
  }
} 