/* =============================================
   NourishHer — Meal Plans Stylesheet
   Warm editorial aesthetic for women 50+
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,300;1,9..144,400&family=Instrument+Sans:wght@400;500;600&display=swap');
@import url('./tokens.css');

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: -0.03em;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(192, 99, 58, 0.1);
  border: 1px solid rgba(192, 99, 58, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-eyebrow svg { width: 14px; height: 14px; }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--charcoal);
  max-width: 720px;
  margin: 0 auto 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 12px;
  line-height: 1.7;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--sage);
  font-weight: 500;
  margin-top: 8px;
}

.hero-badge svg { width: 14px; height: 14px; }

/* =============================================
   EMAIL CAPTURE CTA
   ============================================= */
.cta-section {
  background: linear-gradient(135deg, var(--charcoal) 0%, #3a2f28 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(192, 99, 58, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.cta-text {
  flex: 1;
}

.cta-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-bottom: 12px;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.25;
  margin: 0 0 12px;
}

.cta-sub {
  font-size: 0.9rem;
  color: rgba(249, 243, 234, 0.65);
  line-height: 1.6;
  margin: 0 0 20px;
  max-width: 400px;
}

.cta-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(249, 243, 234, 0.7);
}

.cta-badge svg { width: 13px; height: 13px; color: var(--sage-light); }

.cta-form-wrapper {
  flex: 0 0 380px;
}

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

.cta-form-row {
  display: flex;
  gap: 10px;
}

.cta-input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid rgba(249, 243, 234, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cta-input::placeholder { color: var(--muted); }

.cta-input:focus {
  border-color: var(--sage-light);
  box-shadow: 0 0 0 3px rgba(107, 124, 94, 0.2);
}

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(192, 99, 58, 0.4);
}

.btn-cta:hover {
  background: var(--terracotta-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(192, 99, 58, 0.5);
}

.btn-cta:active { transform: translateY(0); }

.cta-footnote {
  font-size: 0.78rem;
  color: rgba(249, 243, 234, 0.5);
  text-align: center;
  margin: 0;
}

.cta-footnote strong { color: rgba(249, 243, 234, 0.8); }

/* =============================================
   PLAN CARDS
   ============================================= */
.plans-section {
  padding: 20px 0 100px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sage-light);
}

.plan-card.featured {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(192, 99, 58, 0.08), var(--shadow-md);
}

.plan-card.featured:hover {
  box-shadow: 0 0 0 4px rgba(192, 99, 58, 0.12), var(--shadow-lg);
}

.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terracotta);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.plan-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  min-height: 42px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.plan-price .dollar {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--charcoal);
}

.plan-price .amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}

.plan-price .per-mo {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.plan-macros {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.macro-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
}

.macro-chip svg { width: 12px; height: 12px; }

.plan-features {
  flex: 1;
  list-style: none;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--charcoal);
  line-height: 1.45;
}

.plan-features li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--sage);
}

.plan-features li.feature-plus {
  color: var(--sage);
  font-weight: 500;
}

.plan-features li.feature-plus svg { color: var(--sage-light); }

/* --- CTA Button --- */
.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-plan::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-plan:hover::after { opacity: 1; }
.btn-plan:hover { transform: translateY(-1px); }
.btn-plan:active { transform: translateY(0); }

.btn-terracotta {
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.btn-terracotta:hover {
  background: var(--terracotta-light);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: var(--sage-light);
}

.btn-outline.selected {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
  box-shadow: 0 4px 16px rgba(107, 124, 94, 0.35);
}

/* =============================================
   CHECKOUT FORM (inline on each card)
   ============================================= */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-form .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checkout-form .form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--charcoal);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.checkout-form .form-input:focus {
  border-color: var(--sage-light);
  box-shadow: 0 0 0 3px rgba(107, 124, 94, 0.15);
}

.checkout-form .form-input::placeholder { color: var(--muted); }

/* =============================================
   SYMPTOM BAR
   ============================================= */
.symptom-bar {
  background: var(--charcoal);
  color: var(--cream);
  padding: 48px 0;
  margin-top: 20px;
}

.symptom-bar h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 32px;
}

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

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

.symptom-icon {
  width: 40px;
  height: 40px;
  background: rgba(192, 99, 58, 0.2);
  border: 1px solid rgba(192, 99, 58, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symptom-icon svg { width: 20px; height: 20px; color: var(--terracotta-light); }

.symptom-item h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
}

.symptom-item p {
  font-size: 0.875rem;
  color: rgba(249, 243, 234, 0.6);
  line-height: 1.6;
}

/* =============================================
   ERROR MESSAGE
   ============================================= */
.alert-error {
  background: rgba(192, 99, 58, 0.08);
  border: 1px solid rgba(192, 99, 58, 0.25);
  color: var(--terracotta);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 28px;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 860px) {
  .cta-section { padding: 32px 24px; }
  .cta-inner { flex-direction: column; gap: 28px; }
  .cta-form-wrapper { flex: none; width: 100%; }
  .cta-form-row { flex-direction: column; }
  .cta-sub { max-width: 100%; }
}
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .plan-card.featured {
    order: -1;
  }

  .symptom-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding: 56px 0 48px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .plan-card { padding: 24px 20px; }
}