/* =========================================
   REVIVE & THRIVE OVER 40 — Global Styles
   ========================================= */

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: #FAF9F7;
  color: #243447;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Tokens ── */
:root {
  --bg:      #FAF9F7;
  --navy:    #243447;
  --sage:    #A8B7A0;
  --sage-light: #C8D4C2;
  --sage-bg: #EFF3EE;
  --coral:   #D9775F;
  --coral-dark: #C26248;
  --white:   #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(36,52,71,0.07);
  --shadow-md: 0 6px 24px rgba(36,52,71,0.10);

  --max-w: 1100px;
  --section-pad: 80px 24px;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  line-height: 1.25;
  color: #243447;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: #3d5166; }
p:last-child { margin-bottom: 0; }

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-dark); }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-pad); }

.section-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.1rem;
  max-width: 600px;
  color: #3d5166;
  margin-bottom: 48px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--coral-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(217,119,95,0.30);
}

.btn-outline {
  background: transparent;
  color: var(--coral);
  border: 2px solid var(--coral);
}
.btn-outline:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-white {
  background: var(--white);
  color: var(--coral);
}
.btn-white:hover {
  background: #f5f5f5;
  color: var(--coral-dark);
  transform: translateY(-1px);
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,249,247,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(168,183,160,0.25);
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.2;
}

.nav-logo span { color: var(--coral); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--coral); }

.nav-cta { margin-left: 12px; padding: 12px 24px; font-size: 0.9rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(168,183,160,0.3);
  padding: 24px;
  z-index: 99;
  flex-direction: column;
  gap: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--navy);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168,183,160,0.2);
}
.mobile-menu a:last-child { border-bottom: none; }

/* Sticky mobile CTA */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--coral);
  z-index: 98;
  padding: 14px 24px;
  text-align: center;
}
.sticky-cta a {
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: block;
}

/* ── Wave Divider (signature motif) ── */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg { display: block; width: 100%; height: 100%; }

/* ── Cards ── */
.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.sage-card {
  background: var(--sage-bg);
  border-radius: var(--radius-md);
  padding: 32px;
  border-left: 4px solid var(--sage);
}

.white-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
  display: block;
}

/* ── Hero ── */
.hero {
  padding: 100px 24px 72px;
  position: relative;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 48px;
  align-items: center;
}

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

.hero-eyebrow {
  display: inline-block;
  background: var(--sage-bg);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  border: 1px solid var(--sage-light);
}

.hero-title {
  margin-bottom: 24px;
  max-width: 420px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #3d5166;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.hero-trust-item {
  font-size: 0.88rem;
  color: #5a7080;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-trust-item::before {
  content: '✓';
  color: var(--sage);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero-image-block {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-image-block img {
  width: 115%;
  max-width: 580px;
  border-radius: var(--radius-lg);
  display: block;
  object-fit: cover;
  object-position: 70% center;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-md);
}

/* ── Testimonials ── */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--coral);
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--coral);
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-text {
  color: #3d5166;
  line-height: 1.8;
  flex: 1;
  margin-bottom: 24px;
}

.testimonial-author {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}

.testimonial-detail {
  font-size: 0.82rem;
  color: #7a929f;
  margin-top: 2px;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid rgba(168,183,160,0.35);
  padding: 24px 0;
}

.faq-item:first-child { border-top: 1px solid rgba(168,183,160,0.35); }

.faq-question {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--coral);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.faq-answer-inner {
  padding-top: 16px;
  color: #3d5166;
  line-height: 1.7;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-item.open .faq-answer { max-height: 500px; }

/* ── Section backgrounds ── */
.bg-sage { background: var(--sage-bg); }
.bg-navy { background: var(--navy); }
.bg-navy h2, .bg-navy h3, .bg-navy p { color: rgba(255,255,255,0.9); }
.bg-navy .section-label { color: var(--sage-light); }

/* ── CTA Band ── */
.cta-band {
  background: var(--coral);
  padding: 72px 24px;
  text-align: center;
}
.cta-band h2, .cta-band p { color: white; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { margin-bottom: 36px; opacity: 0.9; font-size: 1.05rem; }

/* ── Form ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(168,183,160,0.4);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--navy);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(168,183,160,0.2);
}

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

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

.footer-logo {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  margin-bottom: 8px;
}

.footer-logo span { color: var(--coral); }
.footer-tagline { font-size: 0.85rem; max-width: 220px; }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }

.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);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--coral); color: white; }

.footer-bottom {
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

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

.fade-in { opacity: 0; }
.fade-in.visible { animation: fadeInUp 0.6s ease forwards; }

/* Stagger */
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.25s; }
.fade-in:nth-child(4) { animation-delay: 0.35s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-image-block { display: none; }
}

@media (max-width: 640px) {
  :root { --section-pad: 56px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .sticky-cta { display: block; }
  body { padding-bottom: 60px; }
  .hero { padding-top: 48px; }
  .hero-trust { flex-direction: column; gap: 12px; }
}

/* ── Hero responsive overrides ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-image-block {
    display: flex;
    justify-content: center;
  }
  .hero-image-block img {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4/3;
    object-position: center 20%;
  }
  .hero-content { max-width: 100%; }
}

@media (max-width: 640px) {
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .hero-image-block img {
    aspect-ratio: 4/3;
    object-position: center 15%;
  }
  .hero-trust { flex-direction: column; gap: 10px; }
}

/* ── Logo image ── */
.nav-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

/* ── Strong Foundations nav link ── */
.nav-sf {
  color: var(--navy) !important;
  font-weight: 600 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-sf:hover {
  color: var(--coral) !important;
}

.nav-badge {
  display: inline-block;
  background: var(--coral);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 50px;
  line-height: 1.6;
  vertical-align: middle;
}

/* Footer logo image */
.footer-logo-img {
  height: 40px;
  width: auto;
  display: block;
  margin-bottom: 8px;
  /* Logo is green on white — invert to show on dark footer */
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ── SF homepage section responsive ── */
@media (max-width: 900px) {
  .bg-navy .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
}

/* ── SF roadmap responsive ── */
@media (max-width: 640px) {
  .roadmap-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 900px) {
  /* Founder section */
  div[style*="grid-template-columns:1fr 2fr"] {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  /* Roadmap */
  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
  }
  div[style*="position:absolute;top:36px"] {
    display: none;
  }
}
