/* Palatte web design system — shared by the marketing site and public share pages.
   Tokens mirror constants/DesignTokens.ts and constants/Spacing.ts in the app repo. */

:root {
  --primary: #4F7942;
  --ramp-2: #78A068;
  --ramp-3: #A3C496;
  --ramp-4: #CBDFC1;
  --ring-gray: #DADCE0;
  --primary-tint: rgba(79, 121, 66, 0.1);
  --primary-tint-strong: rgba(79, 121, 66, 0.18);
  --title: #23361D;
  --text: #202124;
  --text-secondary: #5F6368;
  --text-muted: #9AA0A6;
  --page: #FCFCFC;
  --surface: #FFFFFF;
  --border: #E8EAED;
  --breakfast: #D97706;
  --dinner: #5B21B6;
  --dessert: #BE185D;
  --ai: #6D28D9;
  --ai-purple-light: #7C3AED;
  --ai-tint: rgba(124, 58, 237, 0.08);
  --ai-border: rgba(124, 58, 237, 0.35);
  --meal-dinner: #5B21B6;
  --meal-dinner-tint: rgba(91, 33, 182, 0.15);
  --produce: #558B2F;
  --produce-bg: #E8F5E9;
  --light-grey: #F1F3F4;
  --phone-frame: #1c1c1e;

  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 20px;
  --s-section: 24px;
  --s-xxxl: 32px;
  --s-huge: 40px;
  --s-hero: 48px;
  --card-radius: 16px;
  --button-radius: 16px;
  --chip-radius: 12px;
  --modal-radius: 20px;
  --pill: 999px;

  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 16px 40px rgba(35, 54, 29, 0.12);

  --max-w: 1120px;
  --max-w-narrow: 640px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img, svg {
  display: block;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-lg);
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 var(--s-xxxl);
  }
}

.wrap--narrow {
  max-width: var(--max-w-narrow);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 252, 252, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.nav.scrolled,
.nav--surface {
  border-bottom-color: var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--s-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  text-decoration: none;
}

.brand svg {
  width: 36px;
  height: 36px;
}

.wordmark {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-section);
}

.nav-links a.text-link {
  display: none;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
}

.nav-links a.text-link:hover {
  color: var(--primary);
}

@media (min-width: 720px) {
  .nav-links a.text-link {
    display: inline;
  }
}

/* ---------- Buttons (components/Button.tsx) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 48px;
  padding: var(--s-sm) var(--s-xl);
  border-radius: var(--button-radius);
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary-tint-strong);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(79, 121, 66, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-tint);
}

.btn-large {
  min-height: 56px;
  padding: var(--s-md) var(--s-section);
  font-size: 17px;
}

.btn-small {
  min-height: 40px;
  padding: var(--s-xs) var(--s-lg);
  font-size: 15px;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn + .btn {
  margin-top: var(--s-md);
}

/* Outbound link — leaves Palatte; not brand green */
.btn-outbound {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  font-weight: 600;
}

.btn-outbound svg {
  flex-shrink: 0;
  opacity: 0.55;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: var(--s-section);
  margin: var(--s-section) 0;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  margin: 0 0 var(--s-md);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--title);
}

.card ul,
.card ol {
  margin: 0;
  padding-left: 20px;
}

.card li {
  margin-bottom: var(--s-sm);
}

.card li:last-child {
  margin-bottom: 0;
}

.card.cta {
  text-align: center;
  padding: 28px var(--s-section);
}

.card.cta h2 {
  font-size: 1.2rem;
  margin-bottom: var(--s-sm);
}

.card.cta p {
  margin: 0 0 var(--s-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 26px;
  color: var(--text-secondary);
}

.ingredient-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
  justify-content: center;
  margin: 0 0 var(--s-lg);
}

.ingredient-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  min-height: 32px;
  padding: var(--s-xs) var(--s-md);
  border-radius: var(--chip-radius);
  border: 1px solid var(--border);
  background: var(--page);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Footer ---------- */
footer.site-footer {
  padding: var(--s-xxxl) 0 var(--s-huge);
}

footer.site-footer--compact {
  padding: var(--s-section) 0 var(--s-xxxl);
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-lg);
  align-items: center;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: var(--s-xxxl);
}

@media (min-width: 720px) {
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-row .brand svg {
  width: 28px;
  height: 28px;
}

.footer-row .wordmark {
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-section);
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright,
.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
}
