/* Shared by every niche site. The build copies this file into dist/<slug>/. */
/* Every size is a golden-ratio token (PHI = 1.618034). DESIGN-NOTES.md has the why.
   Type: t_n = 1rem x PHI^n. Space: s_n = 1.5rem x PHI^(n-6).
   Line-height: only the four below, plus 1 inside the step numeral boxes.
   Columns: grp percentages. A grp-4 and a grp-5 track add up to 100%, so the gutter is padding inside a track, never a gap. */
:root {
  --paper: #f3ede2;
  --sheet: #fffdf8;
  --ink: #1d2126;
  --steel: #46505b;
  --mist: #c3c9cf;
  --orange: #b53c0b;
  --orange-deep: #9a3412;
  --yellow: #f2b705;
  --slab: Rockwell, "Rockwell Nova", "Roboto Slab", "DejaVu Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --t0: 1rem;
  --t1: 1.618034rem;
  --t2: 2.618034rem;
  --t3: 4.236068rem;

  --s4: .572949rem;
  --s5: .927051rem;
  --s6: 1.5rem;
  --s7: 2.427051rem;
  --s8: 3.927051rem;
  --s9: 6.354102rem;

  --lh-tight: 1.145898;
  --lh-snug: 1.236064;
  --lh-read: 1.381966;
  --lh-loose: 1.618034;

  --grp-4: 38.196601125%;
  --grp-5: 61.803398875%;
  --grp-half-5: 30.9016994375%;

  --ease: cubic-bezier(.25, .46, .45, .94);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s9); }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--t0)/var(--lh-loose) var(--sans); }
h1, h2 { font-family: var(--slab); font-weight: 700; margin: 0 0 var(--s6); text-wrap: balance; }
h1 { font-size: var(--t2); line-height: var(--lh-tight); letter-spacing: -.01em; }
h2 { font-size: var(--t1); line-height: var(--lh-snug); }
p, li, summary { text-wrap: pretty; }
p, ul, ol { margin: 0 0 var(--s6); }
ul { padding-left: var(--s6); list-style: square; }
li { margin-bottom: var(--s4); }
li::marker { color: var(--orange); }
.wrap { max-width: 68rem; margin-inline: auto; padding-inline: var(--s6); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Film grain: one small noise tile over the whole page at 5%, so flat color reads like printed stock. It never takes clicks. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip { position: absolute; left: var(--s6); top: calc(-1 * var(--s9)); z-index: 30; background: var(--ink); color: #fff; padding: var(--s5) var(--s6); }
.skip:focus { top: var(--s6); }

/* Hazard tape across the top, then a header that stays put so the menu and the button are always one tap away */
.stripe { height: var(--s4); background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--ink) 14px 28px); }
.bar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); padding-block: var(--s4); }
/* The brand grows to its one-line width when there's room. When there isn't, its name breaks at the space, never at the
   hyphen in Ride-Along, so the buttons stay on the first line. */
.brand { flex: 1 0 min-content; max-width: max-content; margin-right: auto; color: var(--ink); text-decoration: none; font: 700 var(--t0)/var(--lh-snug) var(--slab); letter-spacing: .14em; text-transform: uppercase; }
.brand-name, .brand-by { display: block; }
.brand-name > span { white-space: nowrap; }
.brand-by { margin-top: .2rem; font: 400 .6875rem/var(--lh-read) var(--sans); color: var(--steel); letter-spacing: 0; text-transform: none; white-space: nowrap; }
/* True Frontier logo in the "With Kevin Kirchner of" line: 12px tall (.75rem), Kevin 2026-10-20. */
.tf-logo { display: inline-block; height: .75rem; width: auto; margin-left: .2em; vertical-align: -.15em; }
.bar .btn { padding: var(--s4) var(--s5); white-space: nowrap; }

/* The main menu: Home, Problems, How it works, About. The orange underline marks the page you're on. */
.nav ul, .foot ul { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); list-style: none; margin: 0; padding: 0; }
.nav li, .foot li { margin: 0; }
.nav a { display: block; padding-block: var(--s4); color: var(--ink); font-weight: 700; line-height: var(--lh-snug); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline 3px var(--orange); text-underline-offset: .35em; }
/* The Menu button only shows on phones, and only when JavaScript can open it. Three bars, drawn with one line and two shadows. */
.nav-toggle {
  display: none; align-items: center; gap: var(--s4); cursor: pointer;
  font: 700 var(--t0)/var(--lh-snug) var(--sans); color: var(--ink);
  background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; padding: var(--s4) var(--s5);
}
.nav-toggle::before { content: ""; width: 1rem; height: 2px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
/* Open, the bars become a cross: the line turns one way and a second line, drawn by ::after, turns the other. */
.nav-toggle { position: relative; }
.nav-toggle[aria-expanded="true"]::before { box-shadow: none; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { content: ""; position: absolute; width: 1rem; height: 2px; background: currentColor; transform: rotate(-45deg); }

/* Buttons: a stamped plate. On hover a darker fill covers it. */
.btn {
  position: relative; isolation: isolate; overflow: hidden; display: inline-block;
  background: var(--orange); color: #fff; text-decoration: none;
  font: 700 var(--t0)/var(--lh-snug) var(--sans); padding: var(--s5) var(--s6);
  border: 2px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--orange-deep); transform: translateX(-101%); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:active { box-shadow: 1px 1px 0 var(--ink); }
.act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5) var(--s7); margin: var(--s7) 0 0; }

/* Rows: stacked on phones. From 48rem up, a grp-4 and a grp-5 track share the row with no gap between them. */
.row { display: flex; flex-wrap: wrap; }
.row > * { flex: 0 0 100%; min-width: 0; }
.top .col-5 > :last-child, .side > :last-child, .body > :last-child { margin-bottom: 0; }

/* The top: graph paper and the headline set big, with the top photo beside it. On wide screens it fills the screen and the text sits low and left. */
.top {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: var(--s8);
  background-color: var(--sheet);
  background-image:
    linear-gradient(rgba(29, 33, 38, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 33, 38, .07) 1px, transparent 1px);
  background-size: var(--s6) var(--s6);
  border-bottom: 2px solid var(--ink);
}
.top > .wrap { width: 100%; }
/* Every page but home: a short top, with its breadcrumbs over the headline */
.top.sub { padding-block: var(--s7); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s4); list-style: none; margin: 0 0 var(--s6); padding: 0; color: var(--steel); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: var(--s4); color: var(--steel); }
.crumbs a { color: var(--orange-deep); }
.top h1, .book h1 { max-width: 24ch; margin-bottom: var(--s5); }
.chalk { display: block; width: min(15rem, 55%); height: 6px; margin: 0 0 var(--s7); border-radius: 3px; background: var(--orange); }
.lead { line-height: var(--lh-read); color: var(--steel); max-width: 40rem; }
/* The timing note under the button: one plain line of body text, so the button stays the only accent up top */
.side { margin-top: var(--s7); padding-top: var(--s5); border-top: 2px solid var(--ink); }

/* Stock photos, on the same plate as Kevin's. aspect-ratio and object-fit crop each one to a golden rectangle,
   so its space is held before it loads. The plain credit sits under it. */
.photo { margin: 0 0 var(--s6); }
.top-photo { margin: var(--s7) 0 0; }
.photo img, .top-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 1.618034; object-fit: cover;
  background: var(--mist); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink);
}
/* Photo credits ("Photo by Name on Unsplash"): clearly small (11px) and muted, still readable. */
.photo figcaption, .top-photo figcaption, .panel-photo figcaption, .credit { display: block; font: 400 .6875rem/var(--lh-read) var(--mono); letter-spacing: .01em; color: var(--steel); margin-top: var(--s4); }
/* A problem photo comes in a <picture> (AVIF or WebP). Neither it nor its <source> adds a box, so the <img> lays out as before. */
picture { display: contents; }
picture source { display: none; }
/* Words only screen readers get, like which problem a "Read more" link opens */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Sections: a ruled row with the heading in the grp-4 track and the text in the grp-5 track */
.sec { padding-block: var(--s7); }
.sec .row { border-top: 2px solid var(--ink); padding-top: var(--s6); }
/* A list item that opens with bold gets the bold as its own line */
.body li > strong:first-child { display: block; font-family: var(--slab); line-height: var(--lh-snug); margin-bottom: var(--s4); }

/* "The rules it follows:" and the list under it, posted like a rules sheet */
.body .label { font: 700 var(--t0)/var(--lh-snug) var(--mono); letter-spacing: .08em; text-transform: uppercase; margin: var(--s7) 0 var(--s5); }
.label + ul { padding: var(--s6) var(--s6) var(--s6) var(--s7); background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink); }
.label + ul li + li { padding-top: var(--s4); border-top: 1.5px dashed var(--steel); }
.label + ul li:last-child { margin-bottom: 0; }

/* Three steps: numbered plates, stacked on phones, three across on wide screens */
.steps { list-style: none; counter-reset: step; display: flex; flex-wrap: wrap; row-gap: var(--s7); margin: var(--s7) 0 0; padding: 0; }
.steps > li { counter-increment: step; flex: 0 0 100%; margin: 0; }
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: var(--s8); height: var(--s8); margin-bottom: var(--s6);
  font: 700 var(--t2)/1 var(--slab); font-variant-numeric: lining-nums;
  color: #fff; background: var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--orange);
}
.steps strong { display: block; font: 700 var(--t1)/var(--lh-snug) var(--slab); margin-bottom: var(--s4); }

/* FAQ */
.faq details { background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; margin-bottom: var(--s4); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: var(--s5) var(--s8) var(--s5) var(--s6); font-weight: 700; line-height: var(--lh-snug); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: var(--s6); top: 50%; transform: translateY(-50%); font: 700 var(--t1)/1 var(--mono); color: var(--orange); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-inline: var(--s6); color: var(--steel); }

/* Kevin's photo is 1200px wide, shown at up to 600px so it stays sharp on high-density screens */
.portrait { margin: 0 0 var(--s6); }
.portrait img { display: block; width: 100%; max-width: 37.5rem; height: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink); }
.portrait figcaption { font: 700 var(--t0)/var(--lh-snug) var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: var(--s5); }
.portrait-small img { width: 9rem; height: auto; aspect-ratio: 1; object-fit: cover; }
.people { list-style: none; padding: 0; margin: 0; }
.people > li { display: flex; flex-direction: column; gap: var(--s6); margin-bottom: var(--s7); }
.people .portrait { flex: 0 0 9rem; margin: 0; }
.people > li > div { min-width: 0; }
.people > li > div > :last-child { margin-bottom: 0; }
/* A supplied photo's plain-text credit, under the person's card. Its file path breaks anywhere on a small phone. */
.people .credit { overflow-wrap: anywhere; }
.network a { color: var(--orange-deep); }
.eyebrow { margin: 0 0 var(--s4); font: 700 var(--t0)/var(--lh-snug) var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }

/* The price, set on a plate */
.price .row { padding: var(--s7) var(--s6); background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 8px 8px 0 var(--ink); }
.body > .label:first-child { margin-top: 0; }
/* In What it costs, "What's included" is a plain list, not a rules sheet */
#what-it-costs .label + ul { padding: 0 0 0 var(--s6); background: none; border: 0; box-shadow: none; }
#what-it-costs .label + ul li + li { padding-top: 0; border-top: 0; }
/* The launch price (offer.json): Kevin's launch line in one sentence, with the launch price a step bigger, in bold */
.offer { display: block; font: 400 var(--t1)/var(--lh-snug) var(--slab); }
.offer strong { font-size: var(--t2); line-height: var(--lh-tight); font-weight: 700; color: var(--orange-deep); }

/* The closing call, on safety yellow, in one full-width track */
.final { padding-block: var(--s8); }
.final .row { flex-wrap: wrap; padding: 0; border: 0; }
.final .row > * { flex-basis: 100%; max-width: 100%; padding: 0; }
.final { background: var(--yellow); border-top: 2px solid var(--ink); }
.final h2 { font-size: var(--t2); line-height: var(--lh-tight); max-width: 20ch; }
.final .body > p:first-child { line-height: var(--lh-read); max-width: 36rem; }
/* Orange text links fail contrast on the yellow (4.01:1), so links there are ink (8.90:1), still underlined (IS-CON-02) */
.final .body a:not(.btn), .final .side a { color: var(--ink); }

/* The /book page: the headline and one line in the grp-5 column, then the Calendly button and a short note on what
   Calendly collects. Nothing from Calendly loads until the button is clicked. */
.book { padding-block: var(--s7) var(--s8); }
.book .note { margin: var(--s6) 0 0; max-width: 36rem; color: var(--steel); }
.book .note a { color: var(--orange-deep); }

/* /privacy/ and /terms/: Legal's text in one readable column */
.legal .wrap > * { max-width: 40rem; }
.legal a { color: var(--orange-deep); }

/* The footer: the menu again, the booking link and the True Frontier credit */
.foot { background: var(--ink); color: var(--mist); padding-block: var(--s7); }
.foot nav { margin-bottom: var(--s6); }
.foot p { margin: 0; }
.foot a { color: #fff; }

/* Text links in the copy, and the "more" links that go to another page, like "See how it works" */
.body a:not(.btn), .side a { color: var(--orange-deep); }
.more a { font-weight: 700; color: var(--orange-deep); }
.more a::after { content: " \2192"; }

/* A problem page's related problems: a small photo of each beside its name */
.related { list-style: none; padding: 0; }
.related li { margin-bottom: var(--s6); }
.related a { display: flex; align-items: center; gap: var(--s6); font: 700 var(--t0)/var(--lh-snug) var(--slab); text-decoration: none; }
.related img {
  flex: 0 0 8rem; width: 8rem; height: auto; aspect-ratio: 1.5; object-fit: cover;
  background: var(--mist); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink);
}
.related a:hover img, .related a:focus-visible img { box-shadow: 4px 4px 0 var(--orange); }

/* One problem per screen, on the homepage and on /problems/: each panel is about a screen tall (never over 56rem) and short
   enough to fit under the header on a 375x667 phone. Phones get the photo on top in a wide, short crop (2:1, and 2.4:1 on
   short screens); from 48rem it sits beside the text, on alternating sides. */
.problems { padding-bottom: 0; }
.panel { display: flex; align-items: center; min-height: clamp(26rem, calc(100svh - var(--s9)), 56rem); padding-block: var(--s6); border-top: 2px solid var(--ink); }
.problems > .wrap + .panel { margin-top: var(--s7); }
.panel > .wrap { display: flex; flex-wrap: wrap; width: 100%; }
.panel-photo, .panel-text { flex: 0 0 100%; min-width: 0; }
.panel-photo { margin: 0 0 var(--s5); }
/* The frame is the plate and the crop, so motion.js can drift the photo inside it without moving anything around it. */
.panel-frame { overflow: hidden; aspect-ratio: 2; background: var(--mist); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink); }
.panel-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The counter, then a thin orange line to the end of the column. motion.js fills it as the panel scrolls into place. */
.panel .eyebrow { display: flex; align-items: center; gap: var(--s5); }
.panel-line { flex: 1; height: 2px; background: var(--orange); transform-origin: left center; }
.panel h3 { font: 700 var(--t1)/var(--lh-tight) var(--slab); margin: 0 0 var(--s5); text-wrap: balance; max-width: 24ch; }
.panel-text > p { max-width: 36rem; }
.panel-text > h3 + p { color: var(--steel); line-height: var(--lh-read); margin-bottom: var(--s5); }
.panel-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s4) var(--s7); margin: 0; }
.panel-more { font-weight: 700; color: var(--orange-deep); }
.panel-more::after { content: " \2192"; }
.panel-book { color: var(--ink); }
@media (max-width: 47.99rem) and (max-height: 45rem) {
  .panel { padding-block: var(--s5); }
  .panel-frame { aspect-ratio: 2.4; }
}

@media (min-width: 48rem) {
  .people > li { flex-direction: row; align-items: flex-start; }
  .wrap { padding-inline: var(--s7); }
  .row { flex-wrap: nowrap; }
  .col-4 { flex-basis: var(--grp-4); max-width: var(--grp-4); }
  .col-5 { flex-basis: var(--grp-5); max-width: var(--grp-5); }
  .head, .top .col-5 { padding-right: var(--s7); }
  .top { min-height: min(52rem, calc(100svh - var(--s9))); padding-block: var(--s9); }
  .top .col-5 { align-self: flex-end; }
  /* Beside the text, the top photo runs the full height of it, as a tall crop */
  .top-photo { margin: 0; display: flex; flex-direction: column; }
  .top-photo img { flex: 1 1 0; aspect-ratio: auto; }
  .final h2 { font-size: var(--t3); }
  .lead, .final .body > p:first-child { font-size: var(--t1); }
  /* Panels: the photo in a grp-5 track and the text in a grp-4 track, the photo on the right on every second one */
  .panel-photo { flex-basis: var(--grp-5); max-width: var(--grp-5); margin: 0; padding-right: var(--s7); }
  .panel-text { flex-basis: var(--grp-4); max-width: var(--grp-4); align-self: center; }
  .panel:nth-of-type(even) .panel-photo { order: 2; padding: 0 0 0 var(--s7); }
  .panel { padding-block: var(--s7); }
  .panel-frame { aspect-ratio: auto; height: clamp(20rem, calc(100svh - var(--s9) * 2.5), 36rem); }
  .panel h3 { line-height: var(--lh-snug); }
  .panel-text > h3 + p { margin-bottom: var(--s6); }
  /* /book with a problem: its photo beside the headline, at 3:2 */
  .book .col-5 { padding-right: var(--s7); }
  .book .top-photo { align-self: flex-start; }
  .book .top-photo img { flex: none; aspect-ratio: 1.5; }
  .sec { padding-block: var(--s8); }
  .book { padding-block: var(--s8) var(--s9); }
  .price .row { padding: var(--s8) var(--s7); }
  .final { padding-block: var(--s9); }
  .top.sub { min-height: 0; padding-block: var(--s8); }
}
@media (min-width: 64rem) {
  h2 { font-size: var(--t2); }
  .top h1 { font-size: var(--t3); }
  /* On every page but home the headline stays at t2, like the /book headline. A problem page's is the buyer's whole sentence. */
  .top.sub h1 { font-size: var(--t2); }
  .head > h2:only-child { position: sticky; top: var(--s9); }
  .steps { justify-content: space-between; }
  .steps > li { flex-basis: var(--grp-half-5); }
}
/* Phones and tablets: the brand, the button and the Menu button share the first line. The menu opens under them, full
   width. Below 64rem the Ride-Along brands and the full menu don't fit one line. */
@media (max-width: 63.99rem) {
  .bar .btn { order: 1; }
  .nav-toggle { order: 2; }
  .nav { order: 3; flex-basis: 100%; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav-toggle[aria-expanded="false"] ~ .nav { display: none; }
  .js .nav ul { flex-direction: column; gap: 0; border-top: 2px solid var(--ink); }
  .js .nav li + li { border-top: 1.5px dashed var(--steel); }
  .js .nav a { padding-block: var(--s5); }
}
@media (max-width: 39.99rem) {
  .bar .wrap { gap: var(--s4); }
  /* The header line is too narrow for all three at full size: the button reads "Book", the Menu button shows its bars,
     the buttons get a step smaller and the brand tightens its tracking. Screen readers still hear "Book a call" and "Menu". */
  .bar .btn-more, .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar .btn, .nav-toggle { padding-inline: var(--s4); }
  .nav-toggle { min-height: 2.75rem; }
  .brand-name { letter-spacing: .02em; }
  /* The brand shrinks a half-step (t0 / sqrt(PHI)) on the narrowest phones, so it stays on one line in Chrome and Safari
     and the header keeps its height. It's back to t0 by 444px (IS-CON-01). */
  /* The brand takes the room the two buttons leave (up to its one-line width), so the buttons never drop to a second row.
     "With Kevin Kirchner of" and the logo don't fit one line beside them, so the logo drops under the words. */
  .brand { flex: 1 1 0; min-width: min-content; font-size: clamp(.786rem, 3.6vw, 1rem); }
  .brand-by { max-width: 10rem; white-space: normal; }
}
@media (max-width: 34rem) {
  .act .btn { width: 100%; text-align: center; }
}

/* Motion. Every animation is in motion.js (GSAP), inside a gsap.context(): the top's entrance, the panels, the steps and
   related problems. Hover and press states change at once, with no CSS transition. CSS keeps only the panels' gentle snap,
   inside no-preference, so "reduce motion" turns it off (and motion.js runs no tweens then). Nothing here hides anything. */
@media (prefers-reduced-motion: no-preference) {
  /* Pages with panels snap to one only when you stop scrolling near it. Scrolling itself stays free. */
  html:has(.panel) { scroll-snap-type: y proximity; }
  .panel { scroll-snap-align: start; }
}
