/* ============================================================
   mama health — shared styles
   Referenced by: index.html, stories.html
   ============================================================ */

/* ============== VARIABLES ============== */
:root {
  --navy: #0a1f3a;
  --navy-deep: #061528;
  --black: #0d0f12;
  --cream: #f7f4ed;
  --cream-warm: #f0ece1;
  --white: #ffffff;
  --accent: #4ade80;
  --accent-dark: #2d8f50;
  --text-dark: #0d0f12;
  --text-muted: #5a6360;
  --text-faint: #8a9089;
  --line: rgba(255, 255, 255, 0.1);
  --line-light: #e2ddd0;
  --line-dark: #1a2438;
  --display: 'Poppins', sans-serif;
  --body: 'Poppins', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  /* Spacing scale — use these to keep vertical rhythm consistent */
  --space-sm: 24px;
  --space-md: 48px;
  --space-lg: 80px;
  --space-xl: 110px;
}

/* ============== RESET & BASE ============== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.035em; }
h4 { letter-spacing: -0.02em; }
em { font-style: italic; font-weight: 300; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============== NAV ============== */
nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.logo-img {
  display: block;
  height: 22px;
  width: auto;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--accent);
  color: var(--navy);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.nav-cta:hover { background: #6ee7a4; }

.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.2s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger { color: var(--accent); }

.nav-dropdown-trigger svg { transition: transform 0.25s ease; }
.nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 10px;
  min-width: 360px;
  box-shadow: 0 24px 48px rgba(13, 15, 18, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
  transform: rotate(45deg);
}

.nav-dropdown-item {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.2s ease;
  position: relative;
}

.nav-dropdown-item:hover { background: var(--cream); }

.nav-dropdown-item:hover::after {
  content: '→';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-dark);
  font-size: 14px;
}

.nav-dropdown-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  font-weight: 500;
}

.nav-dropdown-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.nav-dropdown-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============== LOGO STRIP ============== */
.logos {
  background: var(--cream);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line-light);
  overflow: hidden;
  position: relative;
}

.logos-meta {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logos-meta::before,
.logos-meta::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--text-muted);
  opacity: 0.5;
}

.logos-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.logos-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  will-change: transform;
}

.logos-marquee:hover .logos-track { animation-play-state: paused; }

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-item {
  flex-shrink: 0;
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  border-right: 1px solid var(--line-light);
}

.logo-item img {
  height: 30px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.logo-item:last-child { border-right: none; }
.logo-item:hover { opacity: 0.85; }
.logo-item:hover img { filter: grayscale(0%); }

/* ============== SECTION EYEBROW ============== */
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent-dark);
  flex-shrink: 0;
}

/* ============== HERO FORM (base) ============== */
.hero-form {
  display: flex;
  background: var(--white);
  border-radius: 100px;
  padding: 6px;
  max-width: 460px;
}

.hero-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 22px;
  font-family: var(--body);
  font-size: 14px;
  background: transparent;
  color: var(--text-dark);
}

.hero-form input::placeholder { color: var(--text-faint); }

.hero-form button {
  background: var(--accent);
  color: var(--navy);
  border: none;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.hero-form button:hover { background: #6ee7a4; }

/* ============== REVEAL ANIMATION ============== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============== FOOTER ============== */
footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.6);
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1a2024;
  margin-bottom: 32px;
}

.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-logo {
  display: block;
  height: 22px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.95;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.footer-bottom a {
  color: inherit;
  text-decoration: none;
}
.footer-bottom a:hover {
  text-decoration: underline;
}

/* ============== REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
  .logos-track,
  .trust-track { animation: none; }
  .reveal { transition: none; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .nav-links > .nav-link { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .logo-item { padding: 0 36px; }
  .logo-item img { height: 24px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; }
}
