/* Now Your Health — Global Stylesheet */
:root {
  --primary: #1d6a4f;
  --primary-fg: #fffdf8;
  --secondary: #ecefe6;
  --secondary-fg: #2d3324;
  --accent: #2ea370;
  --accent-fg: #fffdf8;
  --bg: #faf7f2;
  --fg: #1c1815;
  --muted: #f3eee5;
  --muted-fg: #6b6359;
  --border: #e6dfd2;
  --ring: #1d6a4f;
  --font-heading: Georgia, serif;
  --font-body: Georgia, serif;
  --max-w: 1200px;
  --max-w-narrow: 800px;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.3; color: var(--fg); }
h1 { font-size: 2.2rem; margin-bottom: 16px; }
h2 { font-size: 1.6rem; margin: 32px 0 12px; }
h3 { font-size: 1.25rem; margin: 24px 0 8px; }

p { margin-bottom: 16px; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* Editorial utility classes */
.eyebrow {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-fg);
}
.dek {
  font-size: 1.05rem; color: var(--muted-fg); line-height: 1.6;
}
.font-display { font-family: var(--font-heading); }
.lift-hover { transition: transform 200ms, box-shadow 200ms; }
.lift-hover:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 20px; }

/* Header — 3-tier newspaper style */
.site-header { background: var(--bg); }
.header-strip {
  border-bottom: 1px solid var(--border);
}
.header-strip .container {
  max-width: 72rem; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-fg);
}
.header-strip-right { display: flex; align-items: center; gap: 16px; }
.header-strip a { color: var(--muted-fg); text-decoration: none; }
.header-strip a:hover { color: var(--primary); }
.header-masthead {
  max-width: 72rem; margin: 0 auto; padding: 28px 16px;
  text-align: center; border-bottom: 1px solid var(--border);
}
.masthead-title {
  font-family: var(--font-heading); font-size: 2.6rem; color: var(--fg);
  letter-spacing: 0.02em; margin-bottom: 0;
}
.masthead-title:hover { color: var(--primary); }
.masthead-tagline {
  font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--muted-fg); margin-top: 8px;
}
.header-nav { border-bottom: 1px solid var(--border); }
.header-nav .container {
  max-width: 72rem; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-nav-links {
  display: flex; align-items: center; gap: 24px; list-style: none;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700;
  flex-wrap: wrap;
}
.header-nav-links a {
  display: block; padding: 14px 0; color: var(--fg); text-decoration: none;
}
.header-nav-links a:hover { color: var(--primary); }
.header-cart { font-size: 1.1rem; text-decoration: none; padding: 14px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  background: var(--muted);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-about { grid-column: span 1; }
.site-footer h4 {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 12px; color: var(--fg);
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--fg); font-size: 0.88rem; text-decoration: none; }
.site-footer li a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--muted-fg); letter-spacing: 0.04em;
}
.footer-bottom a { color: var(--muted-fg); text-decoration: none; }
.footer-bottom a:hover { color: var(--primary); }

/* Hero */
.hero {
  padding: 64px 0;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; max-width: 700px; margin: 0 auto 16px; }
.hero p { font-size: 1.1rem; color: var(--muted-fg); max-width: 600px; margin: 0 auto; }

/* Cards */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin: 32px 0;
}
.card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.card img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.1rem; margin: 0 0 8px; }
.card-body h3 a { color: var(--fg); }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { font-size: 0.88rem; color: var(--muted-fg); margin: 0; }
.card-meta {
  font-size: 0.78rem; color: var(--muted-fg);
  display: flex; gap: 12px; margin-top: 12px;
}

/* Tags */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 500;
  background: var(--secondary); color: var(--secondary-fg);
  margin: 2px 2px;
}

/* Article */
.article-header { padding: 48px 0 24px; text-align: center; }
.article-header h1 { font-size: 2.2rem; max-width: 700px; margin: 0 auto 12px; }
.article-meta { color: var(--muted-fg); font-size: 0.88rem; margin-bottom: 24px; }
.article-cover { max-width: 900px; margin: 0 auto 32px; }
.article-cover img { width: 100%; border-radius: var(--radius); }
.article-body { max-width: var(--max-w-narrow); margin: 0 auto; font-size: 1.15rem; }
.article-body h2 { margin-top: 40px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--fg); }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote {
  border-left: 3px solid var(--primary); padding: 12px 20px;
  margin: 20px 0; background: var(--muted); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--muted-fg);
}
.prose-article > p:first-child::first-letter {
  font-size: 4.5rem; float: left; line-height: 0.8; padding-right: 8px;
  color: var(--primary); font-family: var(--font-heading);
}

/* Product */
.product-header { display: flex; gap: 40px; align-items: start; padding: 48px 0; }
.product-image { flex: 0 0 300px; }
.product-image img { width: 100%; border-radius: var(--radius); }
.product-info h1 { font-size: 1.8rem; }
.product-price { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin: 12px 0; }
.product-body { max-width: var(--max-w-narrow); margin: 32px auto 0; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border: none;
  border-radius: var(--radius); font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { background: var(--secondary); color: var(--secondary-fg); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--fg); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-body);
  font-size: 0.95rem; color: var(--fg); background: white;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,106,79,0.1);
}

/* Section */
.section { padding: 48px 0; }
.section-title { font-size: 1.6rem; margin-bottom: 24px; }
.section-rule { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

/* Newsletter signup */
.newsletter-box {
  background: var(--secondary); border-radius: var(--radius);
  padding: 40px; text-align: center; margin: 48px 0;
}
.newsletter-box h2 { margin-bottom: 8px; }
.newsletter-box p { color: var(--muted-fg); margin-bottom: 20px; }
.newsletter-form { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1; }
.newsletter-form button { flex-shrink: 0; }

/* Author */
.author-card { display: flex; gap: 20px; align-items: start; margin-bottom: 32px; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.author-info h3 { margin: 0 0 4px; }
.author-info p { font-size: 0.88rem; color: var(--muted-fg); margin: 0; }

/* Testimonials */
.testimonial {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.testimonial p { font-style: italic; color: var(--muted-fg); margin-bottom: 12px; }
.testimonial cite { font-size: 0.85rem; font-weight: 600; font-style: normal; }

/* Cart */
.cart-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.cart-total { font-size: 1.3rem; font-weight: 700; text-align: right; padding: 20px 0; }

/* Compliance pages */
.compliance-body { max-width: var(--max-w-narrow); margin: 0 auto; padding: 48px 20px; }
.compliance-body h1 { margin-bottom: 8px; }
.compliance-body .updated { font-size: 0.85rem; color: var(--muted-fg); margin-bottom: 32px; }
.compliance-body h2 { font-size: 1.15rem; margin-top: 32px; margin-bottom: 10px; }
.compliance-body p { font-size: 0.95rem; color: var(--muted-fg); }
.compliance-body ul { padding-left: 24px; margin-bottom: 16px; }
.compliance-body li { font-size: 0.95rem; color: var(--muted-fg); margin-bottom: 8px; }

/* Alert boxes */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.88rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin: 32px 0; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 0.88rem; border: 1px solid var(--border);
}
.pagination .active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

/* Responsive — Tablet */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .product-header { flex-direction: column; gap: 24px; }
  .product-image { flex: none; width: 100%; }
  .masthead-title { font-size: 1.8rem; }
  .header-masthead { padding: 16px; }
  .header-nav-links { gap: 12px; font-size: 0.65rem; }
  .header-strip { display: none; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .section { padding: 32px 0; }
  .section-rule { margin: 32px 0; }
  .newsletter-form { flex-direction: column; }
  .newsletter-box { padding: 28px 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .article-header { padding: 32px 0 16px; }
  .article-header h1 { font-size: 1.5rem; }
  .article-body { font-size: 0.95rem; }
  .compliance-body { padding: 32px 16px; }
  .author-card { flex-direction: column; align-items: center; text-align: center; }
  .cart-item { flex-wrap: wrap; }
  /* Featured article on home — stack vertically */
  .hero + .section > .container > div { flex-direction: column !important; }
  .hero + .section > .container > div > div:first-child { flex: none !important; height: 220px; }
}

/* Responsive — Mobile */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .masthead-title { font-size: 1.5rem; }
  .header-nav-links { gap: 8px; font-size: 0.6rem; letter-spacing: 0.12em; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding: 28px 0; }
  .hero h1 { font-size: 1.4rem; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
  .card img { height: 180px; }
  .card-body { padding: 14px; }
  .card-body h3 { font-size: 1rem; }
  .product-price { font-size: 1.2rem; }
  .btn { padding: 10px 18px; font-size: 0.85rem; }
  .form-group input, .form-group textarea, .form-group select { padding: 10px 12px; font-size: 0.9rem; }
  .article-header h1 { font-size: 1.3rem; }
  .article-meta { font-size: 0.8rem; }
  .tag { font-size: 0.68rem; padding: 2px 8px; }
  .pagination a, .pagination span { padding: 6px 10px; font-size: 0.8rem; }
  .testimonial { padding: 16px; }
  .newsletter-box { padding: 20px 14px; margin: 32px 0; }
  .newsletter-box h2 { font-size: 1.2rem; }
  .section-title { font-size: 1.3rem; }
  .site-footer { margin-top: 40px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Lead Modal */
.lead-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: leadFadeIn 180ms ease-out;
}
.lead-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
}
.lead-modal {
  position: relative; width: 100%; max-width: 36rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  overflow: hidden; max-height: 92vh; display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.lead-close, .lead-back {
  position: absolute; top: 12px; z-index: 10;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none; background: transparent;
  color: var(--muted-fg); font-size: 1.25rem; cursor: pointer; line-height: 1;
}
.lead-close:hover, .lead-back:hover { color: var(--fg); background: var(--muted); }
.lead-close { right: 12px; }
.lead-back { left: 12px; }
.lead-body { padding: 48px 28px 32px; overflow-y: auto; text-align: center; }
.lead-eyebrow {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-fg); margin-bottom: 12px;
}
.lead-title {
  font-family: var(--font-heading); font-size: 1.5rem;
  color: var(--fg); line-height: 1.3; margin-bottom: 8px;
}
.lead-desc {
  font-size: 0.88rem; color: var(--muted-fg); line-height: 1.6;
  max-width: 28rem; margin: 0 auto 24px;
}
.lead-btn-primary {
  display: inline-block; background: var(--primary); color: var(--primary-fg);
  padding: 12px 24px; border-radius: 2px; font-size: 0.88rem;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  border: none; cursor: pointer; text-decoration: none;
}
.lead-btn-primary:hover { opacity: 0.9; }
.lead-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.lead-btn-skip {
  display: block; margin: 20px auto 0; font-size: 0.75rem;
  color: var(--muted-fg); background: none; border: none; cursor: pointer;
  text-decoration: none;
}
.lead-btn-skip:hover { color: var(--fg); text-decoration: underline; }

/* Quiz progress dots */
.lead-progress { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.lead-dot {
  height: 6px; border-radius: 3px; transition: all 300ms;
}
.lead-dot--done { width: 24px; background: var(--primary); opacity: 0.6; }
.lead-dot--active { width: 40px; background: var(--primary); }
.lead-dot--pending { width: 24px; background: var(--border); }

/* Quiz options */
.lead-options { display: flex; flex-direction: column; gap: 8px; max-width: 28rem; margin: 0 auto; }
.lead-option {
  text-align: left; padding: 12px 16px; border-radius: 2px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); font-size: 0.88rem; cursor: pointer;
}
.lead-option:hover { border-color: var(--fg); background: var(--muted); }
.lead-option--selected { border-color: var(--primary); background: rgba(29,106,79,0.1); }

/* Capture form */
.lead-form { display: flex; flex-direction: column; gap: 12px; max-width: 28rem; margin: 0 auto; text-align: left; }
.lead-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-label { font-size: 0.75rem; font-weight: 500; color: var(--fg); margin-bottom: 4px; display: block; }
.lead-label-hint { font-weight: 400; color: var(--muted-fg); }
.lead-input {
  width: 100%; border: 1px solid var(--border); border-radius: 2px;
  padding: 8px 12px; font-size: 0.88rem; background: var(--bg); color: var(--fg);
  box-sizing: border-box;
}
.lead-input:focus { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.lead-sms-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.68rem; line-height: 1.4; color: var(--muted-fg); cursor: pointer; margin-top: 4px;
}
.lead-sms-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.lead-error { font-size: 0.75rem; color: #dc2626; margin-top: 4px; }
.lead-legal { font-size: 0.62rem; line-height: 1.4; color: var(--muted-fg); text-align: center; margin-top: 4px; }
.lead-legal a { color: var(--muted-fg); text-decoration: underline; }
.lead-legal a:hover { color: var(--fg); }

/* Result matches */
.lead-matches { display: flex; flex-direction: column; gap: 12px; max-width: 28rem; margin: 0 auto; }
.lead-match {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 2px; text-decoration: none; color: var(--fg);
}
.lead-match:hover { border-color: var(--fg); background: rgba(0,0,0,0.02); }
.lead-match img { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; background: var(--muted); flex-shrink: 0; }
.lead-match-info { flex: 1; min-width: 0; }
.lead-match-title { font-weight: 700; font-size: 0.88rem; line-height: 1.3; }
.lead-match-reason { font-size: 0.68rem; color: var(--muted-fg); margin-top: 4px; line-height: 1.3; }
.lead-match-price { font-size: 0.75rem; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }

@keyframes leadFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 480px) {
  .lead-overlay { padding: 0; align-items: flex-end; }
  .lead-modal { border-radius: 6px 6px 0 0; max-height: 95vh; }
  .lead-body { padding: 48px 20px 24px; }
  .lead-title { font-size: 1.25rem; }
  .lead-form-row { grid-template-columns: 1fr; }
}
