/* ============================================================
   LIVING CONVERSATIONS — compassioncollectif.com/living-conversations/
   Desert Boho Calm (shared tokens with the CC hub) + Deep Forest
   Mobile-first. Warm, unhurried, not clinical. A commons, not a feed.
   ============================================================ */

:root {
  /* Canvas + surfaces */
  --bg:           #F6EFE6;
  --card:         #FCF8F1;
  --surface:      #EFE2D2;
  --surface-deep: #EBD9C8;
  --glass:        rgba(235, 217, 200, 0.65);

  /* Text */
  --text:      #4A3B32;
  --text-mid:  #6B5A50;
  --text-soft: #857060;

  /* Borders */
  --border:  #DFCDB9;
  --border2: #CDB59C;

  /* Brand */
  --primary:      #8F9A7A;   /* sage */
  --primary-mid:  #6F7A5C;
  --primary-deep: #4C5540;
  --primary-soft: #E7EADD;
  --accent:       #9C5A2E;   /* clay */
  --accent-rose:  #C07A6C;
  --alert:        #A6543F;
  --forest:       #2E4A34;   /* header / hero band */

  /* Shape + depth */
  --radius-card:    16px;
  --radius-control: 12px;
  --shadow-soft: 0 4px 24px rgba(74, 59, 50, .10);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--primary-deep); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }
.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible { outline-color: var(--primary-soft); }

.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 200;
  background: var(--card); color: var(--primary-deep);
  padding: 10px 16px; border-radius: var(--radius-control);
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  text-decoration: none; box-shadow: var(--shadow-soft);
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--forest);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-soft);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-soft); color: var(--forest);
  display: grid; place-items: center;
  font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700;
}
.brand-name { font-family: var(--font-heading); font-size: 1.1rem; letter-spacing: .3px; }
.brand-sub { display: block; font-family: var(--font-body); font-size: .68rem; opacity: .8; letter-spacing: 1.4px; text-transform: uppercase; }

.nav-desktop { display: none; gap: 4px; align-items: center; }
.nav-desktop a {
  color: #fff; text-decoration: none; font-size: .92rem;
  padding: 8px 12px; border-radius: 999px; opacity: .85;
  transition: background .18s ease, opacity .18s ease;
}
.nav-desktop a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.nav-desktop a.active { background: rgba(255,255,255,.18); opacity: 1; }

.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .95rem; font-weight: 700;
  padding: 10px 20px; border-radius: 999px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-sage { background: var(--primary-mid); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-deep); border: 1.5px solid var(--border2); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn[disabled]:hover { transform: none; box-shadow: none; }

.menu-toggle {
  display: grid; place-items: center;
  background: none; border: none; color: #fff; cursor: pointer;
  width: 40px; height: 40px;
}
@media (min-width: 880px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}
.menu-toggle svg { width: 24px; height: 24px; }

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  background: var(--forest);
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 8px 16px 16px;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; color: #fff; text-decoration: none;
  padding: 12px 8px; font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-mobile a.active { color: var(--primary-soft); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--forest) 0%, #3A5A42 100%);
  color: #fff;
  text-align: center;
  padding: 56px 20px 72px;
}
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); max-width: 720px; margin: 0 auto 14px; }
.hero p { max-width: 560px; margin: 0 auto 26px; opacity: .9; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-sub { margin-top: 22px; font-size: .85rem; opacity: .75; }

/* ---------- Sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 56px 20px; }
.section-alt-wrap { background: var(--card); }
.section h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 8px; color: var(--primary-deep); }
.section .lede { color: var(--text-mid); max-width: 640px; margin-bottom: 32px; }
.section .prose { max-width: 640px; color: var(--text-mid); }
.section .prose p + p { margin-top: 14px; }
.eyebrow {
  font-size: .72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); font-weight: 800; margin-bottom: 6px;
}

.grid { display: grid; gap: 20px; }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.section-alt-wrap .card { background: var(--bg); }
.card h3 { color: var(--primary-deep); margin-bottom: 8px; font-size: 1.15rem; }
.card p { color: var(--text-mid); font-size: .95rem; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-deep);
  display: grid; place-items: center; margin-bottom: 14px;
  font-size: 1.3rem;
}
.card, .topic-card, .convo-card { transition: box-shadow .18s ease; }
.card:hover, .topic-card:hover, .convo-card:hover { box-shadow: 0 10px 30px rgba(74, 59, 50, .16); }

/* ---------- Guiding question band ---------- */
.question-band {
  background: var(--surface-deep);
  text-align: center;
  padding: 44px 20px;
}
.question-band blockquote {
  max-width: 720px; margin: 0 auto;
  font-family: var(--font-heading); font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: var(--primary-deep);
  line-height: 1.45;
}
.question-band .band-note {
  margin-top: 12px; font-size: .8rem; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--text-soft); font-weight: 700;
}

/* ---------- How it works steps ---------- */
.step-card { position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--forest); color: #fff;
  display: grid; place-items: center; margin-bottom: 14px;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
}
@media (min-width: 640px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Topic cards ---------- */
.topic-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}
.section-alt-wrap .topic-card { background: var(--bg); }
.topic-card h3 { color: var(--primary-deep); font-size: 1.1rem; }
.topic-card p { color: var(--text-mid); font-size: .9rem; }

/* ---------- Filter chips (conversations page) ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-chip {
  font-family: var(--font-body); font-size: .85rem; font-weight: 700;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--text-mid);
  border: 1.5px solid var(--border2);
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.filter-chip:hover { background: var(--primary-soft); color: var(--primary-deep); }
.filter-chip.active { background: var(--primary-mid); color: #fff; border-color: var(--primary-mid); }

/* ---------- Conversation cards ---------- */
.convo-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.convo-topic {
  align-self: flex-start;
  font-size: .68rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-deep);
}
.convo-card h3 { color: var(--primary-deep); font-size: 1.2rem; }
.convo-card p { color: var(--text-mid); font-size: .95rem; }
.convo-card .btn { margin-top: auto; align-self: flex-start; }
.convo-meta { font-size: .8rem; color: var(--text-soft); }

/* ---------- Contribution cards (quieter than .card) ---------- */
.contribution-list { display: grid; gap: 16px; max-width: 720px; }
.contribution {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}
.contribution.kind-question { border-left-color: var(--accent-rose); }
.contribution.kind-story { border-left-color: var(--accent); }
.contribution-body { color: var(--text); font-size: .97rem; white-space: pre-line; }
.contribution-meta { margin-top: 12px; font-size: .8rem; color: var(--text-soft); }
.contribution-meta .kind-tag { text-transform: capitalize; }

/* ---------- Contribution form ---------- */
.contribute-box {
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
  margin-top: 40px;
}
.contribute-box h3 { color: var(--primary-deep); margin-bottom: 6px; font-size: 1.25rem; }
.contribute-box .form-note { color: var(--text-soft); font-size: .87rem; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--text-mid); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-control);
  font-family: var(--font-body); font-size: .95rem;
  background: #fff; color: var(--text);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary); border-color: var(--primary);
}
.field-optional { font-weight: 400; color: var(--text-soft); }
.kind-row { display: flex; flex-wrap: wrap; gap: 14px; }
.kind-row label {
  display: flex; align-items: center; gap: 6px;
  font-size: .9rem; color: var(--text-mid); font-weight: 600; margin: 0;
  white-space: nowrap;
}
.form-message { margin-top: 14px; font-size: .92rem; display: none; }
.form-message.ok { display: block; color: var(--primary-deep); }
.form-message.err { display: block; color: var(--alert); }

/* Honeypot — hidden from people, visible to bots */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Demo-mode notice ---------- */
.demo-note {
  display: none;
  max-width: 1080px; margin: 16px auto 0; padding: 0 20px;
}
.demo-note.show { display: block; }
.demo-note-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  font-size: .85rem; color: var(--text-mid);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.demo-note-inner button {
  background: none; border: none; cursor: pointer;
  color: var(--text-soft); font-size: 1rem; line-height: 1;
}

/* ---------- Page hero (inner pages, slimmer) ---------- */
.page-hero { padding: 40px 20px 48px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity .55s ease, transform .55s ease, box-shadow .18s ease;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest); color: #fff;
  padding: 36px 20px; text-align: center; font-size: .88rem;
}
.site-footer a { color: var(--primary-soft); }
.footer-note { opacity: .7; margin-top: 8px; font-size: .8rem; }
