/* ==========================================================================
   Optimistically Pragmatic — design system
   Warm paper + warm ink. Fraunces display over Inter body, Newsreader prose.
   One amber glow moment per viewport. Typography-first everywhere else.
   ========================================================================== */

:root {
  --paper: #FBF7F0;
  --paper-raised: #F4EEE3;
  --ink: #23201A;
  --ink-secondary: #57534A;
  --ink-tertiary: #8A8375;
  --amber: #F5A623;
  --amber-deep: #B45309;
  --sky: #2F6F8F;
  --line: #E5DDCE;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-prose: "Newsreader", Georgia, serif;

  --measure: 65ch;
  --content-width: 1140px;
  --prose-width: 720px;

  --space-section: clamp(4rem, 10vw, 10rem);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191611;
    --paper-raised: #232019;
    --ink: #EDE7DB;
    --ink-secondary: #B0A896;
    --ink-tertiary: #8A8375;
    --amber-deep: #F5A623;
    --sky: #7FB3CC;
    --line: #37322A;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--amber); color: #23201A; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60, "WONK" 0;
  font-weight: 580;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

a { color: var(--amber-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; }

.container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em { color: var(--amber-deep); font-style: italic; }

.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 1.75rem); align-items: center; }
.site-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 560px) {
  .site-header .container { height: auto; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding-block: 0.75rem; }
  .wordmark { font-size: 1.05rem; }
  .site-nav { gap: 1.1rem; }
  .site-nav a { white-space: nowrap; font-size: 0.88rem; }
}

/* Reading progress hairline (manifesto) */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--amber-deep);
  z-index: 60;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(5rem, 14vw, 11rem) clamp(4rem, 10vw, 8rem);
  overflow: hidden;
}

.hero .glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 130%;
  background: radial-gradient(ellipse 55% 45% at 50% 32%,
    color-mix(in srgb, var(--amber) 16%, transparent),
    color-mix(in srgb, var(--amber) 5%, transparent) 55%,
    transparent 75%);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  max-width: 18ch;
  margin-inline: auto;
}
.hero h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  color: var(--amber-deep);
}

.hero .kicker {
  position: relative;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 1.5rem;
}

.hero .sub {
  position: relative;
  max-width: 52ch;
  margin: 1.75rem auto 2.5rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-secondary);
}

.cta-row { position: relative; display: flex; gap: 1.25rem; justify-content: center; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--amber-deep);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px color-mix(in srgb, var(--amber-deep) 30%, transparent); }
@media (prefers-color-scheme: dark) { .btn { color: #191611; } }

.text-link { font-weight: 500; font-size: 0.95rem; }

/* --- Thesis / standfirst ------------------------------------------------ */

.standfirst {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-prose);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
}
.standfirst strong { color: var(--amber-deep); font-weight: 600; }

/* --- Sections ----------------------------------------------------------- */

.section { padding-block: var(--space-section); }
.section-alt { background: var(--paper-raised); }

.section-head { max-width: 46ch; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head .eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 0.75rem;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.section-head p { color: var(--ink-secondary); font-size: 1.08rem; }

/* --- Journey timeline ---------------------------------------------------- */

.journey { position: relative; }

.journey-track {
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.journey-track .fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  background: var(--amber-deep);
  transition: height 0.1s linear;
}

.stage {
  position: relative;
  padding-left: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
.stage:last-child { padding-bottom: 0; }

.stage-node {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  transition: border-color 0.4s ease, background 0.4s ease;
}
.stage.is-visible .stage-node { border-color: var(--amber-deep); }
.stage-breakthrough.is-visible .stage-node {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--amber) 18%, transparent);
}

.stage-numeral {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60, "WONK" 0;
  font-weight: 600;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 1;
  color: color-mix(in srgb, var(--amber) 32%, transparent);
  user-select: none;
}

.stage h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0.25rem 0 0.85rem;
}

.stage .stage-anchor {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 0.35rem;
}

.stage p { max-width: 58ch; color: var(--ink-secondary); }
.stage .stage-practice {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  max-width: 58ch;
  background: var(--paper-raised);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.stage .stage-practice strong { color: var(--amber-deep); font-weight: 600; }
.stage .stage-cite { margin-top: 0.9rem; font-size: 0.88rem; color: var(--ink-tertiary); max-width: 58ch; }
.stage .stage-cite a { color: var(--sky); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .bento-cell { transition: none; }
}

/* --- Pull quote band ------------------------------------------------------ */

.pullquote-band { text-align: center; }
.pullquote-band blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.3;
  max-width: 26ch;
  margin: 0 auto 1.5rem;
}
.pullquote-band cite { font-family: var(--font-body); font-style: normal; font-size: 0.95rem; color: var(--ink-tertiary); }

/* --- Bento grid (influences / research) ----------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.bento-cell {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.section-alt .bento-cell { background: var(--paper); }
.bento-cell:hover { transform: translateY(-2px); border-color: var(--amber-deep); }
.bento-cell.featured { grid-column: span 2; }
@media (max-width: 720px) { .bento-cell.featured { grid-column: span 1; } }

.bento-cell .cell-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 0.6rem;
}
.bento-cell h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.bento-cell p { color: var(--ink-secondary); font-size: 0.97rem; }
.bento-cell .cell-source { margin-top: 1rem; font-size: 0.88rem; }
.bento-cell .cell-source a { color: var(--sky); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--sky);
  border: 1px solid color-mix(in srgb, var(--sky) 35%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* --- Prose (manifesto / essays) ------------------------------------------- */

.prose {
  max-width: var(--prose-width);
  margin-inline: auto;
  font-family: var(--font-prose);
  font-size: clamp(1.15rem, 1.5vw, 1.28rem);
  line-height: 1.7;
}
.prose > * + * { margin-top: 1.4em; }
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-top: 2.2em;
}
.prose h2 .sec-num { color: var(--amber-deep); font-size: 0.6em; vertical-align: 0.5em; margin-right: 0.6em; letter-spacing: 0.05em; }
.prose p { color: var(--ink); }
.prose .lede::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding-right: 0.12em;
  color: var(--amber-deep);
}
.prose blockquote {
  border-left: 3px solid var(--amber);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--ink-secondary);
}
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.5em; }
.prose .cite-note { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-tertiary); }

.page-hero {
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem);
}
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 20ch; margin-inline: auto; }
.page-hero .kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 1.25rem;
}
.page-hero .sub { max-width: 54ch; margin: 1.5rem auto 0; color: var(--ink-secondary); font-size: 1.1rem; }

/* --- References list ------------------------------------------------------ */

.ref-list { max-width: var(--prose-width); margin-inline: auto; list-style: none; }
.ref-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
  color: var(--ink-secondary);
}
.ref-list li strong { color: var(--ink); font-weight: 600; }
.ref-list li a { color: var(--sky); }

/* --- Coaching page --------------------------------------------------------- */

.coach-move {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}
.coach-move:last-of-type { border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .coach-move { grid-template-columns: 1fr; gap: 0.75rem; } }

.coach-move .learner .move-label,
.coach-move .coach .move-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.coach-move .learner .move-label { color: var(--ink-tertiary); }
.coach-move .coach .move-label { color: var(--amber-deep); }

.coach-move h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.coach-move h3 .n { color: var(--amber-deep); font-size: 0.85em; margin-right: 0.5rem; }
.coach-move p { color: var(--ink-secondary); font-size: 0.98rem; }

/* Shareable maxim cards */
.maxims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.maxim {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}
.section-alt .maxim { background: var(--paper); }
.maxim blockquote {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 70, "WONK" 0;
  font-size: 1.35rem;
  line-height: 1.35;
}
.maxim figcaption { font-size: 0.85rem; color: var(--ink-tertiary); }
.maxim figcaption a { color: var(--sky); }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  margin-top: var(--space-section);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .tagline { font-family: var(--font-display); font-size: 1.2rem; max-width: 24ch; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer a { color: var(--ink-secondary); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--amber-deep); }
.site-footer .fineprint { width: 100%; margin-top: 1.5rem; font-size: 0.82rem; color: var(--ink-tertiary); }
