/* ==========================================================
   CobAnanda site theme (2026) — loaded on every page, after v2.css.
   Palette, type, buttons, header, footer and the shared v2 building
   blocks (sections, banners, photos, forms, "At a glance" boxes,
   payment cards, calendar events). Homepage-only sections live in
   home.css.
   ========================================================== */
:root {
  /* Palette */
  --h-forest: #283C32;
  --h-forest-deep: #1F3028;
  --h-ivory: #F4F0E7;
  --h-ivory-deep: #EAE3D4;
  --h-terracotta: #B76F50;      /* decorative accents and large text only */
  --h-terracotta-ink: #93553C;  /* small text and links: passes WCAG AA on ivory and white */
  --h-sand: #D9C9A8;
  --h-white: #FFFFFF;
  --h-muted: #55645A;

  /* Type */
  --h-font-display: 'Cormorant Garamond', Georgia, serif;
  --h-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Re-map the shared v2 settings so every v2 component picks up the theme */
  --ink: var(--h-forest);
  --muted: var(--h-muted);
  --accent: var(--h-forest);
  --accent-dark: var(--h-terracotta-ink);
  --sage-50: var(--h-ivory);
  --sage-100: var(--h-ivory-deep);
  --sage-300: var(--h-sand);
  --sage-700: var(--h-forest);
  --font-body: var(--h-font-body);
  --font-head: var(--h-font-display);
  --radius: 4px;
  --shadow: 0 18px 40px rgba(31, 48, 40, .12);
}

body {
  background: var(--h-white);
  color: var(--h-forest);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ---------- Type ---------- */
body h1,
body h2 { font-family: var(--h-font-display); font-weight: 500; letter-spacing: -.01em; line-height: 1.08; color: var(--h-forest); }
body h2 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.4rem); margin-bottom: 20px; }
body h3 { font-family: var(--h-font-display); font-weight: 500; font-size: clamp(1.6rem, 1.4rem + .6vw, 1.95rem); line-height: 1.15; margin-bottom: 10px; color: var(--h-forest); }
body h4 { font-family: var(--h-font-body); font-weight: 600; color: var(--h-forest); }
body a { color: var(--h-terracotta-ink); }
body a:hover { color: var(--h-forest); }
body .eyebrow { margin-bottom: 18px; font: 600 .78rem/1.3 var(--h-font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--h-terracotta-ink); }
body .lead { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.6; }
body .muted { color: var(--h-muted); }
body li::marker { color: var(--h-terracotta); }

/* Page titles on inner pages */
body:not(.home) main h1 { font-size: clamp(2.6rem, 1.8rem + 2.6vw, 4rem); margin-bottom: 16px; }
body .flow > h1 + .photo { margin-top: 24px; }

/* ---------- Buttons ---------- */
body .btn { border-radius: 2px; border-color: var(--h-forest); background: var(--h-forest); color: var(--h-ivory); letter-spacing: .16em; font-weight: 600; }
body .btn:hover { background: var(--h-terracotta-ink); border-color: var(--h-terracotta-ink); color: var(--h-white); }
body .btn--ghost { background: transparent; color: var(--h-forest); }
body .btn--ghost:hover { background: var(--h-forest); border-color: var(--h-forest); color: var(--h-ivory); }
body .btn--light { background: transparent; border-color: var(--h-ivory); color: var(--h-ivory); }
body .btn--light:hover { background: var(--h-ivory); border-color: var(--h-ivory); color: var(--h-forest); }
body .btn--small { border-radius: 2px; }
body :focus-visible { outline: 3px solid var(--h-terracotta); outline-offset: 3px; }

/* ---------- Header ---------- */
body .header { background: rgba(244, 240, 231, .96); border-bottom: 1px solid rgba(40, 60, 50, .12); }
body .nav a,
body .nav__drop > button { color: var(--h-forest); font-family: var(--h-font-body); font-weight: 500; letter-spacing: .01em; }
body .nav a:hover,
body .nav a[aria-current] { color: var(--h-terracotta-ink); }
body .nav__menu { border-radius: 4px; }
body .nav__menu a:hover { background: var(--h-ivory); }

/* Keep anchored sections clear of the sticky header */
body main [id] { scroll-margin-top: 76px; }

/* ---------- Sections (inner pages) ---------- */
body .section--sage,
body .section--tint { background: var(--h-ivory); }
/* two ivory sections in a row get a hairline so the break still shows */
body main > .section--sage + .section--sage,
body main > .section--sage + .section--tint,
body main > .section--tint + .section--sage,
body main > .section--tint + .section--tint { border-top: 1px solid rgba(40, 60, 50, .12); }
body .banner__img { height: clamp(260px, 42vw, 560px); }

/* ---------- Photos, overlays, galleries, video ---------- */
body .photo { border-radius: var(--radius); }
body .overlay__box { background: rgba(244, 240, 231, .96); border-radius: var(--radius); }
body .gallery__item { border-radius: var(--radius); }
body .video__play { background: var(--h-forest); }

/* ---------- "At a glance" boxes ---------- */
body .glance { background: var(--h-white); border: 1px solid var(--h-sand); border-top: 3px solid var(--h-terracotta); border-radius: var(--radius); }
body .glance h2 { font-size: clamp(1.8rem, 1.5rem + 1vw, 2.2rem); }
body .glance dt { color: var(--h-terracotta-ink); font-weight: 600; letter-spacing: .14em; }

/* ---------- Forms ---------- */
body .field label { font-weight: 600; color: var(--h-forest); }
body .field input,
body .field textarea { border: 1px solid var(--h-sand); border-radius: 2px; background: var(--h-white); color: var(--h-forest); }
body .field input:focus,
body .field textarea:focus { border-color: var(--h-forest); outline: 2px solid var(--h-ivory-deep); }

/* ---------- Calendar events (homepage and /calendar) ---------- */
body [data-calendar-v2] .event { border-top: 1px solid rgba(40, 60, 50, .18); }
body [data-calendar-v2] .event:first-of-type { border-top: 0; }
body [data-calendar-v2] .event h3 { font-size: clamp(1.6rem, 1.4rem + .6vw, 1.95rem); margin-bottom: 6px; }
body [data-calendar-v2] .event__meta { font: 600 .74rem/1.4 var(--h-font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--h-terracotta-ink); margin-bottom: 14px; }
body [data-calendar-v2] .event__dates li { background: var(--h-white); border: 1px solid var(--h-sand); border-radius: 2px; font-weight: 600; color: var(--h-forest); }
body [data-calendar-v2] .event p { color: var(--h-muted); }
/* /calendar: photo beside each event */
body .cal-list--media { max-width: 960px; }
body .event--media { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
body .event__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
body [data-calendar-v2] .event--media:first-of-type { padding-top: var(--s1); }
@media (max-width: 640px) {
  body .event--media { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Footer ---------- */
body .footer { background: var(--h-forest-deep); color: var(--h-ivory); }
body .footer h2,
body .footer h3 { color: var(--h-ivory); }
body .footer h2 { font-size: 2rem; margin-bottom: 16px; }
body .footer h3 { font: 600 .8125rem/1.4 var(--h-font-body); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
body .footer a { color: var(--h-ivory); }
body .footer a:hover { color: var(--h-sand); }
body .footer__bottom { color: rgba(244, 240, 231, .72); }
body .subscribe input { border-radius: 2px; }
body .subscribe input::placeholder { color: rgba(244, 240, 231, .7); }
body .subscribe .btn { background: var(--h-ivory); border-color: var(--h-ivory); color: var(--h-forest); }
body .subscribe .btn:hover { background: transparent; color: var(--h-ivory); }

/* ==========================================================
   Page types (class on <body>)
   ========================================================== */

/* Offerings: retreats, ceremonies, trainings, online programs */
body.page-offering main h1 + p { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); color: var(--h-muted); }

/* Letters and preparation notes: comfortable reading width */
body.page-letter .flow,
body.page-faq .flow { max-width: 700px; }
body.page-letter main h1,
body.page-faq main h1 { font-size: clamp(2.3rem, 1.7rem + 2vw, 3.4rem); }

/* FAQs: questions stand out from answers */
body.page-faq main ol > li,
body.page-faq main ul > li { margin-bottom: 8px; }
body.page-faq main strong { color: var(--h-forest); }

/* Payment pages: a calm checkout card on ivory */
body.page-payment main > .section { background: var(--h-ivory); }
body.page-payment .product { background: var(--h-white); padding: clamp(24px, 4vw, 48px); border-radius: var(--radius); box-shadow: var(--shadow); }
body.page-payment main h1 { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); }
body.page-payment .product__price { font-family: var(--h-font-display); color: var(--h-forest); }
body.page-payment .product__desc { border-top-color: var(--h-sand); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body .nav { background: var(--h-ivory); }
  body .nav > li > a,
  body .nav__drop > button { border-bottom-color: var(--h-ivory-deep); }
}
