/* ═══════════════════════════════════════════════════
   EMMA'S RECIPE CONVERTER — Design System
   Matched to Emma's Cake Studio brand:
   Caveat headings · Nunito Sans body · #D80D43 primary
════════════════════════════════════════════════════ */

/* Google Fonts: Caveat (display/headings), Nunito Sans (body), Nunito (UI) */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700;800&family=Nunito+Sans:wght@400;600;700&family=Nunito:wght@400;600;700&display=swap');

:root {
  /* Brand colours — matched to Emma's Cake Studio */
  --primary:        #D80D43;
  --primary-dark:   #B21549;
  --primary-light:  #FCE4EC;
  --primary-glow:   rgba(216, 13, 67, 0.18);

  --brown:          #6D4C41;
  --brown-mid:      #8D6E63;
  --brown-light:    #D4A574;
  --brown-xlight:   #F5EDE6;

  --cream:          #FFF7ED;
  --cream-dark:     #FDEBD0;
  --white:          #FFFFFF;

  --charcoal:       #363940;
  --text-secondary: #5C5F6B;
  --text-muted:     #818592;
  --border:         #ECECEC;
  --border-warm:    #E8D8C8;

  --teal:           #4DBDBA;
  --green:          #4A7C59;
  --green-light:    #E8F4EC;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(74, 63, 53, 0.08);
  --shadow-md:  0 6px 20px rgba(74, 63, 53, 0.12);
  --shadow-lg:  0 10px 30px rgba(74, 63, 53, 0.14);
  --shadow-xl:  0 20px 50px rgba(74, 63, 53, 0.16);

  /* Border radii — Emma's style is very rounded */
  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-pill: 50px;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Caveat', cursive;
  line-height: 1.15;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--r-pill);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-glow);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--cream-dark);
  color: var(--charcoal);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 247, 237, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-warm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brown);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--primary); }
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header-nav a:not(.btn) {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.header-nav a:not(.btn):hover { color: var(--primary); }
.btn-logout-link {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.btn-logout-link:hover { color: var(--primary); }

/* ── Hero ──────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 80px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(216, 13, 67, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(212, 165, 116, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
  border: 1px solid rgba(216, 13, 67, 0.2);
}
.hero-headline {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: var(--brown);
  margin-bottom: 20px;
  font-weight: 800;
}
.hero-subheadline {
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.75;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.hero-cta-note { font-size: 0.85rem; color: var(--text-muted); }
.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
}
.proof-avatars { display: flex; }
.avatar { font-size: 1.4rem; margin-right: -4px; }

/* ── Section helpers ───────────────────────────── */
.section-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
  text-align: center;
}
.section-title {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  color: var(--brown);
  margin-bottom: 12px;
  text-align: center;
  font-weight: 800;
}
.section-title.left { text-align: left; }
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.75;
}

/* ── Demo section ──────────────────────────────── */
.demo-section {
  padding: 80px 20px;
  background: var(--white);
}
.demo-card {
  background: var(--white);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 44px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}

/* Form base */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.form-group label .optional { font-weight: 400; color: var(--text-muted); }

textarea,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-md);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}
textarea:focus, input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--white);
}
textarea { resize: vertical; min-height: 130px; line-height: 1.65; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #fdecea;
  border-radius: var(--r-sm);
  border-left: 3px solid #c0392b;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Diet buttons ──────────────────────────────── */
.diet-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.diet-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
}
.diet-buttons-grid .diet-btn { min-width: 0; }

.diet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 12px;
  border: 2px solid var(--border-warm);
  border-radius: var(--r-pill);
  background: var(--cream);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}
.diet-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.diet-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.missing-btn-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.missing-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-pill);
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.missing-btn:hover {
  border-color: var(--brown-mid);
  color: var(--brown);
  background: var(--brown-xlight);
}
.missing-btn.selected {
  border-color: var(--brown-mid);
  background: var(--brown-xlight);
  color: var(--brown);
}

/* ── Missing ingredient chip selector ─────────── */
.ingredient-selector {
  background: var(--cream);
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.ingredient-selector-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ingredient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ingredient-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-pill);
  background: var(--white);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.ingredient-chip:hover {
  border-color: var(--brown-mid);
  color: var(--brown);
}
.ingredient-chip.selected {
  background: var(--brown);
  border-color: var(--brown);
  color: white;
}
.no-ingredients-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

.demo-limit-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Results ───────────────────────────────────── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.results-header h3 {
  font-size: 1.5rem;
  color: var(--brown);
}

.converted-card {
  background: var(--cream);
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 12px;
}
.converted-original {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 4px;
  font-family: 'Nunito Sans', sans-serif;
}
.converted-arrow { font-size: 1.2rem; color: var(--primary); margin: 5px 0; }
.converted-new {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.converted-details { display: flex; flex-direction: column; gap: 7px; }
.converted-ratio {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brown-mid);
  background: var(--white);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-warm);
  display: inline-block;
  width: fit-content;
  font-family: 'Nunito', sans-serif;
}
.converted-impact {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.result-combined-effect {
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--primary-light);
  border-radius: var(--r-lg);
  border: 1px solid rgba(216, 13, 67, 0.15);
}
.result-combined-effect h4 {
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.result-combined-effect p {
  font-size: 0.88rem;
  color: var(--charcoal);
  line-height: 1.6;
}

.result-technique {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--cream-dark);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-warm);
  font-size: 0.88rem;
  color: var(--charcoal);
  line-height: 1.6;
}
.result-technique strong {
  display: block;
  margin-bottom: 4px;
  font-family: 'Nunito', sans-serif;
  color: var(--brown);
}

.result-general {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--green-light);
  border-radius: var(--r-lg);
  border: 1px solid rgba(74, 124, 89, 0.2);
  font-size: 0.88rem;
  color: var(--charcoal);
  line-height: 1.6;
}
.result-general strong {
  display: block;
  margin-bottom: 4px;
  font-family: 'Nunito', sans-serif;
  color: var(--green);
}

.unchanged-section {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--green-light);
  border-radius: var(--r-md);
  border: 1px solid rgba(74, 124, 89, 0.2);
}
.unchanged-section h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}
.unchanged-section ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.unchanged-section ul li {
  background: white;
  font-size: 0.83rem;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(74, 124, 89, 0.2);
  color: var(--text-secondary);
  font-family: 'Nunito Sans', sans-serif;
}

/* Upgrade prompt */
.upgrade-prompt {
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--primary-light) 100%);
  border-radius: var(--r-xl);
  margin-top: 24px;
  border: 1px solid rgba(216, 13, 67, 0.12);
}
.upgrade-icon { font-size: 2.6rem; margin-bottom: 12px; }
.upgrade-prompt h3 { font-size: 1.6rem; margin-bottom: 8px; color: var(--brown); }
.upgrade-prompt p { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }

/* Demo used state */
.demo-used { text-align: center; padding: 44px 24px; }
.demo-used-icon { font-size: 3rem; margin-bottom: 16px; }
.demo-used h3 { font-size: 1.8rem; margin-bottom: 10px; color: var(--brown); }
.demo-used p { color: var(--text-secondary); margin-bottom: 24px; }

/* ── How it works ──────────────────────────────── */
.how-section { padding: 80px 20px; background: var(--cream); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 36px 24px 28px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon { font-size: 2.4rem; margin: 8px 0 16px; }
.step-card h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--brown); }
.step-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ── Features ──────────────────────────────────── */
.features-section { padding: 80px 20px; background: var(--white); }
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.features-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
  margin-top: 14px;
}
.features-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.features-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-check {
  width: 24px;
  height: 24px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.features-list li strong { display: block; margin-bottom: 2px; font-size: 0.95rem; font-family: 'Nunito', sans-serif; }
.features-list li p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.features-example .example-card {
  background: var(--cream);
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.example-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Pricing ───────────────────────────────────── */
.pricing-section { padding: 80px 20px; background: var(--cream); }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto 28px;
}
.pricing-card {
  background: var(--white);
  border: 2px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 38px 30px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(216, 13, 67, 0.08);
}
.pricing-card--featured:hover {
  box-shadow: 0 0 0 4px rgba(216, 13, 67, 0.12), var(--shadow-md);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 18px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.pricing-plan {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-amount {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  color: var(--charcoal);
  line-height: 1;
  font-weight: 800;
}
.price-period { font-size: 0.9rem; color: var(--text-muted); }
.pricing-trial {
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
.pricing-savings {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px;
}
.pricing-features {
  list-style: none;
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.pricing-features li { display: flex; gap: 8px; align-items: center; font-family: 'Nunito Sans', sans-serif; }
.pricing-guarantee {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'Nunito Sans', sans-serif;
}

/* ── FAQ ───────────────────────────────────────── */
.faq-section { padding: 80px 20px; background: var(--white); }
.faq-grid {
  max-width: 760px;
  margin: 0 auto;
  border: 1.5px solid var(--border-warm);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--border-warm); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 26px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background 0.15s;
}
.faq-question:hover { background: var(--cream); }
.faq-question[aria-expanded="true"] { color: var(--primary); background: var(--cream); }
.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-answer.open { max-height: 300px; padding-bottom: 20px; }
.faq-answer p { padding: 0 26px; font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75; }

/* ── Footer ────────────────────────────────────── */
.site-footer { background: var(--brown); color: rgba(255,255,255,0.8); padding: 56px 20px 24px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { color: white; margin-bottom: 10px; display: block; font-size: 1.6rem; }
.footer-brand .logo:hover { color: var(--brown-light); }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.55); max-width: 240px; }
.footer-links { display: flex; gap: 52px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-family: 'Nunito', sans-serif; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.footer-col a { font-size: 0.88rem; color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; font-size: 0.82rem; color: rgba(255,255,255,0.35); text-align: center; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: white; }

/* ── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(54, 57, 64, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 38px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.modal-close:hover { background: var(--cream); color: var(--charcoal); }
.modal-tab-bar { display: flex; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.modal-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.modal-tab:hover:not(.active) { color: var(--charcoal); }
.modal-form h2 { font-size: 1.6rem; margin-bottom: 20px; color: var(--brown); }
.modal-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.55;
  padding: 10px 14px;
  background: var(--cream-dark);
  border-radius: var(--r-md);
}
.modal-switch { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

/* ── App page ──────────────────────────────────── */
.app-header { background: var(--white); border-bottom: 1px solid var(--border-warm); padding: 0 20px; }
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.app-header-actions { display: flex; align-items: center; gap: 12px; }
.user-email-display { font-size: 0.85rem; color: var(--text-muted); font-family: 'Nunito Sans', sans-serif; }
.app-main { min-height: calc(100vh - 64px); background: var(--cream); padding: 44px 20px; }
.app-layout { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; width: 100%; }
.app-card {
  background: var(--white);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 38px;
  box-shadow: var(--shadow-sm);
}
.app-card-title {
  font-size: 1.6rem;
  color: var(--brown);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-warm);
}
.results-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-warm);
}

/* ── Success page ──────────────────────────────── */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 40px 20px;
}
.success-card {
  background: var(--white);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-xl);
  padding: 52px 44px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.success-icon { font-size: 3.5rem; margin-bottom: 20px; }
.success-card h1 { font-size: 2rem; margin-bottom: 12px; color: var(--brown); }
.success-card p { color: var(--text-secondary); margin-bottom: 28px; line-height: 1.65; }

/* ── Spinner ───────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .header-nav a:not(.btn) { display: none; }
  .hero { padding: 52px 20px 72px; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; gap: 40px; }
  .features-copy .section-title { text-align: center; }
  .section-label { text-align: center; }
  .features-intro { text-align: center; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { gap: 32px; }
  .demo-card { padding: 24px 20px; }
  .diet-buttons-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .app-card { padding: 20px 14px; border-radius: var(--r-md); }
  .app-main { padding: 16px 8px; }
  .results-actions { flex-direction: column; }
  .features-list { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .diet-buttons-grid { grid-template-columns: 1fr 1fr; }
  .diet-btn { font-size: 0.8rem; padding: 11px 8px; gap: 4px; }
  .pricing-grid { max-width: 100%; }
  .modal { padding: 28px 20px; }
  .footer-links { flex-direction: column; }
  .success-card { padding: 36px 20px; }
  .success-card h1 { font-size: 1.6rem; }
  .btn-lg { padding: 14px 20px; font-size: 0.95rem; white-space: normal; line-height: 1.3; }
  /* App page — near edge-to-edge on mobile */
  .app-main { padding: 16px 8px; }
  .app-layout { width: 100%; }
  .app-card { padding: 20px 16px; border-radius: var(--r-md); }
  .app-results-card { border-radius: var(--r-md) !important; }
}

/* ── Print ─────────────────────────────────────── */
@media print {
  .app-header, .app-card:first-child, .results-actions, .site-header { display: none; }
  body { background: white; }
  .converted-card { break-inside: avoid; }
}
