/* Whitney case rewrites — V4 brand stylesheet
   Tokens lifted from ~/dev/whitneyesque.github.io/public/style.css (V4).
   When V4 tokens change, sync them here. */

:root {
  /* V4 palette */
  --cream:        #F4EDE4;
  --cream-deep:   #EBE1D4;
  --warm-white:   #FAF7F3;
  --charcoal:     #2A2520;
  --charcoal-mid: #4A443D;
  --charcoal-soft:#6B6560;
  --gold:         #C8943E;
  --gold-light:   #D4A85A;
  --gold-pale:    #F0E4CC;
  --gold-text:    #8A6820;
  --sage:         #8B9A7E;
  --sage-light:   #D4DEC9;
  --sage-text:    #4A5C3F;
  --rust:         #B85C3A;
  --ink:          #1A1714;

  /* V4 typography */
  --font-display: 'Petrona', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', ui-monospace, monospace;

  /* V4 spacing */
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 40px;
  --sp-6: 48px; --sp-8: 64px; --sp-10: 80px; --sp-12: 96px;
  --sp-16: 128px; --sp-20: 160px;
}

html, body {
  margin: 0;
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--rust); }

/* Nav band */
.nav {
  height: 72px;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--cream-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  background: var(--warm-white);
}
.nav .mark {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--charcoal);
  font-weight: 700;
  font-style: italic;
}
.nav .mark em { color: var(--gold-text); }
.nav .nav-r { display: flex; gap: var(--sp-4); align-items: center; }
.nav .nav-r a { text-decoration: none; color: var(--charcoal-soft); }
.nav .nav-r a:hover { color: var(--charcoal); }

/* Type scale — V4 register */
h1, h2, h3, h4, p, ul, ol, dl, blockquote { margin: 0; }
h1 {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--charcoal);
}
h1 em { font-style: italic; font-weight: 700; color: var(--gold-text); }
h2 {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  font-weight: 700;
  color: var(--charcoal);
}
h2 em { font-style: italic; font-weight: 700; color: var(--gold-text); }
h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 400;
}
.sub-banner {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.35;
  color: var(--charcoal-mid);
  font-weight: 400;
  font-style: italic;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
}
.meta-val {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--charcoal);
  font-weight: 400;
  margin-top: 4px;
}
.body-text {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--charcoal);
}
.body-text p + p { margin-top: var(--sp-3); }
.body-text strong { font-weight: 700; color: var(--charcoal); }
.body-text em { font-style: italic; }
.caption {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--charcoal-soft);
  line-height: 1.5;
  margin-top: var(--sp-1);
}
.pull {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.35;
  font-style: italic;
  color: var(--charcoal);
  font-weight: 400;
}
.pull em { color: var(--gold-text); }

/* Placeholder blocks (for missing assets — soft V4 register, not harsh wireframe stripes) */
.gb {
  background: var(--gold-pale);
  border: 1px dashed var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-4);
}
.gb .gb-label {
  background: var(--warm-white);
  padding: 6px 12px;
  border: 1px solid var(--gold);
  max-width: 80%;
}
.gb.solid { background: var(--cream-deep); border-style: solid; }

/* Page layout — long-form case */
.case-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* Hero band */
.hero {
  padding: var(--sp-12) 0 var(--sp-10);
  border-bottom: 1px solid var(--cream-deep);
}
.hero .eyebrow-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--sp-6);
}
.hero h1 { margin-bottom: var(--sp-3); max-width: 1000px; }
.hero .sub-banner { max-width: 820px; }

/* Hero variant B — typography-led */
.hero.v-b h1 { font-size: 124px; line-height: 1.0; }

/* Hero variant D — spine on the right */
.hero.v-d .hero-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.hero.v-d .spine { border-top: 2px solid var(--charcoal); padding-top: var(--sp-3); }
.hero.v-d .spine ol {
  list-style: none;
  padding: 0;
  counter-reset: spine;
}
.hero.v-d .spine ol li {
  counter-increment: spine;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.35;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--cream-deep);
  font-style: italic;
  color: var(--charcoal-mid);
}
.hero.v-d .spine ol li::before {
  content: counter(spine, decimal-leading-zero) " · ";
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  color: var(--gold-text);
  letter-spacing: 0.1em;
  margin-right: var(--sp-2);
  font-weight: 400;
}

/* Body layout: sticky metadata sidebar + reading column */
.body-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-10) 0;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: var(--sp-10);
  font-family: var(--font-body);
}
.sidebar dl { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.sidebar dl > div { display: block; }
.sidebar dt { margin-bottom: 4px; }
.sidebar dd { margin: 0; }
.sidebar .toc {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--cream-deep);
}
.sidebar .toc h3 { margin-bottom: var(--sp-2); color: var(--charcoal-soft); }
.sidebar .toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.55;
}
.sidebar .toc ol li {
  counter-increment: toc;
  padding: 6px 0;
  color: var(--charcoal-soft);
  font-style: italic;
}
.sidebar .toc ol li::before {
  content: counter(toc, decimal-leading-zero) "  ";
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-style: normal;
}
.sidebar .toc ol li.active { color: var(--charcoal); font-weight: 500; }

.body {
  max-width: 560px;
}
.argument {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.5;
  font-style: italic;
  color: var(--charcoal);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 2px solid var(--gold);
  font-weight: 400;
}

/* Chapter sections */
.chapter { margin-top: var(--sp-12); }
.chapter:first-of-type { margin-top: 0; }
.chapter > h3 { margin-bottom: var(--sp-1); }
.chapter > h2 { margin-bottom: var(--sp-4); max-width: 540px; }

.chapter-image { margin: var(--sp-4) 0; }
.chapter-image .gb { min-height: 360px; }

.chapter-image.wide {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.chapter-image.wide .gb { min-height: 480px; }

/* Reframe block — sage register */
.reframe {
  margin-top: var(--sp-12);
  padding: var(--sp-6);
  background: var(--sage-light);
  border-left: 4px solid var(--sage);
}
.reframe h3 { margin-bottom: var(--sp-1); color: var(--sage-text); }
.reframe h2 { margin-bottom: var(--sp-3); color: var(--sage-text); }
.reframe .body-text { color: var(--sage-text); }
.reframe .body-text strong { color: var(--sage-text); }

/* Scaling block */
.scaling { margin-top: var(--sp-12); }

/* Pull quote */
blockquote.pull {
  margin: var(--sp-6) 0;
  padding-left: var(--sp-3);
  border-left: 3px solid var(--gold);
}

/* Outcomes row */
.outcomes {
  margin-top: var(--sp-12);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--cream-deep);
  border-bottom: 1px solid var(--cream-deep);
  grid-column: 1 / -1;
}
.outcomes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.outcomes .stat-num {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--gold-text);
}
.outcomes .stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-top: var(--sp-1);
}

/* Prev/next */
.prevnext {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-10) 0 var(--sp-5);
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: var(--charcoal-mid);
  border-top: 1px solid var(--cream-deep);
}
.prevnext a { text-decoration: none; color: inherit; }
.prevnext a:hover { color: var(--gold-text); }
.prevnext .prev::before { content: '← '; color: var(--gold); }
.prevnext .next::after { content: ' →'; color: var(--gold); }

/* Footer */
.footer {
  border-top: 1px solid var(--cream-deep);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  background: var(--cream);
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--gold-text); }

/* Rewrite tools strip (visible on per-case pages) */
.rewrite-tools {
  background: var(--gold-pale);
  color: var(--gold-text);
  padding: var(--sp-2) var(--sp-6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--gold);
}
.rewrite-tools a { color: var(--gold-text); font-weight: 600; text-decoration: underline; }
.rewrite-tools a:hover { color: var(--rust); }

/* Landing page */
.landing {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
}
.landing h1 { font-size: 96px; margin-bottom: var(--sp-3); max-width: 900px; }
.landing .lede {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.55;
  font-style: italic;
  color: var(--charcoal-mid);
  max-width: 720px;
  margin-bottom: var(--sp-10);
}
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}
.case-card {
  display: block;
  padding: var(--sp-4);
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease-out;
}
.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(42, 37, 32, 0.08);
  border-color: var(--gold);
}
.case-card .case-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--sp-2);
}
.case-card h2 { font-size: 36px; margin-bottom: var(--sp-2); }
.case-card .case-sub {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  color: var(--charcoal-mid);
  font-style: italic;
}
.case-card.empty {
  background: var(--cream-deep);
  border-style: dashed;
  border-color: var(--gold);
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--charcoal-soft);
  font-style: italic;
}

@media (max-width: 900px) {
  .body-wrap { grid-template-columns: 1fr; gap: var(--sp-4); }
  .sidebar { position: static; }
  .hero.v-b h1 { font-size: 72px; }
  .hero.v-d .hero-row { grid-template-columns: 1fr; gap: var(--sp-4); }
  .cases-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .landing h1 { font-size: 56px; }
  .hero { padding: var(--sp-8) 0 var(--sp-6); }
}
