/* ==========================================================================
   Joe Combrink — site styles
   Colours and fonts come from the Relentlessly Human cover and Joe's signature.
   To change a colour everywhere, change it once in :root below.
   ========================================================================== */

:root {
  /* Colour */
  --ivory: #f3f2ec;        /* page background (cover paper) */
  --paper: #fbfaf6;        /* raised surfaces */
  --ink: #26282b;          /* main text (cover charcoal) */
  --ink-soft: #55585e;     /* secondary text */
  --line: #dcd8cc;         /* hairlines */
  --gold: #b08a45;         /* decorative gold */
  --gold-text: #87642a;    /* gold that is dark enough for text */
  --gold-light: #d6bd6e;
  --navy: #16124a;         /* signature */
  --night: #1d1e21;        /* dark band */
  --gold-gradient: linear-gradient(100deg, #a77a37 0%, #d3bb67 45%, #b48c47 75%, #9a6c34 100%);

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --display: "Oswald", "Arial Narrow", sans-serif;

  /* Space and layout */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
  --section: clamp(4rem, 10vw, 8rem);
  --radius: 4px;
}

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

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
p { margin: 0 0 1.1em; text-wrap: pretty; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 44rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 1.25rem;
}

.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-soft); line-height: 1.55; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 0.75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Placeholders: anything in [BRACKETS] is not ready to go live ---------- */
.ph {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #8a2d1f;
  background: #fbe9e3;
  border: 1px dashed #c9634f;
  border-radius: var(--radius);
  padding: 0.15rem 0.5rem;
}
.ph-block { display: block; padding: 1.25rem; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.95rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-dark { background: var(--ink); color: var(--ivory); }
.btn-dark:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ivory); }
.btn-gold { background: var(--gold-gradient); color: var(--night); border: 0; }
.btn-gold:hover { color: var(--night); filter: brightness(1.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.arrow::after { content: "→"; transition: transform 0.2s; }
a:hover .arrow::after, .btn:hover.arrow::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ivory) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.5rem; }
.logo { text-decoration: none; }
.wordmark { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.logo:hover .wordmark { color: var(--navy); }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--gold-gradient); }
.nav .btn { padding: 0.6rem 1rem; font-size: 0.875rem; color: var(--ivory); }
.nav .btn:hover { color: #fff; }
.nav .btn::after { display: none; }
.menu-btn { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 4.5rem 0 auto 0; background: var(--ivory); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin-top: 1rem; justify-content: center; border-bottom: 0; }
}

/* ---------- Sections ---------- */
section { padding: var(--section) 0; }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 46rem; }
.rule { width: 3.5rem; height: 2px; background: var(--gold-gradient); border: 0; margin: 0 0 1.5rem; }

/* Hero */
.hero { overflow-x: clip; padding-top: clamp(2.5rem, 7vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 em { font-style: italic; color: var(--gold-text); }
.portrait { position: relative; justify-self: end; width: 100%; max-width: 34rem; }
.portrait::before { content: ""; position: absolute; inset: 8% -6% -6% 8%; background: var(--gold-gradient); opacity: 0.9; border-radius: 999px 999px var(--radius) var(--radius); }
.portrait img { position: relative; border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; width: 100%; background: #fff; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { justify-self: start; max-width: 24rem; order: -1; }
}

/* Sectors strip */
.sectors { padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sectors-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.75rem; }
.sectors .label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-right: 0.5rem; }
.sectors span:not(.label) { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--ink); }

/* Book band */
.book-band { background: var(--night); color: var(--ivory); overflow: hidden; }
.book-band .eyebrow { color: var(--gold-light); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.book-visual { position: relative; justify-self: center; width: 100%; max-width: 31rem; padding: 2rem 0 1rem; }
.book-visual::before { content: ""; position: absolute; inset: -10% -25% 0; background: radial-gradient(closest-side, rgba(214, 189, 110, 0.32), rgba(214, 189, 110, 0.08) 55%, transparent 75%); pointer-events: none; }
.book-visual::after { content: ""; position: absolute; left: -15%; right: -15%; bottom: 1.2rem; height: 1px; background: linear-gradient(90deg, transparent, rgba(214, 189, 110, 0.45), transparent); }
.book-visual img { position: relative; width: 100%; }
.book-band h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 0.95; }
.book-band h2 .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.book-band .lede { color: #c9c7bf; }
.book-band .btn-ghost { color: var(--ivory); border-color: rgba(243,242,236,0.5); }
.book-band .btn-ghost:hover { background: var(--ivory); color: var(--night); }
.forces { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.75rem 0 0; padding: 0; list-style: none; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold-light); }
.countdown { display: inline-flex; gap: 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(243,242,236,0.15); }
.countdown div { display: grid; }
.countdown strong { font-family: var(--display); font-weight: 500; font-size: 2.25rem; line-height: 1; color: var(--ivory); }
.countdown span { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #a19f97; margin-top: 0.35rem; }
@media (max-width: 860px) { .book-grid { grid-template-columns: 1fr; } .book-visual { max-width: 17rem; padding-top: 0; } }

/* Ways to work */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.way { padding: 2rem 2rem 2.25rem 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.way + .way { padding-left: 2rem; }
.way:last-child { border-right: 0; padding-right: 0; }
.way .num { font-family: var(--serif); font-style: italic; color: var(--gold-text); font-size: 1.1rem; margin-bottom: 1.5rem; }
.way p { color: var(--ink-soft); }
.way a.more { margin-top: auto; font-weight: 600; text-decoration: none; display: inline-flex; gap: 0.5rem; }
@media (max-width: 860px) {
  .ways { grid-template-columns: 1fr; }
  .way, .way + .way { padding: 2rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Personal note */
.note { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-grid { display: grid; grid-template-columns: 14rem 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.note img.sig { width: 13rem; margin-top: 1.5rem; }
.note blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.4; }
.note blockquote p::before { content: "“"; color: var(--gold); }
.note blockquote p:last-of-type::after { content: "”"; color: var(--gold); }
.note .photo { border-radius: var(--radius); filter: grayscale(1) contrast(1.05); }
@media (max-width: 860px) { .note-grid { grid-template-columns: 1fr; } .note .photo { max-width: 10rem; } }

.note-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.note-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.note-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 45%, rgba(24, 18, 12, 0.55) 72%, rgba(24, 18, 12, 0.7) 100%); pointer-events: none; }
.note-photo figcaption { position: absolute; z-index: 1; right: clamp(0.9rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); width: 31%; font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.5rem); line-height: 1.12; color: var(--ivory); text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.note-photo figcaption em { color: var(--gold-light); }
.note-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 42% 22%; border-radius: var(--radius); }
.note-body blockquote { font-size: clamp(1.25rem, 2vw, 1.6rem); }
@media (max-width: 860px) {
  .note-split { grid-template-columns: 1fr; }
  .note-photo img { aspect-ratio: 1 / 1; object-position: 38% 20%; }
  .note-photo::after { background: linear-gradient(180deg, transparent 45%, rgba(24, 18, 12, 0.75) 100%); }
  .note-photo figcaption { top: auto; bottom: 1.5rem; left: 1.25rem; right: 1.25rem; transform: none; width: auto; font-size: 1.6rem; }
}

/* Endorsements */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.quote { margin: 0; padding-top: 1.5rem; border-top: 2px solid transparent; border-image: var(--gold-gradient) 1; }
.quote blockquote { margin: 0 0 1.25rem; font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; }
.quote figcaption { font-size: 0.9rem; color: var(--ink-soft); }
.quote figcaption strong { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

/* CTA band */
.cta { text-align: center; }
.cta h2 { max-width: 40rem; margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; }

/* Interior pages */
.page-hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3rem); }
.page-hero h1 { max-width: 50rem; }
.prose { max-width: 42rem; }
.prose p { font-size: 1.125rem; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.list-clean { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list-clean li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.list-clean h3 { margin-bottom: 0.25rem; }
.list-clean p { margin: 0; color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; margin: 2rem 0; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 0.25rem 0 0; font-family: var(--serif); font-size: 1.2rem; }

/* Footer */
.site-footer { background: var(--night); color: #bdbbb3; padding: 4rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer img { height: 2.6rem; width: auto; margin-bottom: 1rem; }
.site-footer h4 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); margin: 0 0 1rem; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ivory); }
.footer-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: #8d8b84; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
