/* ===== CSS Variables ===== */
:root {
  --color-bg-light: #F3F4F6;
  --color-dark-blue: #1E3E62;
  --color-orange: #FF6500;
  --color-green: #4ADE80;
  --color-dark: #0B192C;
  --color-medium-blue: #2C5F8D;
  --color-white: #FFFFFF;
  --color-gray-100: #F9FAFB;
  --color-gray-200: #E5E7EB;
  --color-gray-600: #4B5563;
  --color-gray-800: #1F2937;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container-max: 1200px;
  --section-padding: 100px;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
  z-index: 1000;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-dark-blue);
}

.logo-icon {
  font-size: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-gray-600);
  transition: color 0.2s ease;
}

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

.nav-store-buttons {
  display: flex;
  gap: 12px;
  margin-left: 8px;
}

.store-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-bg-light);
  color: var(--color-dark-blue);
  transition: all 0.2s ease;
}

.store-icon:hover {
  background: var(--color-dark-blue);
  color: var(--color-white);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  gap: 10px;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(255, 101, 0, 0.3);
}

.btn-primary:hover {
  background: #E55A00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 101, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-dark-blue);
  border: 2px solid var(--color-gray-200);
}

.btn-secondary:hover {
  border-color: var(--color-dark-blue);
  background: var(--color-bg-light);
}

.btn-store {
  background: var(--color-white);
  color: var(--color-dark-blue);
  padding: 12px 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-store:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 12px 32px;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  background: var(--color-bg-light);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 40px;
  align-items: center;
}

.hero-content {
  max-width: 520px;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-dark-blue);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.7;
  color: var(--color-gray-600);
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  margin-right: -100px;
}

.hero-image img {
  width: 110%;
  max-width: 800px;
  height: auto;
  object-fit: contain;
}

/* ===== Section Common Styles ===== */
.section-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark-blue);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.section-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-gray-600);
  margin-bottom: 16px;
}

.section-text:last-child {
  margin-bottom: 0;
}

/* ===== Meet BabyTrack Section ===== */
.meet-section {
  padding: var(--section-padding) 0;
  background: var(--color-white);
}

.meet-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 60px;
  align-items: center;
}

.meet-image {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.meet-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
}

.meet-content {
  max-width: 480px;
}

/* ===== How It Works Section ===== */
.how-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-light);
}

.how-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.how-header {
  margin-bottom: 60px;
}

.how-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.how-step:last-child {
  margin-bottom: 0;
}

.how-step-reverse {
  direction: rtl;
}

.how-step-reverse > * {
  direction: ltr;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-orange);
  color: var(--color-white);
  font-size: 24px;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 20px;
}

.step-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 8px;
}

.step-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-orange);
  margin-bottom: 16px;
}

.how-step-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
}

/* ===== Features Section ===== */
.features-section {
  padding: var(--section-padding) 0;
  background: var(--color-white);
}

.features-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.features-header {
  margin-bottom: 60px;
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block-reverse {
  direction: rtl;
}

.feature-block-reverse > * {
  direction: ltr;
}

.feature-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 16px;
}

.feature-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 8px;
}

.feature-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-orange);
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  font-size: 17px;
  color: var(--color-gray-600);
  margin-bottom: 12px;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-green);
  border-radius: 50%;
}

/* ===== Family Team Section ===== */
.team-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-light);
}

.team-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.team-header {
  max-width: 600px;
  margin: 0 auto 50px;
}

.team-image {
  margin-bottom: 40px;
}

.team-image img {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  height: auto;
}

.team-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ===== Testimonials Section ===== */
.testimonials-section {
  padding: var(--section-padding) 0;
  background: var(--color-white);
}

.testimonials-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.testimonials-header {
  margin-bottom: 50px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: var(--color-bg-light);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-quote {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-600);
  font-style: italic;
  margin-bottom: 20px;
}

.author-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-dark-blue);
}

.author-title {
  display: block;
  font-size: 14px;
  color: var(--color-gray-600);
  margin-top: 4px;
}

/* ===== Milestones Section ===== */
.milestones-section {
  padding: var(--section-padding) 0;
  background: var(--color-white);
}

.milestones-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.milestones-content {
  max-width: 450px;
}

.milestone-list {
  list-style: none;
  padding: 0;
  margin-top: 24px;
}

.milestone-list li {
  position: relative;
  padding-left: 32px;
  font-size: 17px;
  color: var(--color-gray-600);
  margin-bottom: 12px;
}

.milestone-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-green);
  font-weight: 700;
}

.milestones-image img {
  width: 100%;
  max-width: 450px;
  height: auto;
}

/* ===== Download CTA Section ===== */
.cta-section {
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, var(--color-dark-blue) 0%, var(--color-medium-blue) 100%);
  text-align: center;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.cta-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

.cta-image {
  margin-bottom: 40px;
}

.cta-image img {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  height: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.cta-divider {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  font-size: 14px;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-dark);
  padding: 60px 0 30px;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-column a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--color-orange);
  color: var(--color-white);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    justify-content: center;
    order: -1;
    margin-right: 0;
  }

  .hero-image img {
    max-width: 500px;
    max-height: 50vh;
    width: 100%;
  }

  /* Meet Section */
  .meet-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .meet-image {
    justify-content: center;
  }

  .meet-image img {
    max-width: 400px;
  }

  .meet-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .section-title {
    font-size: 36px;
  }

  /* How It Works */
  .how-step {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .how-step-reverse {
    direction: ltr;
  }

  .how-step-image {
    order: -1;
  }

  .how-step-image img {
    max-width: 350px;
    margin: 0 auto;
  }

  /* Features */
  .feature-block {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .feature-block-reverse {
    direction: ltr;
  }

  .feature-image {
    order: -1;
  }

  .feature-image img {
    max-width: 400px;
    margin: 0 auto;
  }

  .feature-list {
    display: inline-block;
    text-align: left;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Milestones */
  .milestones-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .milestones-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .milestone-list {
    display: inline-block;
    text-align: left;
  }

  .milestones-image img {
    max-width: 350px;
    margin: 0 auto;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand {
    margin-bottom: 20px;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-link {
    display: none;
  }

  .hero-title {
    font-size: 36px;
  }

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

  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .section-title {
    font-size: 32px;
  }

  .step-title,
  .feature-title {
    font-size: 26px;
  }

  .cta-title {
    font-size: 32px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .team-buttons {
    flex-direction: column;
  }
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for children */
.animate-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-stagger.animate-visible > *:nth-child(1) { transition-delay: 0s; }
.animate-stagger.animate-visible > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger.animate-visible > *:nth-child(3) { transition-delay: 0.2s; }
.animate-stagger.animate-visible > *:nth-child(4) { transition-delay: 0.3s; }
.animate-stagger.animate-visible > *:nth-child(5) { transition-delay: 0.4s; }

.animate-stagger.animate-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
.animate-from-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-from-left.animate-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.animate-from-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-from-right.animate-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up animation */
.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-scale.animate-visible {
  opacity: 1;
  transform: scale(1);
}

/* Hero specific animation - always visible on load */
.hero .hero-content {
  animation: heroFadeIn 1s ease-out forwards;
}

.hero .hero-image {
  animation: heroSlideIn 1s ease-out 0.3s forwards;
  opacity: 0;
}

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

@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-stagger > *,
  .animate-from-left,
  .animate-from-right,
  .animate-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero .hero-content,
  .hero .hero-image {
    animation: none;
    opacity: 1;
  }
}
