@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* Premium scientific palette */
  --primary-blue: #1e40af;
  --electric-blue: #3b82f6;
  --charcoal: #374151;
  --clinical-green: #059669;
  --warm-gray: #6b7280;
  --light-gray: #f3f4f6;
  --bg-white: #ffffff;
  --border: #e5e7eb;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --max: 1140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-white);
  color: var(--charcoal);
  font: 400 16px/1.6 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}
h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 16px;
}
h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.mono {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', monospace;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 16px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

/* Desktop navigation padding */
@media(min-width: 769px) {
  .nav {
    padding: 16px 0;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--charcoal);
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

/* Buttons */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--primary-blue);
  color: white;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.cta:hover {
  background: #1e3a8a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.cta.secondary {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  box-shadow: none;
}

.cta.secondary:hover {
  background: var(--light-gray);
}

/* Hero */
.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  gap: 60px;
  align-items: center;
}

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

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card.elevated {
  box-shadow: var(--shadow-lg);
}

.card-content {
  padding: 24px;
}

/* Eyebrow text */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-gray);
  font-weight: 600;
  margin-bottom: 12px;
}

.subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--warm-gray);
  margin: 0 0 32px;
  line-height: 1.5;
}

/* Badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.badge {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 24px;
  background: var(--light-gray);
  color: var(--charcoal);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge.primary {
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary-blue);
}

.badge.success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--clinical-green);
}

/* Form */
.email-form {
  display: flex;
  gap: 12px;
  margin: 32px 0 16px;
}

.email-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: white;
  color: var(--charcoal);
  font-size: 16px;
  transition: all 0.2s;
}

.email-input:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hint {
  font-size: 14px;
  color: var(--warm-gray);
  margin-bottom: 20px;
}

/* iPhone Mockup Placeholder */
.iphone-mockup {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 390/844;
  background: linear-gradient(145deg, #f9fafb, #ffffff);
  border-radius: 40px;
  box-shadow:
    0 30px 60px -12px rgb(0 0 0 / 0.25),
    0 18px 36px -18px rgb(0 0 0 / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 12px solid #1a1a1a;
}

/* Responsive Mockup Container */
.mockup-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.mockup-image {
  width: 100%;
  height: auto;
  display: block;
}

.mockup-placeholder {
  text-align: center;
  color: var(--warm-gray);
  padding: 20px;
}

/* Feature sections */
section {
  padding: 60px 0;
}

section.gray {
  background: var(--light-gray);
}

.feature-grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

@media(min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--warm-gray);
}

/* How it works */
.steps-visual {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
}

.step-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(30, 64, 175, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary-blue);
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 12px;
}

.step-description {
  font-size: 14px;
  color: var(--warm-gray);
  line-height: 1.5;
  margin: 0;
}

.step-arrow {
  font-size: 24px;
  color: var(--primary-blue);
  font-weight: 300;
}

.steps-example {
  margin-top: 48px;
  text-align: center;
}

.example-card {
  background: rgba(30, 64, 175, 0.05);
  border: 1px solid rgba(30, 64, 175, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 600px;
  margin: 24px auto 0;
}

.example-label {
  font-size: 14px;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 12px;
}

.example-text {
  font-size: 16px;
  color: var(--charcoal);
  font-style: italic;
}

@media(max-width: 768px) {
  .steps-visual {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step-arrow {
    display: none;
  }

  .step-card {
    padding: 24px 20px;
  }

  .step-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}

/* Testimonials */
.testimonial {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

.testimonial-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.testimonial-author {
  font-size: 14px;
  color: var(--warm-gray);
}

/* FAQ */
.faq-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

details {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--charcoal);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--warm-gray);
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details[open] summary {
  margin-bottom: 12px;
}

details p {
  margin: 0;
  padding-top: 0;
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding-top 0.3s ease;
}

details[open] p {
  opacity: 1;
  max-height: 200px;
  padding-top: 4px;
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--light-gray);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--warm-gray);
  font-size: 14px;
}

/* Success Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-content h2 {
  font-size: 48px;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 20px;
}

.modal-subtitle {
  font-size: 20px;
  color: var(--warm-gray);
  margin: 0 0 32px;
  line-height: 1.5;
}

.modal-timeline h3 {
  font-size: 18px;
  color: var(--charcoal);
  margin: 0 0 16px;
  text-align: left;
}

.modal-timeline ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
}

.modal-timeline li {
  padding: 8px 0;
  color: var(--warm-gray);
  font-size: 16px;
  position: relative;
  padding-left: 20px;
}

.modal-timeline li:before {
  content: "•";
  color: var(--primary-blue);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.modal-close-btn {
  background: #4ade80;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.modal-close-btn:hover {
  background: #22c55e;
  transform: translateY(-1px);
}

/* Smart Insights Section */
.smart-insights-container {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-radius: 20px;
  padding: 0 24px 48px;
  margin-top: 64px;
  border: 1px solid rgba(30, 64, 175, 0.1);
  text-align: center;
}

.smart-insights-image {
  margin-bottom: 24px;
}

.smart-insights-image img {
  max-width: 70%;
  height: auto;
}

.smart-insights-content h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 8px;
}

.smart-insights-content p {
  font-size: 18px;
  color: var(--warm-gray);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .smart-insights-container {
    padding: 0 16px 32px;
    margin-top: 48px;
  }

  .smart-insights-image {
    margin-bottom: 20px;
  }

  .smart-insights-image img {
    max-width: 80%;
  }
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.sr-only { position: absolute; left: -9999px; }

/* Responsive */
@media(max-width: 768px) {
  .email-form {
    flex-direction: column;
  }

  .hero {
    padding: 40px 0;
  }

  section {
    padding: 40px 0;
  }

  #how-it-works {
    padding-top: 20px;
  }

  .mockup-container {
    max-width: 500px;
    margin: 20px auto;
  }

  .hero-grid {
    gap: 40px;
  }

  .nav {
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
  }

  .nav div:last-child .badge {
    display: none;
  }

  .nav .cta {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
  }
}

/* Extra small screens (phones) */
@media(max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }

  .nav {
    padding: 8px 0;
    gap: 12px;
  }

  .brand {
    font-size: 18px;
    gap: 8px;
  }

  .logo {
    width: 28px;
    height: 28px;
  }

  .nav .badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .nav .cta {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Mobile hero optimizations */
  .hero {
    padding: 24px 0;
  }

  .hero h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .hero .subtitle {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .badge-row {
    margin: 16px 0;
  }

  .badge {
    font-size: 12px;
    padding: 6px 10px;
  }
}