/* ============================================================
   FirePath — editorial primitives (one source of truth).
   The layout language of the homepage: a 1120px measure, a 12-column
   grid from 900px, sections divided by thin rules, big serif type,
   figures with an ink top rule instead of boxes.
   Used by the homepage (src/pages/index.astro, with the homepage-only
   parts in src/styles/home-path.css) and by /firepath.
   Load it before any page CSS that builds on it. Tokens come from
   public/css/app.css.
   ============================================================ */

.hp { --hp-max: 1120px; --hp-rule: 1px solid var(--line); --hp-r: 8px; color: var(--ink); }
.hp .num, .hp-age { font-variant-numeric: tabular-nums lining-nums; }
.hp-wrap { max-width: var(--hp-max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .hp-wrap { padding: 0 32px; } }
.hp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp a:focus-visible, .hp button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ── Type ──────────────────────────────────────────────── */
.hp-h1 {
  max-width: 13ch; font-family: var(--font-display); font-weight: 700; color: var(--ink);
  font-size: clamp(40px, 6.6vw, 76px); line-height: 1.02; letter-spacing: -0.028em;
}
.hp-lead { margin-top: 18px; max-width: 46ch; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); }
.hp-h2 {
  font-family: var(--font-display); font-weight: 700; color: inherit;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: -0.02em;
}
.hp-h2.is-small { font-size: clamp(26px, 3vw, 34px); }
.hp-num {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.hp-num::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }
.hp-label { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.hp-label::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }
.hp-body { margin-top: 16px; max-width: 54ch; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.hp-link {
  display: inline-block; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: text-decoration-color var(--dur-fast) ease;
}
.hp-link:hover { text-decoration-color: var(--ink); }
.hp-link.is-quiet { font-weight: 500; color: var(--ink-2); }

/* Big numbers: the freedom age, and the number band's figure */
.hp-age { display: inline-block; min-width: 2ch; font-size: clamp(64px, 9vw, 104px); line-height: 0.9; letter-spacing: -0.04em; vertical-align: baseline; }
@media (max-width: 599px) { .hp-age { display: block; margin-top: 6px; } }
.hp-number-big {
  margin-top: 14px; font-family: var(--font-display); font-weight: 700; color: var(--bg);
  font-size: clamp(48px, 9.4vw, 116px); line-height: 0.95; letter-spacing: -0.035em; overflow-wrap: anywhere;
}

/* ── Hero ──────────────────────────────────────────────── */
.hp-hero { padding: 40px 0 64px; border-bottom: var(--hp-rule); }
@media (min-width: 768px) { .hp-hero { padding: 72px 0 96px; } }
.hp-hero-head { margin-bottom: 32px; }
@media (min-width: 768px) { .hp-hero-head { margin-bottom: 48px; } }

/* ── The one dark band ─────────────────────────────────── */
.hp-number { padding: 72px 0; background: var(--espresso); color: var(--bg); }
@media (min-width: 768px) { .hp-number { padding: 96px 0; } }
.hp-number .hp-num { color: rgba(253, 246, 238, 0.7); }

/* ── Sections ──────────────────────────────────────────── */
.hp-sec { padding: 56px 0; border-top: var(--hp-rule); }
.hp-number + .hp-sec { border-top: 0; }
@media (min-width: 768px) { .hp-sec { padding: 88px 0; } }

/* ── The 12-column grid (from 900px) ───────────────────── */
/* Story: copy in columns 1–5, a figure in 7–12 */
.hp-two { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .hp-two { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; } .hp-two > :first-child { grid-column: 1 / span 5; } .hp-two > :last-child:not(:first-child) { grid-column: 7 / span 6; } }

/* Side: a heading in columns 1–4, the main content (often a ruled list) in 6–12 */
.hp-side { display: grid; gap: 28px; }
@media (min-width: 900px) { .hp-side { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; } .hp-side-head { grid-column: 1 / span 4; } .hp-side > .hp-rules, .hp-side-main { grid-column: 6 / span 7; } }
.hp-side-main { min-width: 0; }

/* Half: two near-equal halves, 1–6 and 8–12 (the split 05 Pro and 04's head use).
   Added for /firepath; the homepage keeps its own named versions. */
.hp-half { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .hp-half { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; } .hp-half > :first-child { grid-column: 1 / span 6; } .hp-half > :last-child:not(:first-child) { grid-column: 8 / span 5; } }

/* ── Figures: an ink rule on top, a hairline below. Rules, not boxes. ── */
.hp-fig, .hp-story-fig, .hp-fut { padding: 20px 0 16px; border-top: 1px solid var(--ink); border-bottom: var(--hp-rule); }
.hp-fig { margin: 0; min-width: 0; }
/* Small label over a figure: a short rule, then the words (same family as .hp-num) */
.hp-fig-tag { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hp-fig-tag::before { content: ''; width: 16px; height: 1px; background: currentColor; opacity: 0.6; }
.hp-fig-tag span { font-weight: 400; }

/* ── Ruled lists (the tools, the doors) ────────────────── */
.hp-rules { list-style: none; border-top: 1px solid var(--ink); }
.hp-rules li { border-bottom: var(--hp-rule); }
.hp-rule {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline;
  padding: 18px 2px; text-decoration: none; color: var(--ink);
}
.hp-rule-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.01em; }
.hp-rule-line { grid-column: 1; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.hp-rule-go { grid-column: 2; grid-row: 1; font-size: 18px; color: var(--ink-2); transition: transform var(--dur-base) var(--ease), color var(--dur-fast) ease; }
.hp-rule:hover .hp-rule-go { transform: translateX(4px); color: var(--ink); }
.hp-rule:hover .hp-rule-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
@media (min-width: 700px) {
  .hp-rule { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto; padding: 22px 2px; }
  .hp-rule-line { grid-column: 2; grid-row: 1; }
  .hp-rule-go { grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-rule-go, .hp-link { transition: none !important; }
}

/* A section straight after a hero needs no second rule (the hero already draws one).
   Added for /firepath; on the homepage the hero is followed by the dark band. */
.hp-hero + .hp-sec { border-top: 0; }

/* ============================================================
   Warmth layer (additive). Section tones, a bigger type scale,
   ember used with purpose, the mini path motif and hover life.
   Nothing above this line changes, so the homepage is untouched.
   Contrast (checked): ink 13.4:1 and ink-2 5.9:1 on sand; ember
   text is --hp-accent, re-set per tone: #C4480F on cream (4.6:1),
   #A63C0C on sand (5.3:1), #F4622A on espresso (5.4:1).
   ============================================================ */
.hp { --hp-sand: #F3E7D8; --hp-accent: var(--ember-ink); }

/* ── Section tones: cream (default) / sand / dark. One dark per page. ── */
.hp-sec.is-sand {
  --hp-accent: #A63C0C; --line: #E3D3C0; --line-strong: #D6C3AD; --hp-rule: 1px solid var(--line);
  background: var(--hp-sand); border-top: 0;
}
.hp-sec.is-dark, .hp-panel.is-dark {
  /* Re-point the palette so every primitive inside reads cream-on-espresso. */
  --ink: #FDF6EE; --ink-2: #CDBFB3; --ink-3: #9C8B7E;
  --line: rgba(253, 246, 238, 0.16); --line-strong: rgba(253, 246, 238, 0.32);
  --bg: #241910; --surface: #2E2117; --hp-accent: var(--ember);
  --hp-rule: 1px solid var(--line);
  background: var(--espresso); color: var(--ink);
}
.hp-sec.is-dark { border-top: 0; }
.hp-sec.is-sand + .hp-sec, .hp-sec.is-dark + .hp-sec { border-top: 0; }
/* Buttons on dark: the solid ember keeps its AA ember (white on #C4480F is 4.9:1). */
.hp-sec.is-dark :is(a, button):focus-visible, .hp-panel.is-dark :is(a, button):focus-visible { outline-color: var(--ink); }

/* A dark panel: the one place a box is right (e.g. the featured plan) */
.hp-panel { min-width: 0; padding: 28px 20px 32px; border-radius: var(--hp-r); }
@media (min-width: 768px) { .hp-panel { padding: 36px 36px 40px; } }

/* ── Type, a step up ─────────────────────────────────────── */
.hp-h2.is-mid { font-size: clamp(28px, 3.4vw, 40px); }
.hp-label.is-ink { color: var(--ink); }
.hp-label.is-ink::before { opacity: 1; }
.hp-body.is-ink { color: var(--ink); }

/* Ruled list in large type: 18–20px ink, not small grey */
.hp-list-lg { list-style: none; border-top: 1px solid var(--ink); }
.hp-list-lg > li { display: flex; align-items: baseline; gap: 14px; padding: 16px 2px; border-bottom: var(--hp-rule); font-size: 18px; line-height: 1.45; color: var(--ink); }
@media (min-width: 768px) { .hp-list-lg > li { font-size: 19px; padding: 18px 2px; } }
.hp-list-lg > li > .hp-mark { transform: translateY(-0.2em); }
.hp-list-lg strong { font-weight: 600; }
.hp-list-lg .hp-list-sub { display: block; margin-top: 4px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }

/* ── Ember with purpose ─────────────────────────────────── */
/* A key figure in ember (one per section) */
.hp-big.is-ember, .hp-ember { color: var(--hp-accent); }
.hp-big.is-ember { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums lining-nums; }
/* The featured item: a 2px ember rule on top */
.hp-feature { border-top: 2px solid var(--hp-accent); }
/* Small markers for key points: an ember square; .is-ink is an ink outline (the lesser mark) */
.hp-mark { flex: none; display: inline-block; width: 8px; height: 8px; background: var(--hp-accent); vertical-align: 0.1em; }
.hp-mark.is-ink { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.hp-mark.is-dot { border-radius: 50%; }

/* ── The path motif: Today ─── ● ··· 60, ink line, ember dot, dotted bridge ── */
.hp-mini { display: block; width: 100%; max-width: 420px; height: auto; overflow: visible; color: var(--ink); }
.hp-mini-work { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.hp-mini-bridge { fill: none; stroke: var(--ink-2); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 7; }
.hp-mini-after { fill: none; stroke: var(--line-strong); stroke-width: 2.5; stroke-linecap: round; }
.hp-mini-today { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
.hp-mini-tick { stroke: var(--ink-2); stroke-width: 1.5; }
.hp-mini-free { fill: var(--ember); stroke: var(--bg); stroke-width: 3; }
.hp-mini-ghost { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.hp-mini-ring { fill: none; stroke: var(--ember); stroke-width: 1.5; opacity: 0; }
.hp-mini-t { fill: var(--ink-2); font-family: var(--font-ui); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.hp-mini-t.is-free { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 18px; }
/* Light motion: the line draws, the dot arrives (sliding closer when there's a ghost), one ring. */
@media (prefers-reduced-motion: no-preference) {
  .hp-mini .hp-mini-work { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hpMiniDraw 1100ms var(--ease) 200ms forwards; }
  .hp-mini .hp-mini-dot { animation: hpMiniIn 600ms var(--ease) 900ms both; }
  .hp-mini.has-ghost .hp-mini-dot { animation: hpMiniCloser 1400ms var(--ease) 900ms both; }
  .hp-mini .hp-mini-ring { transform-box: fill-box; transform-origin: center; animation: hpMiniRing 1600ms ease-out 1500ms 2; }
}
@keyframes hpMiniDraw { to { stroke-dashoffset: 0; } }
@keyframes hpMiniIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hpMiniCloser { from { transform: translateX(var(--hp-mini-shift, 56px)); } to { transform: none; } }
@keyframes hpMiniRing { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
/* The motif's caption: two short lines, each with its mark */
.hp-mini-cap { list-style: none; margin-top: 18px; border-top: var(--hp-rule); max-width: 420px; }
.hp-mini-cap li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: var(--hp-rule); font-size: 16px; line-height: 1.4; color: var(--ink); }
.hp-mini-cap li > .hp-mark { transform: translateY(-0.15em); }
.hp-mini-cap strong { font-weight: 600; }

/* ── Hover life for ruled rows: the rule darkens, the arrow nudges. No shadows. ── */
.hp-rows > li { transition: border-color var(--dur-fast) ease; }
.hp-rows > li:hover, .hp-rows > li:focus-within { border-bottom-color: var(--ink); }
.hp-go { display: inline-block; transition: transform var(--dur-base) var(--ease); }
.hp-rows > li:hover .hp-go, .hp-rows > li:focus-within .hp-go { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .hp-rows > li, .hp-go { transition: none !important; }
}

/* ============================================================
   Hierarchy helpers (additive; nothing above uses them).
   .hp-more   a quiet disclosure: <details class="hp-more"><summary>More</summary>…</details>
              or a <button class="hp-more-btn" aria-expanded> that shows hidden rows.
   .hp-l3     detail text: a step smaller and lighter (ink-2).
   .hp-inline-links  a single quiet line of text links.
   ============================================================ */
.hp-l3 { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.hp-more > summary, .hp-more-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; list-style: none; cursor: pointer;
  background: none; border: 0; font: 600 14.5px var(--font-ui); color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.hp-more > summary::-webkit-details-marker { display: none; }
.hp-more > summary::after, .hp-more-btn::after { content: '+'; font-weight: 400; font-size: 17px; line-height: 1; text-decoration: none; transition: transform var(--dur-base) var(--ease); }
.hp-more[open] > summary::after, .hp-more-btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.hp-more > summary:hover, .hp-more-btn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.hp-more > summary:focus-visible, .hp-more-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.hp-inline-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.hp-inline-links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hp-inline-links a:hover { text-decoration-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .hp-more > summary::after, .hp-more-btn::after { transition: none !important; } }

/* ── The newer look (from the homepage, Oct 2026). Switched on per page with .hp.is-new, so pages
   that haven't been brought across (the Pro pages) are untouched. ── */
/* Headline: the second half in ember, on its own line (<span class="hp-ember">…</span>) */
.hp .hp-ember { display: block; color: var(--ember-ink); }
/* Page lead-in above the headline: plain sentence case, no rule */
.hp.is-new :is(.hp-hero .hp-label, .mk-kicker, .auth-aside .hp-label) { gap: 0; font-size: 15px; letter-spacing: 0; color: var(--ink); }
.hp.is-new :is(.hp-hero .hp-label, .mk-kicker, .auth-aside .hp-label)::before { display: none; }
/* Tools: inputs and result on one band (as the homepage calculator), result on the right */
.tl-band {
  display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0;
  background: var(--surface); border: var(--hp-rule); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(43, 29, 20, 0.04), 0 12px 32px -24px rgba(43, 29, 20, 0.14);
}
@media (min-width: 900px) { .tl-band { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.tl-band > .tl-in, .tl-band > .tl-out { min-width: 0; padding: 22px 16px; }
@media (min-width: 600px) { .tl-band > .tl-in, .tl-band > .tl-out { padding: 28px; } }
@media (min-width: 900px) { .tl-band > .tl-in, .tl-band > .tl-out { padding: 30px 36px; } }
.tl-band > .tl-out { border-top: var(--hp-rule); }
/* Wide: the divider belongs to the band, so it runs full height whichever side is longer
   (and the result can stay sticky). 5fr of 11 = 45.45%. */
@media (min-width: 900px) {
  .tl-band { position: relative; }
  .tl-band::before { content: ''; position: absolute; top: 0; bottom: 0; left: 45.4545%; border-left: var(--hp-rule); pointer-events: none; }
  .tl-band > .tl-out { border-top: 0; }
}
.tl-band .tl-fig { margin-top: 0; padding: 0; border-top: 0; border-bottom: 0; }
/* Group headings inside a band: plain, like the homepage's "What you have now" */
.tl-band .hp-label { gap: 0; font-size: 13px; letter-spacing: 0.02em; color: var(--ink-2); }
.tl-band .hp-label::before { display: none; }
/* Section numbers ("01", "02") were decoration; the newer look leads with the heading itself.
   (Numbered steps on the Start pages stay: there the order means something.) */
.hp.is-new .tour-gn, .hp.is-new .faq-gn { display: none; }
