/* ===========================================================
   Balance Nutrition — static site styles
   =========================================================== */
:root {
  --background: #faf8f4;
  --foreground: #24291f;
  --card: #ffffff;
  --primary: #4c5d3c;
  --primary-foreground: #faf8f4;
  --secondary: #eef0e6;
  --muted-foreground: #5b6152;
  --accent: #b3653a;
  --accent-foreground: #faf8f4;
  --border: #e2ddd0;
  --radius: 0.75rem;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0 0 var(--radius) 0;
}

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

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap-narrow {
  max-width: 48rem;
}

.wrap-medium {
  max-width: 64rem;
}

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  border-color: var(--border);
  color: var(--foreground);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
}

.logo svg {
  color: var(--primary);
}

.logo span {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  border-radius: 0.375rem;
}

.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--foreground);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.primary-nav {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  padding: 1.5rem;
}

.primary-nav.open {
  display: flex;
}

.primary-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(36, 41, 31, 0.8);
  transition: color 0.2s;
}

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

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .primary-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    border: none;
    background: transparent;
    padding: 0;
    width: auto;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--secondary);
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
}

.section-head {
  max-width: 42rem;
}

.section-head p {
  margin-top: 0.75rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

h2 {
  font-size: 1.875rem;
  font-weight: 600;
  text-wrap: balance;
}

@media (min-width: 768px) {
  h2 {
    font-size: 1.875rem;
  }
}

/* Hero */
.hero-grid {
  display: grid;
  gap: 2.5rem;
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 6rem 0;
  }
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0;
}

#hero-title {
  margin-top: 1rem;
  font-size: 2.25rem;
  font-weight: 600;
  text-wrap: balance;
}

@media (min-width: 640px) {
  #hero-title {
    font-size: 3rem;
  }
}

.lede {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.lede-sm {
  margin-top: 0.75rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.fine-print {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.fine-print.italic {
  font-style: italic;
  font-size: 0.875rem;
  margin-top: 1.5rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--secondary);
  margin: 0;
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prose */
.prose {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.note {
  margin-top: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--secondary);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.note strong {
  font-weight: 600;
}

/* Card grid */
.card-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.food-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.food-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.food-card .examples {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.food-card .body {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* Two column lists */
.two-col {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.list-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.list-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.dot-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.dot-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.dot-list li::before {
  content: "";
  margin-top: 0.4rem;
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
}

.dot-accent li::before {
  background: var(--accent);
}

.wide-figure {
  margin: 2.5rem 0 0;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--secondary);
}

.wide-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Principles */
.principle-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .principle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .principle-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.principle-item {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.principle-number {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 600;
  color: rgba(76, 93, 60, 0.4);
}

.principle-item h3 {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.principle-item p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* Labels */
.labels-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .labels-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }
}

.label-points {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.label-points strong {
  color: var(--foreground);
  font-weight: 600;
}

.label-mock {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.label-mock-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.label-mock-bar {
  margin-top: 1rem;
  height: 0.375rem;
  width: 100%;
  border-radius: 9999px;
  background: var(--foreground);
}

.label-mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.label-mock-row-strong {
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Sources */
.sources-card {
  margin-top: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.sources-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.sources-card > p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.sources-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.sources-list a {
  color: var(--primary);
  text-decoration: underline;
}

.sources-list a:hover {
  opacity: 0.8;
}

/* Course */
.course-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .course-figure {
    order: 2;
  }
  .course-text {
    order: 1;
  }
}

.course-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--secondary);
  margin: 0;
}

.course-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#course-title {
  margin-top: 1rem;
  font-size: 1.875rem;
  font-weight: 600;
  text-wrap: balance;
}

@media (min-width: 640px) {
  #course-title {
    font-size: 2.25rem;
  }
}

.section-course ul {
  margin-top: 1.5rem;
}

/* Pricing */
.pricing-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}

.plan-card.featured {
  border-color: var(--primary);
}

.plan-card.selected {
  box-shadow: 0 0 0 2px var(--primary);
}

.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.plan-period {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.plan-price {
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 600;
}

.plan-description {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.plan-select {
  margin-top: 1.5rem;
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}

.plan-select:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.plan-select.is-selected {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-foreground);
}

.plan-select.is-selected:hover {
  opacity: 0.9;
}

.pricing-form-wrap {
  margin-top: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--secondary);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .pricing-form-wrap {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.pricing-form-wrap label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-form-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .pricing-form-row {
    flex-direction: row;
  }
}

.pricing-form-row input {
  width: 100%;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
}

.pricing-form-row input:focus {
  border-color: var(--primary);
}

.pricing-form-row button {
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--secondary);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-brand {
  max-width: 24rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.footer-copy {
  max-width: 72rem;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem 3rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 50;
  margin: 0 auto;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(36, 41, 31, 0.12);
}

@media (min-width: 640px) {
  .cookie-consent {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-consent p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.cookie-consent a {
  text-decoration: underline;
}

.cookie-consent a:hover {
  color: var(--primary);
}

.cookie-consent button {
  flex-shrink: 0;
}

/* Legal pages */
.legal-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.legal-back {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: underline;
}

.legal-back:hover {
  color: var(--primary);
}

.legal-main h1 {
  margin-top: 1.5rem;
  font-size: 1.875rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .legal-main h1 {
    font-size: 2.25rem;
  }
}

.legal-updated {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.legal-body {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.legal-body h2 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.legal-body p {
  line-height: 1.6;
  color: var(--muted-foreground);
}

.legal-body a {
  color: var(--primary);
  text-decoration: underline;
}

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

.legal-header .wrap {
  padding: 1rem 1.5rem;
}
