/* Hyper Endurance Fitness — Articles section
   Self-contained. Matches brand tokens used across the site and the
   Hyper Intelligence assistant. */

:root {
  --ink: #0c0d0e;
  --ink-raised: #141516;
  --gold: #c3a465;
  --gold-light: #dcc385;
  --gold-deep: #ad9055;
  --text: #f6f6f7;
  --muted: #9a9ca1;
  --muted-dim: #8e9297;
  --hairline: rgba(255, 255, 255, 0.13);
  --radius: 16px;
  --ease: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --measure: 68ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.brand-sub {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-top: 3px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .brand-name { font-size: 12px; }
  .brand-sub { font-size: 8px; letter-spacing: 0.14em; }
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > * + * { margin-left: 26px; }
@supports (gap: 1px) { .site-nav > * + * { margin-left: 0; } }

.site-nav a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--ease);
}

.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }

.nav-join {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(195, 164, 101, 0.5);
  color: var(--gold) !important;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.nav-join:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink) !important;
}

/* Mobile nav collapse lives in /assets/site-nav.css, shared with the other
   pages that use this header. */

/* ---------- Index hero ---------- */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}

.index-hero { padding: 96px 0 56px; border-bottom: 1px solid var(--hairline); }

.index-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.index-hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- Article list ---------- */

.article-list { padding: 8px 0 96px; }

.article-card {
  display: block;
  text-decoration: none;
  padding: 40px 0;
  border-bottom: 1px solid var(--hairline);
  transition: opacity var(--ease);
}

.article-card:hover { opacity: 0.72; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 14px;
}

.card-meta > * + * { margin-left: 16px; }
@supports (gap: 1px) { .card-meta > * + * { margin-left: 0; } }

.card-meta .tag { color: var(--gold); }

.article-card h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.article-card p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 60ch;
}

.read-on {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.empty-note {
  padding: 40px 0 0;
  color: var(--muted-dim);
  font-size: 14px;
}

/* ---------- Article page ---------- */

.article-head {
  padding: 88px 0 40px;
  border-bottom: 1px solid var(--hairline);
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  text-decoration: none;
  transition: color var(--ease);
}

.back-link:hover { color: var(--gold); }

.article-head h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 20ch;
}

.article-standfirst {
  margin: 0;
  max-width: 54ch;
  font-size: 19px;
  color: var(--muted);
}

.article-body { padding: 48px 0 0; }
.article-body .takeaways { max-width: var(--measure); }
.chapter-body { max-width: var(--measure); }

.article-body p { margin: 0 0 26px; }

.article-body h2 {
  margin: 56px 0 20px;
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-body strong { color: var(--text); font-weight: 600; }

.lead { font-size: 20px; color: var(--text); }

.pull {
  margin: 44px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--gold);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.steps { margin: 0 0 26px; padding: 0; list-style: none; }

.steps li {
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.steps li:first-child { border-top: 1px solid var(--hairline); }
.steps li strong { display: block; margin-bottom: 8px; color: var(--gold-light); }


/* ---------- Reading progress ---------- */

.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 60;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transition: width 120ms linear;
}

/* ---------- Key takeaways ---------- */

.takeaways {
  margin: 0 0 64px;
  padding: 30px 32px;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  background: #141516;
}

.takeaways h2 {
  margin: 0 0 18px !important;
  font-size: 11px !important;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600 !important;
}

.takeaways ul { margin: 0; padding: 0; list-style: none; }

.takeaways li {
  position: relative;
  padding: 0 0 12px 22px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.takeaways li:last-child { padding-bottom: 0; }

.takeaways li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 1px;
  background: var(--gold);
}

/* ---------- Chapters ---------- */

.chapter {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 40px;
  padding: 52px 0;
  border-top: 1px solid var(--hairline);
}

/* The chapter marker. It was 10.5px at light weight in the dimmest grey
   on the page, which is three things working against legibility at once.
   Larger, heavier, tighter tracking and a brighter grey, with the numeral
   picked out in gold so the eye has something to anchor on. */
.chapter-label {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
  padding-top: 8px;
  position: sticky;
  top: 104px;
  align-self: start;
}

.chapter-body > *:first-child { margin-top: 0; }
.chapter-body h2 { margin-top: 0 !important; }
.chapter-body > *:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .chapter { grid-template-columns: 1fr; gap: 14px; padding: 40px 0; }
  .chapter-label { position: static; padding-top: 0; }
}

/* ---------- Numbered practice cards ---------- */

.practice { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: practice; }

.practice li {
  counter-increment: practice;
  position: relative;
  padding: 24px 0 24px 58px;
  border-top: 1px solid var(--hairline);
}

.practice li:last-child { border-bottom: 1px solid var(--hairline); }

.practice li::before {
  content: counter(practice, decimal-leading-zero);
  position: absolute;
  left: 0; top: 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.practice strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17.5px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.practice span { color: var(--muted); font-size: 16px; }

@media (max-width: 620px) {
  .practice li { padding-left: 44px; }
}

/* ---------- Callout ---------- */

.callout {
  margin: 32px 0;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: #141516;
  border: 1px solid var(--hairline);
  font-size: 16.5px;
  color: var(--muted);
}

.callout strong { color: var(--gold-light); }

/* ---------- Article foot ---------- */

.article-foot {
  padding: 0 0 96px;
  max-width: var(--measure);
}

.next-up {
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
}

.next-up p.eyebrow { margin-bottom: 16px; }

.next-up a {
  display: block;
  padding: 16px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid var(--hairline);
  transition: color var(--ease);
}

.next-up a:hover { color: var(--gold); }

/* ---------- CTA ---------- */

.article-cta {
  margin: 72px 0 96px;
  border-top: 1px solid rgba(195, 164, 101, 0.30);
  padding: 44px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #191a1c 0%, #141516 55%, rgba(195, 164, 101, 0.05) 100%);
}

.article-cta h2 { margin: 0 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.article-cta p { margin: 0 0 14px; color: var(--muted); max-width: 58ch; }
.article-cta .price { color: var(--text); font-size: 15px; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cta-actions > * + * { margin-left: 14px; }
@supports (gap: 1px) { .cta-actions > * + * { margin-left: 0; } }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.btn-primary {
  background: linear-gradient(180deg, #dcc385 0%, #c3a465 50%, #ad9055 100%);
  color: #16130c;
  border: 1px solid #c3a465;
}
.btn-primary:hover { background: linear-gradient(180deg, #e6d09a 0%, #cfb173 50%, #bb9d62 100%); border-color: #dcc385; }

.btn-ghost { border: 1px solid var(--hairline); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 620px) {
  .article-cta { padding: 30px 24px; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 64px;
  background: var(--ink-raised);
}

.footer-line {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin: 0 0 12px;
}

.footer-tagline { margin: 0 0 32px; color: var(--muted); font-size: 15px; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { margin: 0 28px 12px 0; }
@supports (gap: 1px) { .footer-nav a { margin: 0; } }

.footer-nav a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-nav a:hover { color: var(--gold); }

.footer-location { margin: 20px 0 0; font-size: 13.5px; color: var(--muted-dim); }
.footer-contact { margin: 6px 0 0; font-size: 13.5px; color: var(--muted-dim); }
.footer-contact a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
.footer-contact a:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* inline link tap targets on touch screens (WCAG 2.5.8) */
@media (max-width: 760px) {
  .footer-contact a,
  .back-link,
  .next-up a { display: inline-flex; align-items: center; min-height: 30px; }
}

/* Body typography: light text on near black optically gains weight, so
   long form copy runs at 300 with a tighter measure. */
.article-body p,
.article-body li,
.chapter-body p,
.article-standfirst {
  font-weight: 420;
  letter-spacing: -0.003em;
}
.chapter-body p { font-size: 16px; line-height: 1.8; }
.article-standfirst { font-size: 17px; line-height: 1.7; }
@media (max-width: 760px) {
  .chapter-body p { font-size: 15.5px; line-height: 1.76; }
  .article-standfirst { font-size: 16px; }
}

/* Readable copy sits near white; grey reads as blended on this background. */
.article-standfirst,
.callout p,
.takeaways li,
.practice span,
.tx-note { color: #e9ebec; }

/* Body copy runs on Source Serif 4, self hosted from /assets/fonts/.
     It replaced a system stack that resolved to SF Pro on Apple devices
     and fell through to Segoe UI everywhere else, so half the audience
     was seeing a different site. Controls stay on Inter. */
:root{
  --font-read: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
             Helvetica, Arial, sans-serif;
}
/* Everything a person reads on an article page, including the index
   hero and the empty state note, runs on the reading face. */
p, li, dd, dt, blockquote, figcaption,
.article-standfirst, .chapter-body p, .chapter-body li,
.callout p, .takeaways li, .practice span, .practice strong,
.article-card p, .tx-note, .empty-note { font-family: var(--font-read); }

/* Controls, labels and metadata stay on the interface face. */
label, input, textarea, select, button, summary,
.btn, .btn-primary, .btn-ghost, .nav-join,
.card-meta, .card-meta span, .tag, .eyebrow, .chapter-label,
.read-on, .back-link, .footer-nav a, .site-nav a,
.brand-name, .brand-sub, .footer-line { font-family: var(--font-ui); }


/* ---------- Micro typography ----------------------------------------
   Small uppercase text is where a dark site either looks expensive or
   looks cheap. Weight and tracking do more work here than size does:
   light weight at ten pixels under wide tracking is what made the
   original labels hard to read.
   -------------------------------------------------------------------- */

.chapter-num {
  color: var(--gold);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.chapter-sep {
  color: var(--gold-soft, rgba(195,164,101,0.55));
  padding: 0 2px 0 1px;
}

/* Eyebrows, tags and metadata all sit on the interface face at a weight
   that survives being small. */
.eyebrow, .tag, .card-meta, .card-meta span, .read-on, .back-link {
  font-family: var(--font-ui);
  font-weight: 500;
}

.eyebrow, .tag {
  letter-spacing: 0.14em;
  font-size: 11px;
}

.card-meta span { letter-spacing: 0.06em; }

.tag { color: var(--gold); }

/* The date and read time sat at the same weight and colour as the tag,
   so the eye had no order to follow. The tag leads, the rest supports. */
.card-meta span:not(.tag) { color: var(--muted); font-weight: 400; }

.back-link { letter-spacing: 0.06em; }

/* Footer micro text. Same problem, same treatment. */
.footer-line { font-weight: 500; letter-spacing: 0.12em; color: var(--muted); }
.footer-tagline, .footer-location, .footer-contact { color: var(--muted); }

/* The menu button had outline:none with nothing put back, so a keyboard
   user could not see where they were. */
.nav-toggle:focus-visible{
  outline:2px solid var(--gold, #c3a465);
  outline-offset:3px;
  border-radius:8px;
}
