:root {
  color-scheme: dark;
  --primary: #2EAA5E;
  --primary-dark: #248F4E;
  --accent: #5DADE2;
  --bg: #1a1a1a;
  --card: #242424;
  --text: #ffffff;
  --muted: #a0a0a0;
  --success: #2EAA5E;
  --border: #333333;
  --dark-bg: #0f0f0f;
  --blue: #1B3D6D;
  --light-blue: #5DADE2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  display: flex;
}

.brand-smart {
  color: var(--blue);
}

.brand-driver {
  color: var(--primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .header-nav .nav-link {
    display: none;
  }
  
  .brand-text {
    display: none;
  }
}

.container {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section.alt {
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.section-heading p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 640px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0 5rem;
  margin-top: 60px;
  background: var(--dark-bg);
  background: radial-gradient(circle at top left, rgba(27, 61, 109, 0.2), transparent 50%),
    radial-gradient(circle at bottom right, rgba(46, 170, 94, 0.15), transparent 50%),
    var(--dark-bg);
}

.hero-content {
  text-align: center;
  display: grid;
  gap: 2rem;
}

.hero-logo {
  justify-self: center;
  margin-bottom: -1rem; /* Bring closer to badge */
}

.hero-brand-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(93, 173, 226, 0.15);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 600;
  justify-self: center;
  border: 1px solid rgba(93, 173, 226, 0.3);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 0;
  line-height: 1.05;
  color: var(--accent);
}

.hero h1 span {
  display: block;
  color: var(--primary);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 640px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(46, 170, 94, 0.35);
}

.btn.secondary {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(46, 170, 94, 0.35);
}

.btn.outline {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.btn:hover {
  transform: translateY(-1px);
}

.stats {
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
  margin-top: 0.4rem;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  background: var(--card);
  padding: 2rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(93, 173, 226, 0.25);
  border-color: var(--accent);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: rgba(93, 173, 226, 0.15);
  color: var(--accent);
  border: 1px solid rgba(93, 173, 226, 0.3);
}

.steps-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step-card {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(27, 61, 109, 0.5);
}

.benefits {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.icon.success {
  color: var(--success);
}

.icon.accent {
  color: var(--accent);
}

.progress-card {
  position: relative;
  background: var(--card);
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-icon {
  width: 64px;
  height: 64px;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(27, 61, 109, 0.5);
}

.progress-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.progress-subtitle {
  color: var(--muted);
}

.progress-body {
  display: grid;
  gap: 1rem;
}

.progress-row {
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

.progress-streak {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-weight: 600;
}

.cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.cta p {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--dark-bg);
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-smart {
  color: var(--blue);
}

.brand-driver {
  color: var(--primary);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .actions {
    flex-direction: column;
  }
}

/* ========================================
   MODAL STYLES (Global - not scoped)
   ======================================== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(4px);
}

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

/* Modal Content */
.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease-out;
}

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

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Modal Close Button */
.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Modal Body */
.modal-body {
  padding: 2rem;
}

/* Form Group */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form Control */
.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
  background: var(--card);
}

.form-control::placeholder {
  color: var(--muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Validation */
.validation-message {
  color: #ff6b6b;
  font-size: 0.875rem;
  margin-top: 0.375rem;
  font-weight: 500;
}

.validation-summary {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #ff6b6b;
}

.validation-summary li {
  margin-bottom: 0.25rem;
}

/* Responsive Modal */
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
