/* Variables (includes any from index.html) */
:root {
  --soft-mint: #B8E6D1;
  --mint-bg: #C4E8D7;
  --navy: #1e3a5f;
  --dark-text: #2c3e50;
  --gray-text: #6b7280;
  --white: #ffffff;
  --card-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
/* Utility for body scroll lock when mobile menu open */
body.menu-open {
  overflow: hidden;
}

/* Global reset and base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  overflow-x: hidden;
  background: var(--white);
  font-display: swap;
}

a { color: inherit; }

/* Lazy loading hint for images */
img {
  loading: lazy;
  max-width: 100%;
  height: auto;
}

/* Skip to content for accessibility */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}
.skip-to-content:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 1rem;
}

/* Navigation (default: solid on internal pages; home overrides to transparent) */
nav {
  position: relative;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  z-index: 100;
}

nav.global {
  position: relative;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  z-index: 100;
  /* Match index header/hero color */
  background: linear-gradient(180deg, var(--mint-bg) 0%, var(--soft-mint) 100%);
  border-bottom: 1px solid #e5e7eb;
}

/* Home page variant keeps nav over hero */
.home nav.global {
  position: absolute;
  padding: 2rem 5%;
  background: transparent;
  border-bottom: none;
}
.global .nav-container {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; position: relative;
}
.global .logo { font-size: 1.8rem; font-weight: bold; color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.global .logo-icon { width: 40px; height: 40px; background: var(--white); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--card-shadow); overflow: hidden; }
.global .logo-icon img { width: 100px; height: 100px; display: block; object-fit: contain;    max-width: 130%; }

/* Desktop links */
.global .nav-links { display: flex; gap: 2rem; align-items: center; }
.global .nav-link { color: var(--dark-text); text-decoration: none; font-weight: 500; transition: opacity .3s ease; }
.global .nav-link:hover { opacity: .7; }
.global .nav-cta { background: var(--navy); color: var(--white); padding: .8rem 2rem; border-radius: 25px; text-decoration: none; font-weight: 600; transition: all .3s ease; box-shadow: var(--card-shadow); }
.global .nav-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(30,58,95,.3); }

/* Mobile dropdown menu */
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  display: none; /* toggled via JS */
  z-index: 2000; /* ensure above hero/headers/back-to-top */
  min-height: auto;
  overflow: visible;
}

.mobile-menu.open { display: block; }
.mobile-menu .nav-links {
  display: flex; flex-direction: column; gap: 0;
  padding: .5rem 5% 3rem;
}
.mobile-menu .nav-links a { padding: .95rem 0; border-bottom: 1px solid #eef2f7; }
.mobile-menu .nav-links a:last-child { border-bottom: 0; margin-bottom: 1rem; padding: 10px;}

/* Back-to-top floating button */
.back-to-top {
  position: fixed; right: 16px; bottom: 16px;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--navy); color: var(--white);
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(30,58,95,.35);
  cursor: pointer; z-index: 9999;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { transform: translateY(-2px); transition: transform .2s ease; }


/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--mint-bg) 0%, var(--soft-mint) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  gap: 4rem;
}
.hero-text { animation: fadeIn 1s ease-out; }
.hero-text h1 { font-size: 2.8rem; color: var(--navy); margin-bottom: 1rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.5rem; color: var(--dark-text); font-weight: normal; margin-bottom: 1.5rem; }
.hero-text p { font-size: 1.1rem; color: var(--gray-text); margin-bottom: 2.5rem; line-height: 1.8; }

/* Feature Cards in Hero */
.hero-features { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
.hero-feature-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s ease;
  opacity: 0;
  animation: slideUp 0.6s ease-out forwards;
}
.hero-feature-card:nth-child(1) { animation-delay: 0.2s; }
.hero-feature-card:nth-child(2) { animation-delay: 0.4s; }
.hero-feature-card:nth-child(3) { animation-delay: 0.6s; }
.hero-feature-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

.feature-icon { font-size: 1.5rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-content h3 { font-size: 1.1rem; color: var(--dark-text); margin-bottom: 0.3rem; }
.feature-content p { font-size: 0.95rem; color: var(--gray-text); line-height: 1.6; }

.cta-section { display: flex; align-items: center; gap: 1rem; }
.primary-btn {
  background: var(--navy); color: var(--white);
  padding: 1rem 2.5rem; border-radius: 30px; text-decoration: none; font-weight: 600; font-size: 1.1rem;
  transition: all 0.3s ease; display: inline-flex; align-items: center; gap: .5rem;
  box-shadow: 0 4px 15px rgba(30,58,95,0.3);
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30,58,95,0.4); }
.secondary-link { color: var(--navy); text-decoration: none; font-weight: 600; transition: opacity .3s ease; }
.secondary-link:hover { opacity: 0.7; }

/* App Screenshot */
.hero-image { position: relative; display: flex; justify-content: center; align-items: center; }
.app-screenshot { max-width: 100%; height: auto; max-height: 600px; border-radius: 20px; animation: float 6s infinite ease-in-out; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

.container {
  max-width: 1100px;
  margin: 0 auto;
}
.skip-to-content {
  position: absolute; left: -9999px; z-index: 999; padding: 1rem;
  background: var(--navy); color: var(--white); text-decoration: none;
}
.skip-to-content:focus { left: 50%; transform: translateX(-50%); top: 1rem; }

/* Subheader band for internal pages */
.header-bar {
  border-bottom: 1px solid #e5e7eb;
  padding: 2.5rem 5%;
}

.breadcrumbs {
  font-size: 0.95rem;
  color: var(--gray-text);
}

.breadcrumbs a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.page-title {
  color: var(--navy);
  font-size: 1.8rem;
  margin: 0.25rem 0 0;
}

.main {
  padding: 2rem 5% 4rem;
}

/* Ensure content has space when nav is absolute on home */
.home .hero-content { padding-top: 8rem; }
/* Ensure internal pages sit below solid nav */
body:not(.home) .header-bar { margin-top: 0; }

/* Features Section */
.features { padding: 6rem 5%; background: var(--white); }
.features-container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; color: var(--navy); margin-bottom: 1rem; }
.section-header p { font-size: 1.2rem; color: var(--gray-text); max-width: 600px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }

.feature-card { background: #f9fafb; padding: 2.5rem; border-radius: 20px; transition: all .3s ease; border: 1px solid #e5e7eb; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: var(--soft-mint); }
.feature-card-icon { width: 60px; height: 60px; background: var(--mint-bg); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 1.5rem; }
.feature-card h3 { font-size: 1.4rem; color: var(--dark-text); margin-bottom: .8rem; }
.feature-card p { color: var(--gray-text); line-height: 1.8; }

/* Stats Section */
.stats-section { padding: 4rem 5%; background: var(--mint-bg); }
.stats-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 3rem; color: var(--navy); margin-bottom: .5rem; }
.stat-item p { font-size: 1.1rem; color: var(--dark-text); }

/* Testimonials */
.testimonials { padding: 6rem 5%; background: var(--white); }
.testimonials-container { max-width: 1200px; margin: 0 auto; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 3rem; }
.testimonial-card { background: #f9fafb; padding: 2rem; border-radius: 16px; border: 1px solid #e5e7eb; }
.testimonial-text { font-size: 1.1rem; color: var(--dark-text); margin-bottom: 1.5rem; line-height: 1.8; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 50px; height: 50px; background: var(--mint-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.author-info h4 { font-size: 1rem; color: var(--dark-text); margin-bottom: .2rem; }
.author-info p { font-size: .9rem; color: var(--gray-text); }

/* FAQ Section */
.faq-section { padding: 6rem 5%; background: var(--mint-bg); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white); margin-bottom: 1.5rem; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.05); transition: all .3s ease;
}
.faq-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
.faq-item.active { border-color: var(--soft-mint); box-shadow: 0 4px 20px rgba(184,230,209,0.3); }
.faq-question {
  padding: 1.75rem 2rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1.1rem; color: var(--dark-text); background: none; border: none; width: 100%; text-align: left; transition: all .3s ease;
}
.faq-question:hover { color: var(--navy); }
.faq-question span { font-size: 1.5rem; font-weight: 300; color: var(--navy); transition: transform .3s ease; display: inline-block; line-height: 1; }
.faq-item.active .faq-question span { transform: rotate(45deg); }
.faq-answer {
  padding: 0 2rem; color: var(--gray-text); max-height: 0; overflow: hidden; transition: all .3s ease; line-height: 1.8; font-size: 1rem;
}
.faq-item.active .faq-answer { max-height: 300px; padding: 0 2rem 2rem; }

/* CTA Section */
.cta-section-bottom { padding: 6rem 5%; background: linear-gradient(180deg, var(--white) 0%, var(--mint-bg) 100%); text-align: center; }
.cta-container { max-width: 800px; margin: 0 auto; }
.cta-container h2 { font-size: 2.5rem; color: var(--navy); margin-bottom: 1rem; }
.cta-container p { font-size: 1.2rem; color: var(--gray-text); margin-bottom: 2.5rem; }
.download-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.app-store-btn { display: inline-block; text-decoration: none; transition: transform .3s ease, opacity .3s ease; height: 60px; }
.app-store-btn:hover { transform: scale(1.05); opacity: .9; }
.app-store-btn img { display: block; height: 60px; width: auto; }

/* Make internal subheader color match the index header (hero gradient) */
.header-bar {
  border-bottom: 1px solid #e5e7eb;
  padding: 2.5rem 5%;
}
.header-bar .page-title {
  color: var(--navy);
}

/* Optional: ensure links contrast on gradient header */
nav.global .nav-link,
nav.global .logo,
nav.global .logo span {
  color: var(--dark-text);
}

/* Footer for SEO */
footer { background: var(--navy); color: var(--white); padding: 4rem 5% 2rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-section h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.footer-section a { color: rgba(255,255,255,0.8); text-decoration: none; display: block; margin-bottom: .5rem; transition: color .3s ease; }
.footer-section a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

/* Fix for deprecated API warning - explicit h1 font-size with high specificity */
section.hero h1,
header h1.page-title,
section h1,
article h1,
aside h1,
nav h1 {
  font-size: 2.8rem !important;
}

/* Animations */
@keyframes fadeIn { from { opacity:0; transform: translateY(20px);} to { opacity:1; transform: translateY(0);} }
@keyframes slideUp { from { opacity:0; transform: translateY(30px);} to { opacity:1; transform: translateY(0);} }

/* How It Works Section */
.how-it-works { padding: 6rem 5%; background: #f9fafb; }
.how-it-works-container { max-width: 1200px; margin: 0 auto; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin: 3rem 0; }
.step-card {
  background: var(--white); padding: 2rem; border-radius: 20px; text-align: center; position: relative; transition: all .3s ease; border: 2px solid transparent;
}
.step-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: var(--soft-mint); }
.step-number { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--navy); color: var(--white); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: .9rem; }
.step-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.step-card h3 { font-size: 1.2rem; color: var(--dark-text); margin-bottom: .8rem; }
.step-card p { color: var(--gray-text); line-height: 1.6; }

.feature-highlight { margin-top: 3rem; display: flex; justify-content: center; }
.highlight-card { background: var(--mint-bg); padding: 2rem 3rem; border-radius: 20px; max-width: 600px; text-align: center; border: 2px solid var(--soft-mint); }
.highlight-card h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: .8rem; }
.highlight-card p { color: var(--dark-text); line-height: 1.6; }

/* Trust Section */
.trust-section { padding: 4rem 5%; background: var(--white); border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.trust-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.trust-badge { padding: 1.5rem; }
.trust-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.trust-badge h3 { font-size: 1.2rem; color: var(--dark-text); margin-bottom: .3rem; font-weight: 600; }
.trust-badge p { font-size: .9rem; color: var(--gray-text); }

.section {
  margin: 1.5rem 0;
}

.section h2 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.section p {
  color: var(--gray-text);
}

.list {
  margin: 0.75rem 0 0 1.25rem;
  color: var(--gray-text);
}

footer.global-footer {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 5% 2rem;
}
.global-footer .footer-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem; margin-bottom: 3rem;
}
.global-footer .footer-section h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.global-footer .footer-section a {
  color: rgba(255,255,255,0.8); text-decoration: none; display: block; margin-bottom: .5rem; transition: color .3s ease;
}
.global-footer .footer-section a:hover { color: var(--white); }
.global-footer .footer-bottom {
  text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
}

/* Legacy simple footer class kept for secondary blocks */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 2rem 5%;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 3rem;
}

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

.link-grid a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.cta {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 28px;
  font-weight: 700;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(30,58,95,0.25);
}

.badge {
  display: inline-block;
  background: var(--mint-bg);
  border: 1px solid var(--soft-mint);
  color: var(--navy);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 900px) {
  .global .nav-links { display: none; }
}
@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; padding-top: 8rem; text-align: center; }
  .hero-text h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1.2rem; }
  /* Responsive font-size for h1 in sectioning elements */
  section.hero h1,
  header h1.page-title,
  section h1,
  article h1,
  aside h1,
  nav h1 {
    font-size: 2rem !important;
  }
  .hero-features { max-width: 400px; margin: 0 auto 2.5rem; }
  .cta-section { flex-direction: column; gap: 1.5rem; }
  .app-screenshot { max-height: 400px; }
  .global .nav-links { display: none; }
  .features-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .trust-container { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .trust-badge { padding: 1rem; }
  .trust-icon { font-size: 2rem; }
  .download-buttons { flex-direction: column; align-items: center; }
  .section-header h2 { font-size: 2rem; }
  .feature-card, .testimonial-card { padding: 1.5rem; }
  .highlight-card { padding: 1.5rem 2rem; }
}
@media (max-width: 600px) { .page-title { font-size: 1.6rem; } }
@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .hero-feature-card { padding: 1.2rem; }
  /* Responsive font-size for h1 in sectioning elements */
  section.hero h1,
  header h1.page-title,
  section h1,
  article h1,
  aside h1,
  nav h1 {
    font-size: 1.8rem !important;
  }
  .trust-container { grid-template-columns: 1fr; }
}
/* Keep existing small typography rule */
@media (max-width: 600px) {
  .page-title { font-size: 1.6rem; }
}
/* Hamburger Menu Button */
.hamburger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Hamburger lines using pseudo-elements */
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--navy);
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger span {
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--navy);
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  border-radius: 2px;
  display: block;
}

.hamburger::before {
  top: 14px;
}

.hamburger span {
  top: 21px;
}

.hamburger::after {
  top: 28px;
}

/* Active state - transform to X */
.hamburger.active::before {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.hamburger.active span {
  opacity: 0;
  transform: translateX(-50%) scale(0);
}

.hamburger.active::after {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

/* Step icon image sizing for how-it-works */
.step-icon img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  display: block;
}

/* Center and round the step icon image */
.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon img {
  width: 156px;
  height: 156px;
  object-fit: cover;
  display: block;
  border-radius: 12px; /* rounded corners */
}

/* Responsive Hamburger Menu Display - Must come after main hamburger rules */
@media (max-width: 900px) {
  .hamburger { display: inline-flex !important; align-items: center; justify-content: center; }
  /* Ensure mobile menu nav links are visible when menu is open */
  .mobile-menu.open .nav-links { display: flex !important; }
}