/* ============================================================
   Ubuntu Roots Coaching(TM) — styles.css
   Foundation design system: tokens, base, typography, layout,
   page sections, visualization scaffolding, accessibility.
   Component chrome (nav, cards, accordion, badges, forms) lives
   in components.css. No inline styles are used anywhere.
   ============================================================ */

:root {
  /* Foundation earth palette (governs layout, type, backgrounds) */
  --earth-brown: #3d2b1f;
  --root-brown: #6b3a2a;
  --forest: #2d5a27;
  --moss: #5b7e3a;
  --teal: #4a7c6b;
  --clay: #8b5e3c;
  --plum: #7a5c8a;
  --heritage-gold: #c07820;
  --parchment: #faf6f0;
  --ink: #1a1008;
  --sand: #d6c4b0;

  /* Derived surface + text roles */
  --bg: var(--parchment);
  --bg-alt: #f2ebe1;
  --surface: #ffffff;
  --surface-deep: #2a1d13;
  --text: var(--ink);
  --text-soft: #4a3c30;
  --text-muted: #6f6155;
  --line: #e3d8c8;
  --line-strong: #cbb9a3;
  --focus: #1d4ed8;

  /* Dimension accents (dimension-coded components only) */
  --remembrance: #3a44a6;
  --belonging: #2ebc4f;
  --becoming: #8642de;
  --reciprocity: #c07658;
  --legacy: #ca9f31;
  --hearth: #f2a93c;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scale + rhythm */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.32rem + 0.66vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.55rem + 1.2vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.8rem + 2vw, 3.5rem);

  --maxw: 1120px;
  --measure: 68ch;
  --radius: 10px;
  --radius-sm: 6px;
  --space: clamp(3rem, 2rem + 4vw, 5.5rem);
}

/* ---------- reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--root-brown); text-underline-offset: 3px; }
a:hover { color: var(--earth-brown); }

/* ---------- headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  color: var(--earth-brown);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }
strong { color: var(--earth-brown); }

/* ---------- layout ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.section { padding-block: var(--space); }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--surface-deep); color: var(--sand); }
.section--deep h2, .section--deep h3 { color: var(--parchment); }
.stack > * + * { margin-top: 1.1rem; }
.grid { display: grid; gap: 1.5rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--root-brown);
  margin: 0 0 0.6rem;
}
.lede { font-size: var(--step-1); color: var(--text-soft); max-width: 60ch; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 200;
  background: var(--earth-brown);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.75rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(242,169,60,0.16), transparent 55%),
    linear-gradient(180deg, #efe6d8, var(--parchment));
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  border-bottom: 1px solid var(--line);
}
.hero__title { max-width: 16ch; }
.hero__sub { font-size: var(--step-1); color: var(--text-soft); max-width: 52ch; margin-top: 0.75rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- circular dimension diagram (Visualization 2) ---------- */
.wheel { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .wheel { grid-template-columns: minmax(320px, 460px) 1fr; } }
.wheel__figure { position: relative; margin: 0; }
.wheel__svg { width: 100%; height: auto; overflow: visible; }
.wheel__seg { cursor: pointer; transition: opacity 0.15s ease, transform 0.15s ease; transform-origin: center; }
.wheel__seg:hover { opacity: 0.9; }
.wheel__seg-shape { stroke: var(--parchment); stroke-width: 2; }
.wheel__seg[aria-selected="true"] .wheel__seg-shape { stroke: var(--ink); stroke-width: 3; }
.wheel__seg:focus { outline: none; }
.wheel__seg:focus-visible .wheel__seg-shape { stroke: var(--focus); stroke-width: 4; }
.wheel__seg-label { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: #fff; pointer-events: none; }
.wheel__seg-icon { color: #fff; }
.wheel__center-label { font-family: var(--serif); font-weight: 600; fill: var(--hearth); pointer-events: none; }
.wheel__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  min-height: 210px;
}
.wheel__panel h3 { margin-bottom: 0.15rem; }
.wheel__panel .metaphor { font-style: italic; color: var(--text-muted); margin-bottom: 0.8rem; }
.wheel__panel .pq { font-family: var(--serif); font-size: var(--step-1); color: var(--earth-brown); }
.wheel__legend { font-size: var(--step--1); color: var(--text-muted); margin-top: 1.25rem; max-width: 70ch; }

/* ---------- living tree (Visualization 1) ---------- */
.tree { display: grid; gap: 2rem; }
@media (min-width: 900px) { .tree { grid-template-columns: minmax(300px, 440px) 1fr; align-items: start; } }
.tree__figure { position: relative; margin: 0; background: linear-gradient(180deg, #f4ecdd, #efe6d5); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.tree__svg { width: 100%; height: auto; }
.tree__zone { cursor: pointer; }
.tree__zone .tree__hit { fill: transparent; stroke: transparent; stroke-width: 2; }
.tree__zone:hover .tree__hit,
.tree__zone[aria-pressed="true"] .tree__hit { stroke: var(--earth-brown); fill: rgba(61,43,31,0.06); }
.tree__zone:focus { outline: none; }
.tree__zone:focus-visible .tree__hit { stroke: var(--focus); stroke-width: 3; }
.tree__zone[aria-pressed="true"] .tree__dot { fill: var(--heritage-gold); }
.tree__panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem; }
.tree__panel h3 { margin-bottom: 0.1rem; }
.tree__panel .tagline { color: var(--text-muted); font-style: italic; margin-bottom: 0.9rem; }
.tree__buttons { display: none; }
@media (max-width: 899px) {
  .tree { grid-template-columns: 1fr; }
  .tree__figure { order: -1; }
  .tree__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
}
.tree__alt { margin-top: 2rem; }

/* generic dl used inside panels */
.facts { margin: 0; }
.facts div + div { margin-top: 0.7rem; }
.facts dt { font-family: var(--sans); font-weight: 700; font-size: var(--step--1); letter-spacing: 0.02em; color: var(--root-brown); }
.facts dd { margin: 0.15rem 0 0; }

/* ---------- utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead-space { margin-top: 2.5rem; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: var(--space); }
.note {
  border-left: 4px solid var(--heritage-gold);
  background: #fbf3e6;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
}
.note strong { color: var(--earth-brown); }

/* two-column responsive grid */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; }
