/* ═══════════════════════════════════════════════════════════════
   NOURIISH — SHARED DESIGN SYSTEM
   All pages import this file. Never duplicate these rules.
════════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --forest:   #1A5C42;
  --forest-d: #134433;
  --forest-l: #E4EDE8;
  --cream:    #FAF7F2;
  --gold:     #C9922B;
  --gold-l:   #FDF3E0;
  --ink:      #141414;
  --muted:    #5A5A5A;
  --faint:    #767676;
  --border:   #E2DDD7;
  --white:    #FFFFFF;
  --r1:#1A5C42; --r1-l:#E4EDE8; --r1-b:#9FCEBB;
  --r2:#7B3FA0; --r2-l:#F2EAF9; --r2-b:#C9A0E0;
  --r3:#C9922B; --r3-l:#FDF3E0; --r3-b:#F0C97A;
  --r4:#C0392B; --r4-l:#FDECEA; --r4-b:#F0A89F;
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;
  --gap-xl: 96px; --gap-lg: 72px; --gap-md: 56px; --gap-sm: 36px;
  --radius: 12px; --radius-sm: 8px; --radius-xs: 6px;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   380ms;
  --nav-h: 64px;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body { font-family: var(--ff-body); background: var(--cream); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; font-feature-settings: 'kern' 1, 'liga' 1; min-height: 100vh; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--ff-body); cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2.5px solid var(--forest); outline-offset: 3px; border-radius: var(--radius-xs); }
:focus:not(:focus-visible) { outline: none; }

/* ── SCROLL REVEAL ───────────────────────────────────────────── */
.sr { opacity: 0; transform: translateY(24px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.sr.in { opacity: 1; transform: translateY(0); }
.sr-d1 { transition-delay: 0.08s; }
.sr-d2 { transition-delay: 0.16s; }
.sr-d3 { transition-delay: 0.24s; }
.sr-d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) { .sr { opacity: 1; transform: none; transition: none; } }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.container       { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container--sm   { max-width: 720px;  margin: 0 auto; padding: 0 24px; }
.container--xs   { max-width: 560px;  margin: 0 auto; padding: 0 24px; }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--forest); margin-bottom: 14px; }
.h1 { font-family: var(--ff-display); font-size: clamp(38px, 6vw, 72px); font-weight: 300; line-height: 1.06; letter-spacing: -1.5px; color: var(--ink); }
.h2 { font-family: var(--ff-display); font-size: clamp(28px, 4vw, 48px); font-weight: 300; line-height: 1.14; letter-spacing: -0.8px; color: var(--ink); }
.h3 { font-family: var(--ff-display); font-size: clamp(20px, 2.5vw, 28px); font-weight: 400; line-height: 1.25; color: var(--ink); }
.h1 em, .h2 em, .h3 em { font-style: italic; color: var(--forest); }
.lead { font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); line-height: 1.72; max-width: 520px; }
.body-text { font-size: 15px; color: var(--muted); line-height: 1.72; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; font-weight: 600; letter-spacing: 0.01em; border-radius: 100px;
  transition: background var(--dur-base) var(--ease), transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease), opacity var(--dur-base);
  cursor: pointer; border: none; font-family: var(--ff-body); text-decoration: none;
}
.btn:active { transform: translateY(0) !important; }
.btn-lg  { font-size: 15px; padding: 14px 30px; }
.btn-md  { font-size: 14px; padding: 11px 24px; }
.btn-sm  { font-size: 12px; padding: 8px 16px; }
.btn-gold   { background: var(--gold);   color: var(--white); box-shadow: 0 2px 12px rgba(201,146,43,0.28); }
.btn-gold:hover   { background: #B8821F; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,146,43,0.38); }
.btn-forest { background: var(--forest); color: var(--white); box-shadow: 0 2px 12px rgba(26,92,66,0.2); }
.btn-forest:hover { background: var(--forest-d); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,92,66,0.3); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost  { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200; height: var(--nav-h);
  background: rgba(250,247,242,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-slow) var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(20,20,20,0.06); }
.nav__inner { max-width: 1080px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__brand { font-family: var(--ff-display); font-size: 22px; font-weight: 400; color: var(--forest); letter-spacing: -0.3px; flex-shrink: 0; transition: opacity var(--dur-fast); }
.nav__brand:hover { opacity: 0.72; }
.nav__brand em { font-style: italic; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.nav__link:hover { color: var(--ink); background: rgba(26,92,66,0.06); }
.nav__link.active { color: var(--forest); font-weight: 600; background: var(--forest-l); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__signin { font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: var(--radius-sm); transition: color var(--dur-fast), background var(--dur-fast); }
.nav__signin:hover { color: var(--ink); background: rgba(26,92,66,0.06); }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.nav__hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transform-origin: center; transition: transform var(--dur-base) var(--ease), opacity var(--dur-base); }
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; inset: var(--nav-h) 0 0 0; background: var(--cream); z-index: 199; flex-direction: column; padding: 28px 24px; gap: 2px; overflow-y: auto; }
.mobile-menu.open { display: flex; }
.mobile-menu__link { font-size: 18px; font-weight: 500; color: var(--ink); padding: 14px 12px; border-radius: var(--radius-sm); transition: color var(--dur-fast), background var(--dur-fast), padding-left var(--dur-base) var(--ease); }
.mobile-menu__link:hover { color: var(--forest); background: var(--forest-l); padding-left: 20px; }
.mobile-menu__link.active { color: var(--forest); font-weight: 600; }
.mobile-menu__divider { height: 1px; background: var(--border); margin: 12px 0; }
.mobile-menu__actions { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
@media (max-width: 760px) { .nav__links { display: none; } .nav__actions .btn { display: none; } .nav__hamburger { display: flex; } }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer { background: var(--ink); padding: 56px 24px 32px; }
.footer__top { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer__brand { font-family: var(--ff-display); font-size: 22px; font-weight: 400; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.footer__brand em { font-style: italic; }
.footer__tagline { font-size: 13px; color: rgba(255,255,255,0.3); line-height: 1.6; max-width: 210px; }
.footer__col-title { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 16px; }
.footer__col-links { display: flex; flex-direction: column; gap: 10px; }
.footer__col-link { font-size: 13px; color: rgba(255,255,255,0.4); transition: color var(--dur-fast), padding-left var(--dur-base) var(--ease); }
.footer__col-link:hover { color: rgba(255,255,255,0.8); padding-left: 4px; }
.footer__bottom { max-width: 1080px; margin: 28px auto 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer__copy { font-size: 12px; color: rgba(255,255,255,0.2); }
.footer__disclaimer { font-size: 11px; color: rgba(255,255,255,0.14); max-width: 440px; text-align: right; line-height: 1.5; }
@media (max-width: 768px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__bottom { flex-direction: column; text-align: center; } .footer__disclaimer { text-align: center; } }
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; } }

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.field-input {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-family: var(--ff-body); font-size: 14px; color: var(--ink); outline: none;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.field-input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(26,92,66,0.1); }
.field-input.error { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,0.08); }
.field-input::placeholder { color: #B0ABA6; }
.field-error { font-size: 11.5px; color: #C0392B; display: none; }
.field-error.show { display: block; }

/* ── SECTION SPACING UTILITY ─────────────────────────────────── */
.section { padding: var(--gap-xl) 24px; }
.section--white { background: var(--white); }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); }
.section--forest { background: var(--forest); }
@media (max-width: 768px) { .section { padding: var(--gap-lg) 24px; } }
@media (max-width: 480px) { .section { padding: var(--gap-md) 20px; } }

/* ── CARD ────────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card--cream { background: var(--cream); }
.card--hover { transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), border-color var(--dur-base); }
.card--hover:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); transform: translateY(-3px); border-color: rgba(26,92,66,0.18); }

/* ── BADGE / PILL ────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 100px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; }
.pill--forest { background: var(--forest-l); color: var(--forest); border: 1px solid var(--r1-b); }
.pill--gold   { background: var(--gold-l);   color: var(--gold);   border: 1px solid #EDD9A0; }
.pill--glass  { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.2); }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }
.divider--dark { background: rgba(255,255,255,0.08); }

/* ── KEYFRAMES ───────────────────────────────────────────────── */
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes scaleIn  { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
@keyframes ticker   { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Loading spinner */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--white); animation: spin 0.7s linear infinite; display: none; }
.btn.loading .btn-label { display: none; }
.btn.loading .spinner   { display: block; }

/* ── QUIZ SHARED ─────────────────────────────────────────────── */
.quiz-shell { background: var(--white); border-radius: 16px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.quiz-header { background: var(--forest); padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.quiz-header__title { font-family: var(--ff-display); font-size: 17px; font-weight: 400; font-style: italic; color: var(--white); }
.quiz-progress-wrap { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.quiz-progress-bar  { width: 110px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.45s var(--ease); }
.quiz-step-label    { font-size: 12px; color: rgba(255,255,255,0.45); white-space: nowrap; }
.quiz-screen { display: none; }
.quiz-screen.active { display: block; animation: fadeUp 0.35s var(--ease) both; }
.quiz-welcome { padding: 48px 36px; text-align: center; }
.quiz-q-pane  { padding: 36px 36px 24px; }
.quiz-options { display: flex; flex-direction: column; gap: 9px; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 13px; padding: 14px 16px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--cream); cursor: pointer; text-align: left; width: 100%;
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
}
.quiz-option:hover   { border-color: rgba(26,92,66,0.5); background: var(--forest-l); transform: translateX(3px); }
.quiz-option.selected{ border-color: var(--forest); background: var(--forest-l); }
.quiz-option__letter {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0; background: var(--white);
  border: 1.5px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
  transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
.quiz-option.selected .quiz-option__letter { background: var(--forest); border-color: var(--forest); color: var(--white); }
.quiz-option__text { font-size: 14.5px; color: var(--ink); line-height: 1.42; }
.quiz-option__sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 36px; border-top: 1px solid var(--border); }
.btn-quiz-back { color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 0; transition: color var(--dur-fast); cursor: pointer; }
.btn-quiz-back:hover { color: var(--ink); }
.btn-quiz-next { background: var(--forest); color: var(--white); padding: 11px 26px; border-radius: 100px; font-size: 14px; font-weight: 600; transition: background var(--dur-base), opacity var(--dur-base), transform var(--dur-base) var(--ease); opacity: 0.35; pointer-events: none; cursor: default; }
.btn-quiz-next.enabled { opacity: 1; pointer-events: auto; cursor: pointer; }
.btn-quiz-next.enabled:hover { background: var(--forest-d); transform: translateY(-1px); }
@media (max-width: 600px) { .quiz-welcome, .quiz-q-pane, .quiz-email-pane, .result-header, .result-body { padding-left: 20px; padding-right: 20px; } .quiz-nav { padding: 16px 20px; } .quiz-header { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px; } }
