/* Under a Baobab Tree: deep forest, cream, warm amber light */

:root {
  --bg: #142a1f;          /* deep forest */
  --surface: #1d3a2c;     /* a clearing */
  --text: #f1ead8;        /* cream */
  --muted: #c9c3a8;
  --accent: #e0a96d;      /* warm amber, like late sun */
  --accent-text: #142a1f;
  --trunk: #b8a088;       /* pale baobab bark */
  --leaf: #8fb07a;        /* fresh leaf */
  --sun: #e0a96d;
  --line: #2f4d3d;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1f17;        /* forest at night */
    --surface: #173024;
    --text: #ece5d3;
    --muted: #bdb79c;
    --accent: #d99c5e;
    --accent-text: #0e1f17;
    --trunk: #a8917a;
    --leaf: #7f9e6b;
    --sun: #b8874f;
    --line: #2f4a3c;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
}

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

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Header */
.site-header {
  padding: 1.25rem 1rem;
  text-align: center;
}

.site-name {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

/* Layout */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

section { margin: 0 0 3rem; }

/* Hero */
.hero {
  text-align: center;
  margin-top: 1rem;
}

.baobab {
  width: min(100%, 22rem);
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.baobab .sun { fill: var(--sun); opacity: 0.9; }
.baobab .ground { fill: none; stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.baobab .canopy { fill: var(--leaf); }
.baobab .canopy-light { fill: var(--text); opacity: 0.12; }
.baobab .limbs path { fill: none; stroke: var(--trunk); stroke-width: 10; stroke-linecap: round; }
.baobab .trunk { fill: var(--trunk); }
.baobab .roots path { fill: none; stroke: var(--trunk); stroke-width: 5; stroke-linecap: round; }

.tagline {
  font-weight: normal;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.3;
  margin: 0;
}

.tagline span {
  display: block;
  font-style: italic;
  color: var(--accent);
}

/* Text sections */
.welcome p { margin: 0 0 1.1rem; }

h2 {
  font-weight: normal;
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.rituals {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.rituals p { color: var(--muted); margin: 0; }

.gift {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.gift p { margin: 0 0 1rem; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--sans);
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
}

.button:hover { filter: brightness(1.08); }

/* Footer */
.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.site-footer p { margin: 0.2rem 0; }

.todo { background: #ffe58a; color: #3b2f26; padding: 0 0.3em; border-radius: 0.2em; }

/* Text pages (privacy, terms, rituals) */
.prose { padding-top: 1rem; padding-bottom: 2rem; }
.prose h1 { font-weight: normal; font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1.25; margin: 0 0 0.25rem; }
.prose h2 { margin-top: 2.2rem; color: var(--accent); }
.prose p { margin: 0 0 1rem; }
.prose .updated { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; margin-bottom: 2rem; }
.site-footer a { color: var(--muted); }

/* Ritual pages */
.kicker { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.5rem; }
.kicker a { color: var(--muted); text-decoration: none; }
.ritual .subtitle { font-style: italic; color: var(--accent); font-size: 1.25rem; margin: 0 0 1.25rem; }
.ritual-meta { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ritual-meta li { font-family: var(--sans); font-size: 0.85rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.8rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2.5rem 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.75rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface); color: var(--accent);
  font-family: var(--sans); font-size: 0.95rem; display: flex; align-items: center; justify-content: center; }
.steps h2 { margin: 0 0 0.25rem; color: var(--text); font-size: 1.2rem; }
.steps p { margin: 0; }
.gentle { background: var(--surface); border-radius: 1rem; padding: 1.25rem 1.5rem; margin: 2.5rem 0; }
.gentle h2 { margin-top: 0; font-size: 1.15rem; }
.gentle ul { margin: 0; padding-left: 1.2rem; }
.gentle li { margin-bottom: 0.5rem; }
.closing { font-style: italic; font-size: 1.2rem; text-align: center; margin: 2.5rem 0; }

/* Ritual list on the home page */
.ritual-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.ritual-list a { display: block; text-decoration: none; background: var(--surface); border-radius: 1rem;
  padding: 1rem 1.25rem; color: var(--text); }
.ritual-list a:hover { outline: 1px solid var(--accent); }
.ritual-list strong { display: block; font-weight: normal; font-size: 1.15rem; color: var(--accent); }
.ritual-list span { color: var(--muted); font-size: 0.95rem; }
.ritual-list li { margin-bottom: 0.75rem; }
.ritual-list + p { margin-top: 1.25rem; }
.steps p + p { margin-top: 0.75rem; }
