/* Shared stylesheet for every valsier.com subpage: The Third Axis and the case
   studies both load it. Tokens mirror website/index.html, whose CSS is inline,
   so the subpages read as the same site.

   Was /third-axis/third-axis.css until 2026-08-22. It was renamed because the
   case studies are a separate section from the AI column and must not look
   like part of it; a case study page linking a stylesheet out of /third-axis/
   implied a relationship that does not exist. Section-specific rules belong in
   that section's own stylesheet, loaded second. */

:root {
  --ox:    #5C1A22;
  --br:    #9C6B3C;
  --bl:    #C4925A;
  --bp:    #F0E8DC;
  --iv:    #FAF7F2;
  --nb:    #2E0D12;
  --mw:    #4A2A30;
  --lw:    #8A6068;
  --pa:    #E0D4CC;
  --pa2:   #EAE0D8;
  --white: #FFFFFF;
}

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

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

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

body {
  font-family: 'Calibri', 'Gill Sans', 'Trebuchet MS', sans-serif;
  background: var(--iv);
  color: var(--mw);
  overflow-x: hidden;
}

.display { font-family: 'Trebuchet MS', 'Franklin Gothic Medium', sans-serif; font-weight: 700; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--bl); outline-offset: 3px; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--pa2); }
::-webkit-scrollbar-thumb { background: var(--br); border-radius: 3px; }

/* ── Nav ──
   Scoped to #navbar on purpose. A bare `nav` selector also catches the
   prev/next block at the foot of an essay and pins it to the top of the page. */
nav#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  background: rgba(46, 13, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(156, 107, 60, 0.25);
}

.nav-logo {
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: 5px;
  color: var(--iv); text-decoration: none;
}

.nav-links { display: flex; gap: 36px; list-style: none; flex-wrap: wrap; }

.nav-links a {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--pa); text-decoration: none; transition: color .2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--br); transition: width .25s ease;
}
.nav-links a:hover { color: var(--bl); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.current { color: var(--bl); }
.nav-links a.current::after { width: 100%; }

/* ── Hamburger toggle ──
   Ported from index.html on 2026-08-20. These pages carried the nav markup but
   never the toggle, so below 520px the links fell out as a raw stack across the
   top of the page. Keep in step with the landing page if that nav changes. */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle svg {
  width: 24px; height: 24px;
  stroke: var(--pa); stroke-width: 2; stroke-linecap: round; fill: none;
}
.nav-toggle:hover svg { stroke: var(--bl); }

@media (max-width: 800px) {
  nav#navbar { padding: 16px 24px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 520px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    top: 57px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(46, 13, 18, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--br);
    padding: 8px 0 12px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; font-size: 13px; }
  .nav-links a::after { display: none; }
}

/* ── Masthead ── */
.masthead {
  background: var(--nb);
  padding: 160px 40px 96px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--br);
}
.masthead::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(92,26,34,.35) 0%, transparent 70%);
  pointer-events: none;
}
.masthead-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; text-align: center; }

.eyebrow {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--br); margin-bottom: 22px;
}

.masthead h1 { font-size: clamp(44px, 8vw, 84px); color: var(--iv); line-height: 1.02; letter-spacing: -1px; }

.subline {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--bl); margin-top: 14px; letter-spacing: 1.5px;
}

.standfirst { color: var(--pa); font-size: 17px; line-height: 1.75; margin: 34px auto 0; max-width: 660px; }

.masthead-actions { margin-top: 38px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.btn {
  display: inline-block;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--nb); background: var(--br);
  padding: 15px 34px; text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--bl); transform: translateY(-1px); }

.cadence { font-size: 13px; color: var(--lw); letter-spacing: .5px; }

/* ── Archive list ── */
.archive-wrap { max-width: 860px; margin: 0 auto; padding: 80px 40px 110px; }
.archive-head { margin-bottom: 44px; }
.archive-head h2 { font-size: 28px; color: var(--ox); margin-bottom: 10px; }
.archive-head p { color: var(--lw); font-size: 15px; }

.cards { list-style: none; display: flex; flex-direction: column; gap: 22px; }

.card a {
  display: block; text-decoration: none; color: inherit;
  background: var(--white);
  border: 1px solid var(--pa2);
  border-left: 3px solid var(--br);
  padding: 30px 34px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card a:hover {
  border-left-color: var(--ox);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(92,26,34,.09);
}

.card-meta {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--br); margin-bottom: 12px;
}
.card h2 { font-size: 25px; color: var(--ox); line-height: 1.25; margin-bottom: 12px; }
.card p { color: var(--mw); font-size: 16px; line-height: 1.65; }

.readmore {
  display: inline-block; margin-top: 16px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--br);
}

.dot { margin: 0 8px; color: var(--pa); }

/* ── Essay ── */
.essay { padding: 130px 40px 100px; }
.essay-wrap { max-width: 720px; margin: 0 auto; }

.topnav {
  position: static;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 34px;
  border-bottom: 1px solid var(--pa2);
}

.backlink {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--br); text-decoration: none;
}
.backlink:hover { color: var(--ox); }

.topnav-arrows { display: flex; gap: 22px; }
.topnav-arrows a {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--lw); text-decoration: none; transition: color .2s;
}
.topnav-arrows a:hover { color: var(--ox); }

.essay .eyebrow { color: var(--br); margin-bottom: 16px; }
.essay h1 { font-size: clamp(32px, 5.4vw, 48px); color: var(--ox); line-height: 1.14; letter-spacing: -.5px; }

.byline {
  margin-top: 20px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 13px; letter-spacing: 1px; color: var(--lw);
}

.rule { height: 3px; width: 76px; background: var(--br); margin: 34px 0 40px; }

.prose p { font-size: 18.5px; line-height: 1.78; margin-bottom: 26px; color: var(--mw); }
.prose p:first-of-type { font-size: 20px; color: var(--ox); }
.prose em { font-style: italic; }
.prose strong { font-weight: 700; color: var(--ox); }
.prose blockquote {
  border-left: 3px solid var(--br);
  padding: 6px 0 6px 24px; margin: 32px 0; color: var(--lw); font-style: italic;
}
.prose h2, .prose h3 {
  font-family: 'Trebuchet MS', sans-serif; font-weight: 700;
  color: var(--ox); margin: 44px 0 16px; line-height: 1.3;
}
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 21px; }
.prose ul, .prose ol { margin: 0 0 26px 24px; }
.prose li { font-size: 18.5px; line-height: 1.75; margin-bottom: 10px; }
.prose a { color: var(--ox); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--br); }

/* ── Subscribe call to action ──
   Replaced the old .origin note on 2026-08-20. Growing the Substack list is
   the reason this column sits on the site, so it gets a real CTA. */
.subscribe {
  margin-top: 60px; padding: 40px 44px;
  background: var(--bp); border-top: 3px solid var(--br);
  text-align: center;
}
.sub-eyebrow {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--br); margin-bottom: 14px;
}
.sub-head {
  font-size: 30px; line-height: 1.2; color: var(--ox); margin-bottom: 14px;
}
.sub-body {
  font-size: 17px; line-height: 1.65; color: var(--mw);
  max-width: 30em; margin: 0 auto 28px;
}
.sub-btn {
  display: inline-block;
  background: var(--ox); color: var(--iv);
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: .6px;
  padding: 16px 44px; text-decoration: none;
  transition: background .2s, transform .2s;
}
.sub-btn:hover { background: var(--br); transform: translateY(-1px); }
.sub-alt { margin-top: 18px; font-size: 14px; }
.sub-alt a { color: var(--mw); text-decoration: underline; text-underline-offset: 3px; }
.sub-alt a:hover { color: var(--br); }

@media (max-width: 600px) {
  .subscribe { padding: 32px 22px; }
  .sub-head { font-size: 24px; }
  .sub-btn { display: block; padding: 16px 20px; }
}

.prevnext {
  position: static;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 18px;
  margin-top: 48px;
}
.prevnext .pn {
  text-decoration: none; color: var(--ox);
  border: 1px solid var(--pa2); background: var(--white);
  padding: 20px 24px; font-family: 'Trebuchet MS', sans-serif;
  font-size: 16px; line-height: 1.4; transition: border-color .2s, color .2s;
}
.prevnext .pn:hover { border-color: var(--br); }
.prevnext .pn span {
  display: block; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--br); margin-bottom: 8px;
}
.prevnext .next { text-align: right; }

/* centre link back to the archive */
.prevnext .archive {
  display: flex; flex-direction: column; justify-content: center;
  text-align: center; background: var(--bp); border-color: var(--bp);
  padding: 20px 30px; white-space: nowrap;
}
.prevnext .archive:hover { border-color: var(--br); color: var(--ox); }
.prevnext .archive span { margin-bottom: 6px; }

/* keeps the centre column centred when there is no previous or next */
.prevnext .spacer { border: 0; background: none; }

/* ── Footer ── */
footer { background: var(--nb); padding: 72px 40px 44px; text-align: center; }
.footer-wordmark { font-size: 24px; letter-spacing: 8px; color: var(--iv); }
.footer-tagline { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--br); margin-top: 10px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; margin: 34px 0 30px; }
.footer-links a {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pa); text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--bl); }
.footer-bottom {
  font-size: 13px; line-height: 1.8; color: var(--lw);
  border-top: 1px solid rgba(156,107,60,.2); padding-top: 26px; max-width: 720px; margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 780px) {
  nav { padding: 14px 22px; gap: 14px; flex-wrap: wrap; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 11px; letter-spacing: 1.4px; }
  .masthead { padding: 150px 24px 72px; }
  .archive-wrap { padding: 60px 24px 84px; }
  .card a { padding: 24px 24px; }
  .essay { padding: 132px 24px 80px; }
  .prose p { font-size: 17.5px; }
  .prose p:first-of-type { font-size: 18.5px; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { text-align: left; }
  .prevnext .archive { white-space: normal; }
  .prevnext .spacer { display: none; }
}
