/* ============================================================
   The Fluent Pilot — v3 stylesheet
   Tokens supplied by Jon (DESIGN-BRIEF.md appendix). One accent
   (clay ember) + neutrals. Type does the design work.
   ============================================================ */

:root {
  /* Colors */
  --deep-ink: #000d10;
  --pure-white: #ffffff;
  --cool-ash: #8e8e95;
  --pebble: #d5d3d4;
  --midnight-hull: #0f0f1c;
  --charcoal-deck: #151623;
  --clay-ember: #bc7155;
  /* Panel surface step — white text passes WCAG AA (4.79:1); accent stays #bc7155 (V3-AMENDMENT-2 §F) */
  --clay-panel: #a85f43;
  /* Derived neutral for small secondary text — cool-ash fails WCAG AA
     below 24px, so body-size secondary text uses this darker step. */
  --ash-deep: #5c5c63;

  /* Typography */
  /* System stack is final (owner decision, V3-PUNCH-LIST §2.3a) — no licensed webfont. */
  --font-display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Type scale (fluid, mobile-first) */
  --text-caption: 15px;
  --text-body: 17px;
  --text-nav: 17px;
  --text-subheading: clamp(19px, 2.2vw, 23px);
  --text-heading-sm: clamp(22px, 3vw, 30px);
  --text-heading: clamp(26px, 3.6vw, 37px);
  --text-heading-lg: clamp(31px, 4.6vw, 52px);
  --text-display: clamp(38px, 6vw, 63px);
  --text-display-xl: clamp(46px, 9.5vw, 131px);

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: clamp(64px, 9vw, 119px);
  --pad-x: clamp(20px, 4vw, 48px);

  /* Radii */
  --radius-decorative: 45px;
  --radius-buttons: 1000px;
  --radius-nav: 1000px;
  --radius-heropanels: 0px;

  /* Surfaces */
  --surface-canvas: var(--pure-white);
  --surface-featured: var(--clay-ember);
  --surface-dark: var(--charcoal-deck);
  --surface-footer: var(--deep-ink);
}

/* ---------- Reset-lite ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-display);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--deep-ink);
  background: var(--surface-canvas);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
main a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--clay-ember);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
main a:not([class]):hover { color: var(--clay-ember); }
:focus-visible { outline: 3px solid var(--clay-ember); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Typography helpers ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-heading-lg); letter-spacing: -0.025em; }
h3 { font-size: var(--text-heading-sm); }
h4 { font-size: var(--text-subheading); }

.kicker {
  display: block;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash-deep);
  margin-bottom: 18px;
}
.lede {
  font-size: var(--text-subheading);
  line-height: 1.45;
  color: var(--ash-deep);
  max-width: 34em;
}
.muted { color: var(--ash-deep); }
.accent { color: var(--clay-ember); }

/* Long-form measure */
.prose { max-width: 66ch; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.15em; }
.prose h2 { font-size: var(--text-heading-sm); margin: 2em 0 0.6em; }
.prose h3 { font-size: var(--text-subheading); margin: 1.6em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--page-max-width); margin: 0 auto; padding: 0 var(--pad-x); }
section { padding: calc(var(--section-gap) * 0.55) 0; }
.section-gap-top { padding-top: var(--section-gap); }

/* ---------- Header / nav ---------- */
.site-header { padding: 20px 0 8px; }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap;
}
.wordmark .dot { color: var(--clay-ember); }
.site-nav {
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px);
  font-size: var(--text-nav); font-weight: 500;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 2px;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { text-decoration: none; color: var(--ash-deep); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--deep-ink); }
.site-nav a[aria-current="page"] { font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--deep-ink); color: var(--pure-white);
  border-radius: var(--radius-buttons);
  padding: 15px 31px;
  font-size: 17px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--deep-ink);
  transition: opacity .15s ease;
}
.btn:hover { opacity: 0.86; }
.btn.ghost { background: transparent; color: var(--deep-ink); }
.btn.on-dark { background: var(--pure-white); color: var(--deep-ink); border-color: var(--pure-white); }
.btn.small { padding: 11px 23px; font-size: 15px; }

/* ---------- Hairline rows (service lists, fee schedule) ---------- */
.rows { border-top: 1px solid var(--pebble); }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 38px;
  padding: 31px 0;
  border-bottom: 1px solid var(--pebble);
}
@media (min-width: 760px) {
  .row { grid-template-columns: minmax(220px, 0.9fr) 1.6fr auto; align-items: baseline; }
}
.row h3 { font-size: var(--text-subheading); }
.row h3 a { text-decoration: none; }
.row h3 a:hover { color: var(--clay-ember); }
.row p { color: var(--ash-deep); max-width: 46em; }
.row .meta { font-weight: 600; white-space: nowrap; }
.row .meta .sub { display: block; font-weight: 400; font-size: var(--text-caption); color: var(--ash-deep); }

/* ---------- Signature element: score sheet (homepage only) ---------- */
.scoresheet {
  background: var(--surface-canvas);
  border: 1.5px solid var(--deep-ink);
  border-radius: var(--radius-decorative);
  padding: clamp(28px, 4vw, 53px);
  max-width: 560px;
}
.scoresheet .sheet-title {
  font-size: var(--text-caption); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ash-deep); margin-bottom: 22px;
}
.scoresheet ol { list-style: none; }
.scoresheet li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--pebble);
  font-size: var(--text-subheading); font-weight: 500;
}
.scoresheet li .level { font-weight: 700; font-variant-numeric: tabular-nums; }
.scoresheet li.capping { color: var(--clay-ember); font-weight: 700; }
.scoresheet li.overall {
  border-bottom: none; margin-top: 9px; padding-top: 21px;
  border-top: 2px solid var(--deep-ink);
  font-weight: 700;
}
.scoresheet li.overall .level { color: var(--clay-ember); }
.scoresheet .sheet-note { margin-top: 17px; font-size: var(--text-caption); color: var(--ash-deep); }

/* ---------- Numbered steps ---------- */
.steps { counter-reset: step; }
.step {
  display: grid; grid-template-columns: 68px 1fr; gap: 0 22px;
  padding: 34px 0; border-top: 1px solid var(--pebble);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: var(--text-heading-sm); font-weight: 700;
  color: var(--clay-ember); line-height: 1.1;
}
.step h3 { margin-bottom: 8px; font-size: var(--text-subheading); }
.step p { color: var(--ash-deep); max-width: 52em; }
.step .measure {
  margin-top: 10px; font-size: var(--text-caption); font-weight: 600;
  color: var(--deep-ink);
}
.step .measure span { color: var(--clay-ember); }

/* ---------- Featured clay panel (max one per page) ---------- */
.panel-featured {
  background: var(--clay-panel); color: var(--pure-white);
  border-radius: var(--radius-decorative);
  padding: clamp(34px, 5vw, 68px);
}
.panel-featured h2 { color: var(--pure-white); max-width: 18em; }
.panel-featured p { max-width: 40em; margin-top: 17px; font-size: var(--text-subheading); line-height: 1.45; }
.panel-featured .btn { margin-top: 31px; background: var(--pure-white); color: var(--deep-ink); border-color: var(--pure-white); }
.panel-featured .panel-note { font-size: var(--text-body); margin-top: 17px; color: rgba(255,255,255,0.92); }
.panel-featured a:not(.btn) { color: var(--pure-white); text-decoration: underline; text-underline-offset: 3px; }

/* Lora italic (SIL OFL, self-hosted) — used ONLY by the .triage rule below */
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/lora-italic.woff2') format('woff2');
}

/* ---------- Triage line ---------- */
.triage {
  font-family: 'Lora', Georgia, serif; font-style: italic; /* serif trial (V3-AMENDMENT-2 §D) — delete this line to revert */
  border-left: 3px solid var(--clay-ember);
  padding: 6px 0 6px 22px;
  max-width: 58ch;
  font-size: var(--text-subheading); font-weight: 500; line-height: 1.45;
}
.triage .why { display: block; margin-top: 9px; font-size: var(--text-body); font-weight: 400; color: var(--ash-deep); }

/* ---------- Hero (homepage) ---------- */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(52px, 8vw, 119px); }
.hero h1 {
  font-size: var(--text-display-xl);
  letter-spacing: -0.03em; line-height: 0.98;
  max-width: 9.5em;
}
.hero h1 em { font-style: normal; color: var(--clay-ember); }
.hero .lede { margin-top: 31px; }
.hero .cta-row { margin-top: 38px; display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }

/* ---------- Photo placeholder (pre-launch: clearly marked) ---------- */
.photo-slot {
  border: 1.5px dashed var(--pebble);
  border-radius: var(--radius-decorative);
  display: flex; align-items: center; justify-content: center;
  min-height: 300px; padding: 22px; text-align: center;
  color: var(--ash-deep); font-size: var(--text-caption);
}

/* ---------- Language row ---------- */
.lang-links { display: flex; flex-wrap: wrap; gap: 11px; }
.lang-links a {
  text-decoration: none; font-weight: 600; font-size: 16px;
  border: 1.5px solid var(--pebble); border-radius: var(--radius-buttons);
  padding: 11px 21px;
}
.lang-links a:hover { border-color: var(--deep-ink); }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: var(--text-caption); color: var(--ash-deep); padding: 17px 0 0; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--deep-ink); }
.crumbs span[aria-hidden] { padding: 0 7px; }

/* ---------- Page head ---------- */
.page-head { padding: clamp(34px, 6vw, 68px) 0 clamp(21px, 4vw, 38px); }
.page-head h1 { max-width: 16em; }
.page-head .lede { margin-top: 22px; }

/* ---------- FAQ (visible text, never accordions) ---------- */
.faq-item { padding: 34px 0; border-top: 1px solid var(--pebble); }
.faq-item h2, .faq-item h3 { font-size: var(--text-subheading); margin-bottom: 11px; }
.faq-item p { color: var(--ash-deep); max-width: 62ch; margin-bottom: 0.8em; }
.faq-item p:last-child { margin-bottom: 0; }

/* ---------- Blog index ---------- */
.post-list .post {
  padding: 34px 0; border-top: 1px solid var(--pebble);
  display: grid; gap: 6px;
}
.post-list .post .date { font-size: var(--text-caption); color: var(--ash-deep); }
.post-list .post h2 { font-size: var(--text-heading-sm); }
.post-list .post h2 a { text-decoration: none; }
.post-list .post h2 a:hover { color: var(--clay-ember); }
.post-list .post p { color: var(--ash-deep); max-width: 62ch; }
.byline { font-size: var(--text-caption); color: var(--ash-deep); }
.byline strong { color: var(--deep-ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-footer); color: rgba(255,255,255,0.82);
  margin-top: var(--section-gap);
  padding: clamp(52px, 7vw, 90px) 0 38px;
  font-size: 16px;
}
.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.site-footer a:hover { color: var(--pure-white); }
.site-footer .cols {
  display: grid; gap: 38px 34px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 52px;
}
.site-footer h4 {
  font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 15px;
}
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer .base {
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: 31px; display: flex; flex-wrap: wrap; gap: 13px 34px;
  justify-content: space-between; font-size: var(--text-caption);
  color: rgba(255,255,255,0.55);
}
.site-footer .base .wordmark { color: var(--pure-white); font-size: 17px; }

/* ---------- Utility ---------- */
.mt-1 { margin-top: 17px; } .mt-2 { margin-top: 31px; } .mt-3 { margin-top: 53px; }
.two-col { display: grid; gap: 38px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 68px; } }
.center-cta { text-align: left; padding-top: 0; }

/* ---------- Articulation diagrams (V3-PUNCH-LIST §4) ---------- */
.diagram-row { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; }
.diagram { margin: 0; }
.diagram img { width: 100%; height: auto; border: 1px solid var(--pebble); border-radius: 16px; }
.diagram .diagram-slot {
  border: 1.5px dashed var(--pebble); border-radius: 16px;
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  padding: 17px; text-align: center; color: var(--ash-deep); font-size: var(--text-caption);
}
.diagram figcaption { font-size: var(--text-caption); color: var(--ash-deep); margin-top: 9px; }

/* ---------- Audience router (homepage; louder per V3-AMENDMENT-2 §B) ---------- */
.router { border-top: 1px solid var(--pebble); border-bottom: 1px solid var(--pebble); }
.router .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 11px 38px; padding-top: 26px; padding-bottom: 26px;
}
.router .lead {
  color: var(--ash-deep); font-size: var(--text-body);
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.router a { font-size: var(--text-body); font-weight: 600; }
