/* The Cultural Architect — shared styles for every page */
:root {
  --bg: #f5ead8;          /* cream text / light surfaces */
  --ink: #201e1d;         /* page background */
  --ink-2: #2a2725;       /* raised surface */
  --line: #3a3532;        /* hairlines on dark */
  --neutral-300: #dcd3c4; /* reflective-stripe silver */
  --accent-300: #f7dc95;
  --accent-400: #dcaa48;  /* cover gold */
  --accent-600: #8a5a14;
  --font-heading: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-color: #5a4c34 var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--ink); color: var(--bg); font-family: var(--font-body); font-size: 18px; line-height: 1.6; text-wrap: pretty; overflow-x: clip; -webkit-font-smoothing: antialiased; caret-color: var(--accent-400); }
img { max-width: 100%; display: block; }
a { color: var(--accent-400); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-300); }
:focus-visible { outline: 2px solid var(--accent-400); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-400); color: var(--ink); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.soft { color: color-mix(in srgb, var(--bg) 82%, transparent); }
.label { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.08; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-weight: 900; }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }
p { margin: 0; }
.section { padding-block: clamp(48px, 6vw, 84px); }
.section.first { padding-top: clamp(40px, 5vw, 64px); }
.section-head { max-width: 46rem; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head p { margin-top: 18px; font-size: clamp(17px, 1.4vw, 20px); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--bg); text-decoration: none; font-family: var(--font-heading); font-size: 20px; line-height: 1; white-space: nowrap; }
.brand:hover { color: var(--bg); }
.mark { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-400); color: var(--ink); display: grid; place-items: center; flex: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: color-mix(in srgb, var(--bg) 80%, transparent); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bg); }
.nav-links .btn { color: var(--ink); }
.nav-links a { white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 861px) { .nav-links { gap: 16px; } .wordmark { font-size: 14px; } }
@media (max-width: 860px) {
  /* Phone: logo + Buy button on one row, then the six pages in two tidy rows of three. Scrolls away with the page. */
  .nav { position: static; }
  .nav .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-block: 12px 10px; min-height: 0; }
  .brand { grid-row: 1; grid-column: 1 / 4; align-self: center; }
  /* The wordmark is sized from the space left after the button, so the two can never touch. */
  .nav .wordmark { font-size: min(15px, calc((100vw - 2 * max(20px, 5vw) - 136px) / 16)); letter-spacing: .02em; }
  .nav-links { display: contents; }
  .nav-links .btn { white-space: nowrap; width: 120px; grid-row: 1; grid-column: 2 / 4; justify-self: end; align-self: center; min-height: 32px; padding: 6px 12px; font-size: 13px; }
  .nav-links a:not(.btn) { padding: 7px 0; font-size: clamp(13.5px, 3.9vw, 15px); white-space: nowrap; }
  .nav-links a:nth-of-type(1), .nav-links a:nth-of-type(2), .nav-links a:nth-of-type(3) { margin-top: 10px; }
  .nav-links a:not(.btn):nth-of-type(3n+1) { justify-self: start; }
  .nav-links a:not(.btn):nth-of-type(3n+2) { justify-self: center; }
  .nav-links a:not(.btn):nth-of-type(3n+3) { justify-self: end; }
  .nav-links a[aria-current="page"] { color: var(--accent-400); }
}


/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent-400); background: var(--accent-400); color: var(--ink); font: 700 16px/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); box-shadow: 0 8px 22px -12px rgba(220,170,72,.7); }
.btn:hover { background: var(--accent-300); border-color: var(--accent-300); color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); box-shadow: none; }
.btn.ghost:hover { border-color: var(--bg); background: color-mix(in srgb, var(--bg) 8%, transparent); color: var(--bg); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 45%; z-index: -2; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 88%, transparent) 40%, color-mix(in srgb, var(--ink) 35%, transparent) 75%, color-mix(in srgb, var(--ink) 55%, transparent) 100%),
  linear-gradient(0deg, var(--ink) 0%, transparent 40%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; min-height: min(78svh, 720px); padding-block: clamp(40px, 6vw, 80px); }
h1 { font-size: clamp(44px, 7vw, 96px); line-height: 1; }
h1 span { display: block; } h1 span + span { color: var(--accent-400); }
.subtitle { font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; line-height: 1.35; margin-top: 28px; max-width: 30ch; }
.lede { font-size: clamp(17px, 1.4vw, 20px); margin-top: 16px; max-width: 44ch; }
.lede strong { color: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  h1 { animation: haze 1.3s var(--ease) both; }
  @keyframes haze { from { filter: blur(12px); opacity: .3; transform: translateY(.1em); } to { filter: none; opacity: 1; transform: none; } }
}

@media (max-width: 860px) { .hero-grid { min-height: 0; } }

.stripe { padding: 7px 0; background: var(--accent-400); }
.stripe div { height: 16px; background: var(--neutral-300); }

/* ---------- Briefing ---------- */
.briefing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
blockquote { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.2; }
blockquote::before { content: "\201C"; color: var(--accent-400); margin-left: -.42em; }
blockquote::after { content: "\201D"; color: var(--accent-400); }
.cite { margin-top: 24px; color: var(--accent-400); }
.prose p + p { margin-top: 1.1em; }
.prose { font-size: 19px; max-width: 36rem; }
@media (max-width: 860px) { .briefing { grid-template-columns: minmax(0, 1fr); } blockquote::before { margin-left: 0; } }

/* ---------- Framework ---------- */
.levers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.lever { padding: 32px 28px 36px 0; }
.lever + .lever { border-left: 1px solid var(--line); padding-left: 28px; }
.lever h3 { font-size: clamp(30px, 3.4vw, 44px); color: var(--accent-400); }
.lever p { margin-top: 12px; max-width: 30ch; }
@media (max-width: 860px) { .levers { grid-template-columns: minmax(0, 1fr); } .lever + .lever { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } .lever { padding: 22px 0; } }

.parts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-top: 8px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.part { background: var(--ink-2); padding: 24px 22px 28px; }
.part .label { color: var(--accent-400); }
.part h3 { margin-top: 10px; font-size: 22px; }
.part p { margin-top: 10px; font-size: 15px; line-height: 1.5; }
@media (max-width: 1000px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .parts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Author ---------- */
.author { background: var(--ink-2); }
.author-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.author-photo { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
.author-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(var(--accent-400) 0 7px, var(--neutral-300) 7px 23px, var(--accent-400) 23px); }
.author-copy .prose { margin-top: 24px; }
.creds { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.creds span { font-size: 14px; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 7%, transparent); color: var(--neutral-300); }
@media (max-width: 860px) { .author-grid { grid-template-columns: minmax(0, 1fr); } .author-photo { max-width: 460px; } }

.climb { margin-top: clamp(40px, 5vw, 64px); }
.climb-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; position: relative; }
.climb-track::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--ph) + 26px); height: 4px; background: var(--accent-400); border-radius: 2px; }
.climb-track { --ph: 190px; }
.climb-track li { position: relative; }
.climb-track figure { margin: 0; height: var(--ph); border-radius: 12px; overflow: hidden; background: var(--ink); }
.climb-track figure img { width: 100%; height: 100%; object-fit: cover; }
.climb-track .no-photo { display: grid; place-items: center; height: 100%; border: 1px dashed var(--line); border-radius: 12px; color: var(--accent-400); }
.climb-track .yr { display: block; margin-top: 46px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-400); font-size: 15px; }
.climb-track .yr::before { content: ""; position: absolute; top: calc(var(--ph) + 20px); left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); border: 4px solid var(--accent-400); }
.climb-track li:last-child .yr::before { background: var(--accent-400); }
.climb-track b { display: block; font-size: 17px; line-height: 1.3; margin-top: 4px; }
.climb-track small { display: block; font-size: 14px; line-height: 1.4; margin-top: 4px; color: color-mix(in srgb, var(--bg) 70%, transparent); }
@media (max-width: 1000px) {
  .climb-track { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; --ph: 170px; }
  .climb-track::before { width: calc(6 * 236px); }
  .climb-track li { scroll-snap-align: start; }
}

/* ---------- Full-bleed band ---------- */
.band { position: relative; isolation: isolate; overflow: hidden; min-height: min(60vh, 560px); display: flex; align-items: flex-end; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 64%; z-index: -2; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 65%, transparent) 45%, color-mix(in srgb, var(--ink) 10%, transparent) 100%); }
.band blockquote { max-width: 22ch; padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 56px); }

/* ---------- Where to hear Walt ---------- */
.listen { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.listen-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 5vw, 64px); align-items: start; }
.listen h2 { font-size: clamp(28px, 3.2vw, 40px); }
.appearances { list-style: none; margin: 0; padding: 0; }
.appearances li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.appearances li:first-child { padding-top: 4px; }
.appearances b { display: block; font-size: 18px; }
.appearances span { display: block; font-size: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; flex: none; font-weight: 700; text-decoration: none; padding: 8px 0; }
.text-link:hover { text-decoration: underline; }
@media (max-width: 760px) { .listen-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Speaking + form ---------- */
.speak-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.topics { list-style: none; padding: 0; margin: 28px 0 0; }
.topics li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 6px; }
.topics li::before { content: ""; width: 12px; height: 12px; margin-top: 8px; border-radius: 50%; border: 3px solid var(--accent-400); }
.speak-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.speak-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.form { background: var(--bg); color: var(--ink); border-radius: 22px; padding: clamp(24px, 4vw, 44px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.form h3 { font-size: clamp(26px, 2.6vw, 34px); }
.form > p { margin-top: 8px; color: #4a4440; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { font: 16px/1.4 var(--font-body); color: var(--ink); background: #fffaf2; border: 1.5px solid #cbbfae; border-radius: 10px; padding: 12px 14px; width: 100%; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-600); box-shadow: 0 0 0 3px rgba(138,90,20,.22); }
.field input:user-invalid { border-color: #b3261e; }
.form .btn { margin-top: 22px; width: 100%; }
.form .btn:focus-visible { outline-color: var(--ink); }
.form-note { margin-top: 14px; font-size: 14px; color: #5b544e; }
.form-status { margin-top: 14px; font-weight: 600; color: #2f6b3a; }
.form-status:empty { display: none; }
.form a { color: var(--accent-600); }
.form ::selection { background: var(--accent-300); }
@media (max-width: 860px) { .speak-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .fields { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Gallery: endless auto-scroll ---------- */
.marquee { overflow: hidden; margin-top: 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: loop var(--loop, 90s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee figure { flex: none; margin: 0; }
.marquee img { height: clamp(220px, 30vw, 360px); width: auto; max-width: none; border-radius: 12px; background: var(--ink-2); }
@keyframes loop { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; padding-block: 36px 48px; font-size: 15px; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: color-mix(in srgb, var(--bg) 80%, transparent); text-decoration: none; }
.foot nav a:hover { color: var(--bg); }
.motto { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--bg); }

/* ---------- Sub-page hero ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 52px); }
.page-title { font-size: clamp(38px, 5.2vw, 68px); }
.page-title.compact { font-size: clamp(30px, 3.4vw, 46px); }
.gallery { padding-bottom: clamp(40px, 5vw, 64px); }
.gallery .marquee { margin-top: 24px; }
.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 860px; }
.files li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.files b { display: block; font-size: 19px; }
.files span { display: block; font-size: 15px; }
.files-note { margin-top: 20px; font-size: 15px; }
.page-hero h1 { font-size: clamp(40px, 6vw, 80px); }
.page-hero .lede { max-width: 48ch; }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--accent-400); text-decoration: none; font-weight: 600; margin-bottom: 28px; }

/* ---------- Book page cover ---------- */
.book-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.cover-photo { justify-self: center; width: min(100%, 300px); }
.cover-photo img { width: 100%; border-radius: 4px 8px 8px 4px; box-shadow: 24px 32px 50px -20px rgba(0,0,0,.8); transition: transform .4s var(--ease); }
.cover-photo:hover img { transform: translateY(-4px) rotate(-1deg); }
@media (max-width: 760px) { .book-hero { grid-template-columns: minmax(0, 1fr); } .cover-photo { justify-self: start; width: min(60%, 220px); } }

/* ---------- Book-cover lettering (wordmark + home title) ---------- */
:root { --gold-hi: #f7dc95; --gold: #dcaa48; --gold-lo: #a86f1f; --cover-cream: #f3e7cf; --font-cover: "Cinzel", "Trajan Pro", Georgia, serif; }
.wordmark { font-family: var(--font-cover); font-weight: 900; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--cover-cream); white-space: nowrap; line-height: 1; }
.wordmark b { font-weight: 900; color: var(--gold); }
.brand:hover .wordmark b { color: var(--gold-hi); }
h1.cover-title { font-family: var(--font-cover); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: .98; font-size: clamp(42px, 7.2vw, 100px); margin-left: 0; color: var(--cover-cream); }
h1.cover-title span { display: block; }
h1.cover-title span + span { color: var(--gold); background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 48%, var(--gold-lo) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: 1.12em; }
h1.cover-title { filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)) drop-shadow(0 10px 24px rgba(0,0,0,.5)); }
.cover-rule { width: min(100%, 15em); max-width: 640px; height: 2px; margin-top: 22px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi) 50%, var(--gold-lo)); font-size: clamp(42px, 7.2vw, 100px); }
.cover-rule + .subtitle { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) { h1.cover-title { animation: haze 1.3s var(--ease) both; } }
