/* Design tokens */
:root {
  --blue-500: #007AFF;
  --blue-600: #0a67e8;
  --purple-500: #5856D6;
  --orange-500: #FF6B35;
  --green-600: #059669;
  --bg-100: #F7F7F7;
  --bg-200: #EEEEEE;
  --bg-300: #E5E7EB;
  --text-900: #222;
  --text-700: #555;
  --text-600: #6B7280;
  --white: #fff;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.2);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.12);
}

/* Reset and Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-900);
  background-color: var(--bg-100);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img, video { max-width: 100%; height: auto; }
section { scroll-margin-top: 80px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; }
.brand-name { font-weight: 700; color: var(--text-900); }
.nav { display: flex; gap: 20px; align-items: center; }
.nav-link { color: var(--text-700); text-decoration: none; font-weight: 600; }
.nav-link:hover { color: var(--blue-500); }
.cta-link { 
  display: inline-block; 
  text-decoration: none;
  background: var(--blue-500); 
  color: white; 
  border: none; 
  padding: 16px 32px; 
  border-radius: 12px;
  font-size: 1.1rem; 
  font-weight: 700; 
  letter-spacing: 0.2px; 
  cursor: pointer; 
  transition: all 0.25s ease; 
  box-shadow: 0 6px 24px rgba(0, 122, 255, 0.35);
}
.cta-link:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 6px 25px rgba(0, 122, 255, 0.4); 
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle-bar { display: block; width: 24px; height: 2px; background: var(--text-900); margin: 5px 0; border-radius: 2px; }

/* Hero Section */
.hero {
  position: relative;
  /* Option A: soft blue→purple wash with very light tint */
  background:
    radial-gradient(900px 500px at 5% -10%, rgba(0,122,255,0.20), rgba(0,122,255,0) 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(88,86,214,0.18), rgba(88,86,214,0) 55%),
    linear-gradient(180deg, #FAFCFF 0%, #F4F6FF 100%);
  color: var(--text-900);
  padding: 120px 0 100px;
  overflow: hidden;
}
/* soft glow accent */
.hero::before {
  content: "";
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.18;
  width: 420px; height: 420px; background: #67a8ff; top: -140px; left: -140px;
}
/* subtle noise overlay */
.hero::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.18"/></svg>');
  opacity: 0.04; mix-blend-mode: overlay;
}
.hero-surface { padding: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-icon { margin-bottom: 30px; display: flex; justify-content: flex-start; }
.main-app-icon {
  width: 120px; height: 120px; border-radius: 24px; background: white; padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); transition: transform 0.3s ease;
}
.main-app-icon:hover { transform: scale(1.05); }
.hero-title { font-size: clamp(1.75rem, 3vw + 1rem, 3.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero-lead { font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem); line-height: 1.8; color: var(--text-700); margin: 12px 0 24px; max-width: 58ch; }
.hero-badges { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.badge { font-size: 0.85rem; padding: 6px 10px; border-radius: 999px; backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.1); }
.badge-soon { background: rgba(255,255,255,0.85); color: var(--text-900); border-color: rgba(0,0,0,0.15); }
.badge-beta { background: rgba(255, 107, 53, 0.9); color: #fff; border-color: rgba(255, 107, 53, 1); }

.cta-buttons { display: flex; gap: 20px; flex-wrap: wrap; }
.cta-primary {
  display: inline-block; text-decoration: none;
  background: var(--orange-500); color: white; border: none; padding: 16px 32px; border-radius: 12px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; transition: all 0.25s ease; box-shadow: 0 6px 24px rgba(255, 107, 53, 0.35);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(255, 107, 53, 0.4); }
.cta-secondary { background: transparent; color: var(--blue-500); border: 2px solid var(--blue-500); padding: 14px 30px; border-radius: 12px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.25s ease; text-decoration: none; }
.cta-secondary:hover { background: var(--blue-500); color: white; }

/* Phone Mockup */
.phone-mockup { display: flex; justify-content: center; align-items: center; }
/* Hero: show provided framed screenshot exactly as-is */
.phone-screen {
  width: clamp(260px, 28vw, 360px);
  height: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
}
.app-preview { background: transparent; height: auto; border-radius: 0; padding: 0; display: block; position: relative; }
.app-screenshot { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 0; }
.app-frame { display: none; }
/* Hide hero placeholders since we use a full framed screenshot */
.app-preview .backpack-icon,
.app-preview .app-title,
.app-preview .scan-button,
.app-preview .child-picker { display: none; }


@media (max-width: 768px) {
}
.backpack-icon { margin-bottom: 20px; }
.app-icon { width: 80px; height: 80px; border-radius: 16px; background: white; padding: 10px; }
.app-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 30px; }
.scan-button { background: rgba(255, 255, 255, 0.2); padding: 16px 24px; border-radius: 12px; font-weight: 600; margin-bottom: 30px; backdrop-filter: blur(10px); }
.child-picker { display: flex; gap: 10px; }
.child-circle { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; backdrop-filter: blur(10px); }

/* Section title */
.section-title { font-size: clamp(1.5rem, 2.2vw + 1rem, 2.5rem); font-weight: 700; text-align: center; margin-bottom: 60px; color: var(--text-900); }

/* How It Works Section */
.how-it-works { background: var(--bg-200); padding: 100px 0; }
.how-it-works-content { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-top: 60px; }
.steps-list { display: flex; flex-direction: column; gap: 30px; }
.step-item { display: flex; align-items: flex-start; gap: 20px; padding: 20px; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; background: transparent; }
.step-item.active { background: white; box-shadow: var(--shadow-md); }
@media (hover: hover) {
  .step-item:hover { background: white; box-shadow: var(--shadow-md); transform: translateX(10px); }
}
.step-icon { flex-shrink: 0; }
.step-icon > div { width: 60px; height: 60px; background: var(--blue-500); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3); transition: all 0.3s ease; }
.step-item:hover .step-icon > div, .step-item.active .step-icon > div { background: var(--orange-500); transform: scale(1.1); }
.child-picker-step { display: flex; gap: 6px; }
.child-picker-step .child-circle { width: 25px; height: 25px; background: rgba(255, 255, 255, 0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--blue-500); }
.step-content { flex: 1; }
.step-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; color: var(--text-900); transition: color 0.3s ease; }
.step-item:hover .step-title, .step-item.active .step-title { color: var(--orange-500); }
.step-description { color: #666; line-height: 1.5; font-size: 0.95rem; }

/* Step Visual */
.step-visual { display: flex; justify-content: center; align-items: center; }
.phone-mockup-step { width: clamp(260px, 28vw, 360px); aspect-ratio: 9 / 19.5; background: transparent; border-radius: 0; padding: 0; box-shadow: none; position: relative; }
.phone-screen-step { height: 100%; width: 100%; background: transparent; border-radius: 0; padding: 0; display: block; position: relative; overflow: hidden; }
.app-preview-step { width: 100%; height: 100%; position: relative; }
.step-preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.5s ease; text-align: center; }
.step-preview.active { opacity: 1; }
.step-screenshot { width: 100%; height: 100%; object-fit: contain; display: block; }
.child-picker-preview { display: flex; gap: 15px; margin-bottom: 30px; }
.child-picker-preview .child-circle { width: 50px; height: 50px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; backdrop-filter: blur(10px); border: 2px solid rgba(255,255,255,0.3); }
.preview-text { font-size: 1.1rem; font-weight: 500; opacity: 0.9; }
.camera-preview { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.camera-icon-large { font-size: 4rem; background: rgba(255,255,255,0.2); width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.scan-text { font-size: 1.1rem; font-weight: 500; opacity: 0.9; }
.ai-processing { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.processing-dots { display: flex; gap: 8px; }
.processing-dots span { width: 12px; height: 12px; background: rgba(255,255,255,0.8); border-radius: 50%; animation: pulse 1.5s infinite; }
.processing-dots span:nth-child(2) { animation-delay: 0.2s; }
.processing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%,100% { opacity: 0.3; transform: scale(0.8);} 50% { opacity: 1; transform: scale(1.2);} }
.ai-text { font-size: 1.1rem; font-weight: 500; opacity: 0.9; }
.calendar-preview { width: 100%; padding: 20px; }
.action-items { display: flex; flex-direction: column; gap: 15px; }
.action-item { background: rgba(255,255,255,0.15); padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); }

/* Features Section */
.features { background: var(--bg-100); padding: 100px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 60px; }
.feature-card { background: white; padding: 40px 30px; border-radius: var(--radius-lg); text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s ease; }
.feature-card:hover { transform: translateY(-5px); }
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 15px; color: var(--text-900); }
.feature-description { color: #666; line-height: 1.6; }

/* Final CTA Section */
.final-cta { background: linear-gradient(135deg, var(--blue-500) 0%, var(--purple-500) 100%); color: white; padding: 100px 0; text-align: center; }
.final-cta .section-title { color: white; margin-bottom: 20px; }
.cta-subtitle { font-size: 1.2rem; margin-bottom: 40px; color: rgba(255,255,255,0.9); }
.final-cta .cta-buttons { justify-content: center; }

/* Footer */
.footer { background: #333; color: white; padding: 40px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-link { color: rgba(255,255,255,0.8); text-decoration: none; margin-left: 30px; transition: color 0.3s ease; }
.footer-link:hover { color: white; }
.copyright { color: rgba(255,255,255,0.6); }

/* Responsive */
@media (max-width: 768px) {
  /* Center icons inside steps */
  .steps-list .step-icon { margin-left: auto; margin-right: auto; }
  .steps-list .step-icon > div { margin: 0 auto; }
  /* Safer defaults for mobile */
  html, body { width: 100%; overflow-x: hidden; }

  /* Header: collapse nav into drawer */
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 12px;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav .nav-link { padding: 10px 12px; }

  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-icon { justify-content: center; }
  .hero-badges { justify-content: center; }
  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .how-it-works-content { grid-template-columns: 1fr; gap: 24px; }
  .steps-list { order: 2; display: flex; flex-direction: column; gap: 16px; }
  /* Conventional mobile UX: inline preview blocks under each step */
  .step-visual { display: none; }
  .step-item { display: block; text-align: center; }
  .step-icon { display: flex; justify-content: center; margin: 0 auto 10px; }
  .step-content { text-align: center; }
  .step-preview-host { display: block; margin-top: 12px; }
  /* Match demo image size on mobile */
  .step-preview-host .phone-mockup-step { width: 100%; max-width: 360px; aspect-ratio: 9 / 19.5; height: auto; margin: 12px auto 0; }
  .step-preview-host .phone-screen-step { padding: 0; height: 100%; }
  .step-preview-host .app-preview-step { position: relative; height: 100%; }
  .step-preview-host .step-screenshot { width: 100%; height: 100%; object-fit: contain; display: block; }
  /* JS fallback: fixed pin during scroll */
  .step-visual.is-fixed { position: fixed; top: 72px; left: 0; right: 0; padding: 0 16px; z-index: 20; }
  .step-visual-spacer { display: none; }
  .step-visual.is-fixed + .step-visual-spacer { display: block; }
  .step-item { padding: 15px; }
  .step-icon > div { width: 50px; height: 50px; font-size: 1.2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .footer-content { flex-direction: column; text-align: center; }
  .footer-link { margin: 0 15px; }
  .phone-screen, .phone-mockup-step { width: 240px; height: 480px; }
  .phone-screen-step { padding: 30px 15px; }
  .child-picker-preview .child-circle { width: 40px; height: 40px; font-size: 1.2rem; }
  .camera-icon-large { width: 80px; height: 80px; font-size: 3rem; }
}
@media (max-width: 480px) {
  .hero { padding: 80px 0 60px; }
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
  .how-it-works, .features, .final-cta { padding: 60px 0; }
}

/* Icon sizing helpers */
.icon { width: 22px; height: 22px; display: inline-block; }
.icon-lg { width: 44px; height: 44px; }

/* Ensure icons inside child circles are centered */
.child-circle .icon { color: var(--blue-500); }
.camera-icon .icon, .ai-icon .icon, .calendar-icon .icon { color: #fff; }

/* Waitlist Modal */
.waitlist-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.waitlist-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: var(--text-900);
}

.waitlist-content h3 { margin-bottom: 16px; color: var(--text-900); }
.waitlist-content p { margin-bottom: 24px; color: var(--text-700); line-height: 1.6; }
.waitlist-content form { display: flex; flex-direction: column; gap: 16px; }
.waitlist-content input[type="email"] { padding: 14px 16px; border: 2px solid var(--bg-300); border-radius: 8px; font-size: 1rem; transition: border-color 0.2s ease; }
.waitlist-content input[type="email"]:focus { outline: none; border-color: var(--blue-500); }
.waitlist-content button { width: 100%; }

/* Success message styling */
.waitlist-content .success-message { text-align: center; }
.waitlist-content .success-message h3 { color: var(--green-600); }
.waitlist-content .success-message p { color: var(--text-600); }
