/* marketing/templates/base.css
   Shared structural CSS for all splash sites. No hardcoded brand colors here —
   everything reads CSS custom properties defined per-site in theme.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  padding: 0.75em 1em;
  z-index: 1000;
}
.skip-link:focus {
  left: 1em;
  top: 1em;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1em;
}

/* Site header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg, var(--bg));
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;   /* seven nav items: wrap below the brand, never clip */
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
}
.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius, 8px);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  border-color: var(--accent);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-block { width: 100%; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}
/* .lead everywhere (interior page heroes included): never wider than ~62ch —
   a full-container measure is unreadable (issue #129). */
p.lead {
  font-size: 1.15rem;
  color: var(--fg-soft);
  max-width: 62ch;
}
.hero-copy p.lead { max-width: 46ch; }
/* A hero section directly above closely-related content (pricing): keep the
   top breathing room, drop the bottom so no dead band opens up between the
   subhead and what it introduces. */
.hero-flush { padding-bottom: clamp(1rem, 2vw, 1.5rem); }

/* Feature grid */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.card {
  background: var(--card-bg, var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  padding: 1.75rem;
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--fg-soft); margin-bottom: 0; }

/* Forms */
.lead-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.lead-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.85em 1em;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--line);
  background: var(--input-bg, var(--bg));
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-body);
  min-width: 0;
}
.lead-form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-note {
  font-size: 0.85rem;
  color: var(--fg-soft);
  margin-top: 0.6em;
}
.form-status {
  margin-top: 0.75em;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.2em;
}
.form-status[data-state="ok"] { color: var(--ok, #2f855a); }
.form-status[data-state="err"] { color: var(--err, #c0392b); }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.pricing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  padding: 2rem;
  background: var(--card-bg, var(--bg));
  display: flex;
  flex-direction: column;
}
.pricing-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.directory-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  grid-column: 1 / -1;   /* owner call: the featured network owns the full top row */
}
.pricing-card ul {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  flex: 1;
}
.pricing-card li {
  padding: 0.4em 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--fg-soft);
}
.pricing-card li:first-child { border-top: none; }
.pricing-tag {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--fg-soft);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;   /* eight links now — never force a horizontal scroll */
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.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;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-head { max-width: 62ch; margin: 0 auto 2.5rem; }
.section-head.left { margin-left: 0; }

@media (max-width: 640px) {
  .site-header .nav-links { gap: 1rem; }
}
@media (max-width: 560px) {
  .site-header .container { flex-wrap: wrap; }
  .site-header .nav-links { width: 100%; flex-wrap: wrap; }
}

/* --- Collapsed mobile header (issue #129) ---
   Only headers rendered with nav_collapse (trackformance) carry
   .site-header-collapse. Above the breakpoint: the normal horizontal nav.
   Below it: brand + the CTA + a hamburger; the remaining links live in a
   <details> drawer, so the collapse works with no JavaScript. An 8-link
   wrapping sticky header was covering ~22% of a phone screen. */
.nav-mobile { display: none; }
@media (max-width: 900px) {
  .site-header-collapse .nav-desktop { display: none; }
  .site-header-collapse .container { flex-wrap: nowrap; }
  .site-header-collapse .nav-mobile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
  }
  .site-header-collapse .nav-mobile .btn {
    padding: 0.6em 1.05em;
    font-size: 0.9rem;
  }
  .nav-drawer { position: relative; }
  .nav-drawer summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    background: var(--card-bg, var(--bg));
  }
  .nav-drawer summary::-webkit-details-marker { display: none; }
  .nav-drawer[open] summary { border-color: var(--accent); }
  .nav-burger { display: block; width: 1.15rem; }
  .nav-burger span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: var(--fg);
  }
  .nav-drawer > nav {
    position: absolute;
    right: 0;
    top: calc(100% + 0.7rem);
    min-width: 12rem;
    padding: 0.4rem 1.25rem;
    background: var(--card-bg, var(--bg));
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
    z-index: 200;
  }
  .site-header .nav-drawer .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: auto;
    gap: 0;
  }
  .nav-drawer .nav-links li + li { border-top: 1px solid var(--line); }
  .nav-drawer .nav-links a {
    display: block;
    padding: 0.65em 0;
    font-size: 1rem;
  }
}

/* --- Ten-Second Slab cadence divider (issue #129 redesign, owner pick
   2026-08-22): the 10-seconds-up / 10-seconds-down rep cadence rendered as a
   20-tick progress track whose fill stops hard at the turn (50%). Used as a
   section divider on both sites; build.py emits the markup
   (render_cadence_divider). All colors come from theme variables so each
   site's theme.css sets the palette: --accent fills the "up" half,
   --cadence-rest tints the "down" half, --cadence-tick cuts the
   one-per-second marks. Decorative (aria-hidden in the markup). --- */
.cadence { padding: 2.2rem 0 2.6rem; }
.cadence-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-bottom: 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.cadence-labels .l { color: var(--fg-soft); }
.cadence-labels .r { color: var(--fg); }
.cadence-labels .r em { font-style: normal; color: var(--accent); }
.cadence-labels .r em.b { color: var(--blue, var(--accent)); }
.cadence-bar {
  position: relative;
  height: 14px;
  background: var(--cadence-track, var(--card-bg, var(--bg)));
  border: 1px solid var(--line);
}
.cadence-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: linear-gradient(90deg,
    var(--accent-deep, var(--accent)),
    var(--accent) 55%,
    var(--accent-hi, var(--accent)));
}
.cadence-fill::after {
  /* the turn: a bright marker where up becomes down */
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  bottom: -5px;
  width: 3px;
  background: var(--fg);
}
.cadence-rest {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  background: var(--cadence-rest, transparent);
}
.cadence-ticks {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0,
    transparent calc(5% - 1px),
    var(--cadence-tick, rgba(0, 0, 0, 0.5)) calc(5% - 1px),
    var(--cadence-tick, rgba(0, 0, 0, 0.5)) 5%);
}
.cadence-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
}

/* --- Checkmark value bullets (coach partners; issue #129: these carry no
   numbers, so they read as value statements, not a dressed-up stat row) --- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 62ch;
}
.check-list li {
  position: relative;
  padding-left: 1.9em;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg-soft);
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}

/* --- Brand: PerformanceTracker - owner ruling 2026-08-21 (final). ---
   The lockup, stacked and left-aligned:

     line 1   TRACKFORMANCE, all caps, tracked out so the letters span EXACTLY
              the width of the badge below - first letter flush to the badge's
              left edge, last letter flush to its right edge.
     line 2   the badge - "Performance" on orange, "Tracker" on blue, white
              700 text, SHARP 90-degree corners, NO gap: the two boxes touch
              on a single seam. That seam is the identity; keep it crisp.

   How line 1 gets its width: build.py emits one <span> per letter and this
   rule distributes them with justify-content:space-between. The badge is the
   widest child of the column, so it sets the column width and the caps line
   stretches to match it - at any font-size, in any font, with no hand-tuned
   letter-spacing to re-tune. (letter-spacing is deliberately 0: it also adds
   space AFTER the final letter, which would break the flush-right edge.)

   Everything below is em-based: set .brand-stacked{font-size} and the whole
   lockup scales as one piece (header, footer, hero). */
:root {
  --brand-blue: #1e4fd8;
  --brand-orange: #e26b2a;
}
.brand-stacked {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;   /* the caps line takes the badge's width */
  gap: 0.2em;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}
/* Line 1 - the caps: SQUAT (owner ruling) - oversized, heavy, vertically
   compressed so it reads as a low slab sitting on the badge. */
.brand-caps {
  display: flex;
  justify-content: space-between;
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 900;
  font-size: 1.3em;
  line-height: 0.8;
  letter-spacing: 0;
  transform: scaleY(0.72);
  transform-origin: 50% 100%;
  margin-top: -0.24em;
  color: var(--fg);
  /* Guard: width:0 keeps this line out of the column's intrinsic width, so the
     BADGE always decides how wide the lockup is; min-width:100% then snaps the
     line back out to that width. Without it, a fallback font with wide caps
     could make line 1 the wider child and the badge would stop being the
     measure - which is the one thing the ruling does not allow. */
  width: 0;
  min-width: 100%;
}
.brand-caps > span { display: block; }
/* Line 2 - the badge. align-items:stretch keeps both boxes exactly the same
   height whatever glyphs they contain, so the top and bottom edges of the
   badge read as two unbroken straight lines. */
/* Line 2 - the badge: ONE word (owner ruling), the orange/blue split painted
   BEHIND the letters with a hard gradient stop, so a gap at the seam is
   structurally impossible. --brand-seam tunes where the split falls (it should
   sit in the natural letter gap between the "e" and the "T"). */
.brand-badge {
  display: block;
  font-size: 1.18em;
  background-image: linear-gradient(90deg,
    var(--brand-orange) var(--brand-seam, 61.5%),
    var(--brand-blue) var(--brand-seam, 61.5%));
  padding: 0.24em 0.42em 0.3em;
  border-radius: 0;   /* sharp corners - owner ruling, do not round */
}
.brand-badge .brand-word {
  display: block;
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #ffffff;
}
@media (max-width: 420px) {
  .brand-stacked { font-size: 0.88rem; }
}

/* --- Vertical timeline (history.html) --- */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.4em;
  bottom: 0.4em;
  left: 0;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.25rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  top: 0.3em;
  left: -2rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline-year {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3em;
}
.timeline-item h3 { margin-bottom: 0.35em; }
.timeline-item p { color: var(--fg-soft); margin-bottom: 0; }

/* --- Numbered benefit list (why.html): the same vertical-line timeline,
   with a numbered circular marker standing in for the dot + year label.
   The positioning trick (left offset equal to the line's own left:0, then
   transform:translateX(-50%) to recenter) is unchanged from .timeline-marker,
   so this works at any marker size without touching .timeline's padding. --- */
.timeline-marker-num {
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-contrast, #fff);
}
.benefit-list p { font-size: 1.05rem; }
/* An item's optional outbound citations (see render_benefit_list) stack as
   their own meta/link pairs below the body copy instead of running inline. */
.benefit-list .card-meta { margin-top: 0.75em; }
.benefit-list .card-link { display: block; margin-bottom: 0.25em; }

/* --- Link cards: card grid where each card also links out (books, podcasts) --- */
.card-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-soft);
  margin-bottom: 0.6em;
}
.card-link {
  display: inline-block;
  margin-top: 0.5em;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* --- Studio directory (studios.html): a card that holds several short
   address/phone/contact/pricing lines rather than one paragraph. .card-line
   reuses .card-meta's small/soft treatment but left-aligned as stacked rows
   instead of a single label, and drops the bottom margin between them so
   the block reads as one compact record. --- */
.directory-card h3 { margin-bottom: 0.5em; }
.directory-card .card-meta { margin-bottom: 0.75em; }
.card-line {
  font-size: 0.92rem;
  color: var(--fg-soft);
  margin: 0 0 0.35em;
  /* long single tokens (studio emails) must break, not force the page wide */
  overflow-wrap: anywhere;
}
.card-line a { color: var(--accent); text-decoration: none; font-weight: 600; }
.card-line a:hover { text-decoration: underline; }
.card-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--fg-soft);
  margin: 0.5em 0 0;
}
.state-group { margin-bottom: 3rem; }
.state-group:last-child { margin-bottom: 0; }
.state-group-heading {
  font-size: 1.05rem;
  padding-bottom: 0.5em;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

/* --- Simple list (articles) --- */
.simple-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.simple-list li {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.simple-list li:first-child { border-top: none; padding-top: 0; }
.simple-list .item-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--fg);
}
.simple-list .item-title:hover { color: var(--accent); }
.simple-list .card-meta { margin: 0.3em 0 0.5em; }
.simple-list p.takeaway { color: var(--fg-soft); margin-bottom: 0; }
