/* guide-nourish.css — Oneness Lifestyles Nourish guide (U-11).
   Frozen reference: captures/site/guide-nourish.html + captures/site/styles.css.
   Palette tokens and font match the frozen reference exactly. WCAG adjustments
   over the site CSS: every text size stays >= 18px, touch targets >= 44px,
   visible focus, reduced-motion honored. */

/* ---------- Brand palette (from owlifestylesfoundation.org) ---------- */
:root {
  --brand-blue: #283890;   /* deep blue — primary (theme-color) */
  --brand-green: #6dbc45;  /* vibrant lime green — accent CTA */
  --brand-sand: #c1a178;   /* warm sand — accent */
  --brand-teal: #25c4b8;   /* fun accent */
  --brand-pink: #ff4d8d;   /* fun accent */
  --bg: #f7faff;           /* page background */
  --surface: #ffffff;      /* cards / surfaces */
  --text: #141414;         /* body text */
  --text-2: #3f3f3f;       /* secondary text */
  --line: #dfe5f6;         /* soft blue-grey divider */

  /* WCAG-safe derivations (frozen tokens above are unchanged) */
  --brand-green-deep: #5fae3d;  /* green pill hover (from reference CSS) */
  --brand-green-text: #357a24;  /* link green, >= 4.5:1 on white/surface */
  --brand-sand-light: #e0cbaa;  /* footer link sand, >= 4.5:1 on brand blue */
}

/* ---------- Base / reset ---------- */
* {
  box-sizing: border-box;
}

html {
  font-size: 18px;   /* WCAG: root 18px so 1rem = 18px and no text falls below the floor */
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;   /* WCAG: base text >= 18px */
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Accessibility: visible focus + skip link ---------- */
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

.site-footer :focus-visible {
  outline-color: var(--brand-sand-light);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  display: inline-block;
  padding: 12px 20px;
  min-height: 44px;
  background-color: var(--brand-blue);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus-visible {
  left: 0;
  outline-offset: 0;
}

/* ---------- Layout container ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--surface);
  border-bottom: 4px solid var(--brand-sand);
}

.site-name {
  margin: 0.5em 0;
  color: var(--brand-blue);
  font-weight: bold;
  letter-spacing: 0.04em;
}

.site-name a {
  display: inline-block;
  padding: 8px 0;           /* touch target >= 44px tall */
  color: var(--brand-blue);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.page-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(37, 196, 184, 0.24), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 77, 141, 0.16), transparent 55%),
    linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
}

.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero image not present yet (images are not rebuilt for the app); the
   palette gradient stands in so the page is never broken. */
.page-hero.no-photo .page-hero-img {
  display: none;
}

/* ---------- Living hero (batch 26): the table glows warm ----------
   A soft golden light breathes over the table — the photo's warmth
   slowly brightens and warms, then gives back, like a candle or the
   late sun passing over the food (10s cycle). Content sits on its own
   z-layer above the motion; nothing moves but the photo. Motion runs
   only when the reader has not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .page-hero-img {
    transform-origin: 50% 55%;
    animation: table-glow 10s ease-in-out infinite;
  }

  @keyframes table-glow {
    0% {
      transform: scale(1.01);
      filter: sepia(0.06) saturate(1.02) brightness(0.99);
    }
    50% {
      transform: scale(1.045);
      filter: sepia(0.12) saturate(1.08) brightness(1.03);
    }
    100% {
      transform: scale(1.01);
      filter: sepia(0.06) saturate(1.02) brightness(0.99);
    }
  }
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.05), rgba(247, 250, 255, 0.35));
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.page-hero-heading {
  font-size: 2.4rem;
  margin: 0 0 8px;
  color: var(--brand-blue);        /* >= 4.5:1 on the light hero gradient */
}

.page-hero-kicker {
  font-size: 1.1rem;               /* >= 18px */
  margin: 0;
  color: var(--text-2);            /* >= 4.5:1 on the light hero gradient */
}

/* ---------- Sections ---------- */
.section {
  padding: 48px 0;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.section p {
  margin: 0 0 18px;
  color: var(--text-2);
}

/* ---------- Links ---------- */
a {
  color: var(--brand-green-text);  /* >= 4.5:1 on white/surface */
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Small print: the gentle medical note at the foot of the page. */
.site-footer p.footer-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
  color: var(--brand-sand-light);
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons (brand lime green — dark text for readable contrast) ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  min-height: 44px;                /* WCAG: touch target >= 44px */
  border-radius: 999px;
  background-color: var(--brand-green);
  color: var(--text);              /* >= 4.5:1 on brand green */
  font-weight: bold;
  text-decoration: none;
  font-size: 1.125rem;             /* >= 18px (WCAG floor) */
  transition: background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--brand-green-deep);  /* slightly deeper lime for hover */
}

/* ---------- Back link (All six actions) ---------- */
.link-back {
  display: inline-block;
  padding: 10px 0;
  min-height: 44px;                /* WCAG: touch target >= 44px */
  font-weight: bold;
}

/* ---------- Gentle navigation between the six guides ---------- */
.guide-nav {
  background-color: var(--bg);
  border-top: 1px solid var(--line);
  padding: 40px 0;
  text-align: center;
}

.guide-nav-heading {
  font-size: 1.1rem;               /* >= 18px */
  color: var(--brand-blue);        /* >= 4.5:1 on bg */
  font-weight: bold;
  margin: 0 0 16px;
}

.guide-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.guide-nav-list a {
  display: inline-block;
  padding: 12px 18px;
  min-height: 44px;                /* WCAG: touch target >= 44px */
  border-radius: 999px;
  border: 2px solid var(--brand-sand);
  background-color: var(--surface);
  color: var(--brand-blue);        /* >= 4.5:1 on surface */
  font-weight: bold;
  font-size: 1rem;                 /* >= 18px */
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.guide-nav-list a:hover,
.guide-nav-list a:focus-visible {
  border-color: var(--brand-blue);
}

.guide-nav-list a[aria-current="page"] {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;                  /* >= 4.5:1 on brand blue */
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 24px;
  background-color: var(--brand-blue);
  color: #e7ebfa;                  /* >= 4.5:1 on brand blue */
  text-align: center;
  font-size: 1rem;                 /* 1rem = 18px (html root is 18px); >= WCAG floor */
}

.site-footer p {
  margin: 0 0 8px;
}

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

.site-footer a {
  display: inline-block;
  padding: 8px 4px;                /* comfortable touch target */
  color: var(--brand-sand-light);  /* >= 4.5:1 on brand blue */
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Responsive (mobile-first; text never below 18px) ---------- */
@media (min-width: 1024px) {
  .page-hero {
    min-height: 64vh;
  }
  .page-hero-heading {
    font-size: 2.8rem;
  }
  .section {
    padding: 60px 0;
  }
  .guide-nav {
    padding: 48px 0;
  }
}

/* ---------- JS reveal (only active when JS is on) ---------- */
.js-enabled .reveal {
  opacity: 0;
  transition: opacity 1s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .js-enabled .reveal {
    opacity: 1;
    transition: none;
  }
}
