/* Nest & Nourish — marketing/legal site styles
   Self-contained, no external fonts or CDNs. Palette pulled from lib/theme.ts
   (lightColors / darkColors) so the site matches the app exactly. */

:root {
  --background: #F5F2EC;
  --surface: #FFFFFF;
  --text: #2D2A26;
  --text-muted: #5C554C;
  --primary: #5E4B8B;
  --on-primary: #FFFFFF;
  --accent: #3F6B4F;
  --on-accent: #FFFFFF;
  --brown: #6B4E37;
  --border: #877E6C;
  --border-soft: #DAD4C6;
  --accent-surface: #E3ECE5;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --max-width: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1E1B17;
    --surface: #2A2620;
    --text: #F3EFE7;
    --text-muted: #B9AFA0;
    --primary: #B9A6E8;
    --on-primary: #241A3D;
    --accent: #8FCE9E;
    --on-accent: #122A17;
    --brown: #B08B6C;
    --border: #8A8072;
    --border-soft: #3A342C;
    --accent-surface: #1E2F22;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.site-nav a:hover {
  text-decoration: underline;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero (index) --- */

.hero {
  text-align: center;
  padding: 56px 0 40px;
}

.hero img.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  margin: 0 0 12px;
  color: var(--primary);
}

.tagline {
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 8px;
  font-style: italic;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 16px auto 0;
}

/* --- Feature grid --- */

.features {
  padding: 24px 0 8px;
}

.features h2,
.store-section h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  text-align: center;
  margin: 0 0 32px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
}

.feature-card img.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* --- Store badges --- */

.store-section {
  text-align: center;
  padding: 8px 0 56px;
}

.store-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 600;
  min-width: 200px;
  justify-content: center;
}

.store-badge:hover {
  opacity: 0.9;
}

.store-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Legal / support content pages --- */

.page-header {
  padding: 48px 0 8px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  color: var(--primary);
  margin: 0 0 8px;
}

.page-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 40px;
}

.content {
  padding-bottom: 64px;
}

.content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text);
  margin: 36px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}

.content h2:first-child {
  margin-top: 0;
}

.content p {
  margin: 0 0 14px;
}

.content ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.content li {
  margin-bottom: 8px;
}

.content strong {
  color: var(--text);
}

.callout {
  background: var(--accent-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 0 0 24px;
}

.callout p {
  margin: 0 0 8px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* --- FAQ (support) --- */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.faq-item h2 {
  border: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: 18px;
}

.faq-item p,
.faq-item ul {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
