/* M. J. Cathcart - deep teal, gold leaf and island sunsets */

:root {
  --ink: #06171B;
  --deep: #0B2328;
  --teal: #0F2F35;
  --teal-2: #174249;
  --gold: #C9A55C;
  --gold-2: #E4C88A;
  --gold-3: #86672B;
  --amber: #F2A540;
  --cream: #F4EEE2;
  --paper: #FAF7F1;
  --text: #1C2628;
  --muted: #5A6566;
  --muted-d: #A7B6B4;
  --line: #E4DBCB;
  --line-d: rgba(228, 200, 138, .2);
  --display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --head: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.16rem/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: .6rem 1rem; font: 500 .9rem var(--sans); }
.skip:focus { top: 12px; }
.ico { width: 1.1em; height: 1.1em; flex: none; }

/* Labels and buttons */
.eyebrow, .kicker, .crumb {
  display: inline-block;
  font: 500 .74rem/1.4 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-3);
  margin-bottom: 1rem;
}
.lede { font-size: 1.25rem; color: var(--muted); max-width: 38em; }

.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .95rem 1.5rem;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent;   /* <button> elements otherwise get the browser's grey */
  font: 500 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn b { font-weight: 500; letter-spacing: .06em; opacity: .75; }
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { border-color: currentColor; color: var(--gold-3); }
.btn-line:hover { background: var(--gold-3); border-color: var(--gold-3); color: var(--paper); }
.btn-ghost { border-color: rgba(244, 238, 226, .45); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(244, 238, 226, .08); }
.btn-sm { padding: .7rem 1.1rem; font-size: .7rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 500 .76rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-3); text-decoration: none; padding: .4rem 0;
  border-bottom: 1px solid currentColor;
}
.text-link:hover .ico { transform: translateX(3px); }
.text-link .ico { transition: transform .25s var(--ease); }
.soon { font: 500 .78rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); border: 1px dashed currentColor; padding: .8rem 1.2rem; }

/* Dark bands share these colours */
.hero, .spotlight, .themes-band, .page-head, .book-hero, .newsletter, .foot { color: var(--cream); }
.spotlight .eyebrow, .page-head .eyebrow, .page-head .crumb, .book-hero .crumb, .newsletter .eyebrow, .foot .eyebrow { color: var(--gold); }
.spotlight .btn-line, .book-hero .btn-line, .page-head .btn-line { color: var(--gold-2); }
.spotlight .btn-line:hover, .book-hero .btn-line:hover, .page-head .btn-line:hover { background: var(--gold-2); border-color: var(--gold-2); color: var(--ink); }
.spotlight .text-link { color: var(--gold-2); }
.page-head .lede, .newsletter .lede { color: var(--muted-d); margin-inline: auto; }

/* Header */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--head);
  color: var(--cream);
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.solid-head .site-head, .site-head.stuck {
  background: rgba(8, 29, 34, .9);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-d);
}
.admin-bar .site-head { top: 32px; }
.head-row { display: flex; align-items: center; gap: 2rem; height: 100%; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: auto; }
.brand-name { font: 600 1.32rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-list { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font: 500 .74rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: rgba(244, 238, 226, .85);
  padding: .5rem 0; background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.nav-list a:hover, .nav-list .current-menu-item a { color: var(--cream); background-size: 100% 1px; }
.nav-social { display: none; }
.head-cta { display: flex; align-items: center; gap: .8rem; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--cream); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 26px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  min-height: max(640px, 100svh);
  display: grid; align-items: center;
  background: var(--ink);
  overflow: hidden;
}
.hero-bg, .hero-bg img, .hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img, .hero-bg canvas { object-fit: cover; object-position: 62% 60%; animation: drift 30s ease-in-out infinite alternate; }
/* The moving sea and hair (motion.js) fade in over the still picture */
canvas.motion { opacity: 0; transition: opacity 1.2s ease; }
canvas.motion.on { opacity: 1; }
.cover canvas.motion, .mjb-front canvas.motion { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 1px 3px 3px 1px; }
.about-photo canvas.motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(6, 23, 27, .72), rgba(6, 23, 27, .2) 70%, transparent),
    linear-gradient(180deg, rgba(6, 23, 27, .55), transparent 30%, transparent 62%, rgba(11, 35, 40, .95));
}
.hero-inner { text-align: center; padding: calc(var(--head) + 2rem) 0 8rem; display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .35rem 1rem .35rem .35rem; margin-bottom: 2rem;
  border: 1px solid var(--line-d); border-radius: 99px;
  background: rgba(6, 23, 27, .45); backdrop-filter: blur(6px);
  font: 400 .95rem var(--serif); font-style: italic; text-decoration: none; color: var(--cream);
}
.pill span { font: 500 .66rem/1 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; background: var(--gold); color: var(--ink); padding: .45rem .7rem; border-radius: 99px; }
.hero-name {
  font-size: clamp(2.7rem, 8.4vw, 6.6rem);
  font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  margin: 0; color: var(--cream);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero-tag { font-size: clamp(1.15rem, 2.3vw, 1.65rem); color: var(--gold-2); margin: .6rem 0 1.4rem; letter-spacing: .01em; }
.sprig { width: 120px; height: 24px; color: var(--gold); opacity: .85; }
.hero-lede { max-width: 33em; margin: 1.4rem auto 0; color: rgba(244, 238, 226, .82); font-size: 1.18rem; }
.hero .cta-row { justify-content: center; margin-top: 2.2rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 2rem; width: 1px; height: 56px; background: rgba(244, 238, 226, .18); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--gold); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

/* Book covers in 3D */
.spot-visual { perspective: 1800px; display: grid; place-items: center; }
.book3d {
  position: relative; width: min(100%, 360px);
  transform-style: preserve-3d;
  transform: rotateY(var(--ry, -20deg)) rotateX(var(--rx, 3deg));
  transition: transform .7s var(--ease);
}
.book3d .cover { position: relative; transform-style: preserve-3d; }
.book3d .cover img { display: block; width: 100%; border-radius: 1px 3px 3px 1px; box-shadow: 24px 36px 60px -12px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .2); }
.book3d .cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .28) 35%, rgba(255, 255, 255, .08) 60%, transparent);
}
.book3d .pages {
  position: absolute; top: 1.2%; bottom: 1.2%; left: 100%; width: 24px;
  transform-origin: left center; transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, #F3EEE3 0 1px, #D8CFBE 1px 2px);
}
[data-open-book] { cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.spot-visual { gap: 1.6rem; }
.open-hint { font: 500 .7rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); opacity: .75; transition: opacity .25s; }
.open-hint::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: .7em; vertical-align: middle; background: currentColor; }
[data-open-book]:hover .open-hint, [data-open-book]:focus-visible .open-hint { opacity: 1; }
.is-open .book3d { visibility: hidden; }

/* The book opening (built by main.js) */
.mjb-shade { position: fixed; inset: 0; z-index: 200; background: rgba(6, 23, 27, .78); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: mjbFade .4s ease both; }
@keyframes mjbFade { from { opacity: 0; } }
.mjb { position: fixed; z-index: 201; perspective: 2400px; pointer-events: none; }
.mjb.is-ready { pointer-events: auto; }
.mjb-page {
  position: absolute; inset: 1.2% 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12% 11%; overflow: hidden; text-align: center; color: var(--text);
  border-radius: 1px 4px 4px 1px;
  background: linear-gradient(90deg, #D8CEBA, #F2ECDF 6%, #FBF8F1 28%);
  box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .8), inset -2px 0 0 #E4DBCB, inset -4px 0 0 #FBF8F1, inset -6px 0 0 #E4DBCB;
}
.mjb-page { justify-content: safe center; overflow-y: auto; }
.mjb.is-ready .mjb-page { cursor: pointer; }
.mjb-blank { justify-content: center; }
.mjb-blank .sprig { opacity: .5; }
.mjb-author { font: 500 .62em/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold-3); }
.mjb-title { font: 500 1.75em/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; margin: .7em 0 .5em; text-wrap: balance; }
.mjb-page .sprig { width: 5.5em; height: 1.1em; color: var(--gold); flex: none; }
.mjb-hook { margin: .9em 0 0; font: italic 500 1.12em/1.35 var(--display); color: var(--teal); text-wrap: balance; }
.mjb-text { margin: 1.1em 0 0; font-size: .9em; line-height: 1.65; text-align: left; color: #3A4547; }
.mjb-text::first-letter { float: left; font: 500 3.1em/.8 var(--display); color: var(--gold-3); margin: .08em .1em 0 0; }
.mjb-cover { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; }
.mjb-front, .mjb-inside { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 1px 3px 3px 1px; }
.mjb-front { background: var(--teal); box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .8); }
.mjb-front img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mjb-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .16) 2.5%, transparent 6%); }
.mjb-inside {
  display: grid; place-items: center; transform: rotateY(180deg); border-radius: 3px 1px 1px 3px;
  background: radial-gradient(circle at 50% 45%, rgba(228, 200, 138, .12), transparent 60%), var(--teal);
  box-shadow: inset -10px 0 18px -8px rgba(0, 0, 0, .5);
}
.mjb-inside img { width: 34%; opacity: .9; }
/* Turn the page: a curled corner that grows under the pointer */
.mjb-turn {
  position: absolute; right: 0; bottom: 1.2%; z-index: 3;
  display: flex; align-items: flex-end; gap: .8em; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 .58em/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-3);
  animation: mjbFade .5s .2s ease both;
}
.mjb-turn span { padding-bottom: 1.4em; }
.mjb-turn::after {
  content: ""; width: 3.4em; height: 3.4em; border-radius: 0 0 3px 0;
  background: linear-gradient(135deg, transparent 50%, #E2D8C5 50%, #F6F1E6 72%, #FFFDF8);
  box-shadow: -4px -4px 8px -4px rgba(0, 0, 0, .25);
  transition: width .3s var(--ease), height .3s var(--ease);
  animation: mjbCurl 2.6s 1s ease-in-out infinite;
}
.mjb-turn:hover::after, .mjb-turn:focus-visible::after { width: 4.6em; height: 4.6em; animation: none; }
.mjb-turn:focus-visible { outline: none; }
.mjb-turn:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
@keyframes mjbCurl { 0%, 70%, 100% { width: 3.4em; height: 3.4em; } 80% { width: 4.2em; height: 4.2em; } }
.mjb-leaf { position: absolute; inset: 1.2% 0; z-index: 2; transform-origin: left center; transform-style: preserve-3d; pointer-events: none; }
.mjb-leaf > * { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mjb-leaf .mjb-leaf-front { inset: 0; overflow: hidden; }
.mjb-leaf-back { transform: rotateY(180deg); border-radius: 4px 1px 1px 4px; background: linear-gradient(270deg, #D8CEBA, #F2ECDF 6%, #FBF8F1 28%); box-shadow: inset 10px 0 24px -12px rgba(0, 0, 0, .25); }
.mjb-note { margin: 1em 0 0; font: italic 500 1.1em/1.35 var(--display); color: var(--teal); }
.mjb-buy { display: flex; flex-direction: column; gap: .7em; width: 100%; margin-top: 1.3em; }
.mjb-buy .btn { justify-content: center; }
.mjb-ku { margin: 1em 0 0; font-size: .8em; color: var(--muted); }
.mjb-close { position: fixed; top: 18px; right: 18px; z-index: 202; width: 46px; height: 46px; border: 1px solid var(--gold); border-radius: 50%; background: rgba(6, 23, 27, .6); color: var(--cream); cursor: pointer; animation: mjbFade .3s ease both; }
.mjb-close span { position: absolute; left: 13px; right: 13px; top: 22px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.mjb-close span + span { transform: rotate(-45deg); }
.mjb-close:hover { background: var(--gold); color: var(--ink); }
.cover-empty { aspect-ratio: 2 / 3; display: grid; place-items: center; padding: 2rem; background: linear-gradient(160deg, var(--teal-2), var(--ink)); border: 1px solid var(--line-d); text-align: center; font: 600 1.6rem/1.2 var(--display); color: var(--gold-2); }

/* Book spotlight */
.spotlight {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 50% 70% at 18% 50%, rgba(242, 165, 64, .16), transparent 70%),
    radial-gradient(ellipse 40% 50% at 90% 10%, rgba(60, 180, 176, .08), transparent 70%),
    var(--deep);
  padding: clamp(5rem, 10vw, 8.5rem) 0;
}
.spot-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.hook { font: italic 500 clamp(1.5rem, 2.8vw, 2.2rem)/1.25 var(--display); color: var(--gold-2); margin: 0 0 .8rem; max-width: 22em; }
.book-title { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--cream); margin-bottom: 1.4rem; }
.book-title small { display: block; margin-top: .6rem; font: 500 .78rem/1 var(--sans); letter-spacing: .26em; color: var(--gold); }
.blurb { color: rgba(244, 238, 226, .82); font-size: 1.2rem; max-width: 36em; }
.facts { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; list-style: none; padding: 0; margin: 1.6rem 0 0; font: 400 .8rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-d); }
.facts li { position: relative; }
.facts li + li::before { content: ""; position: absolute; left: -.78rem; top: .55em; width: 4px; height: 4px; transform: rotate(45deg); background: var(--gold); opacity: .7; }
.facts .stars span, .stars span { color: var(--gold); letter-spacing: .1em; }
.facts .new { color: var(--gold-2); }
.ku { font: italic 1rem var(--serif); color: var(--muted-d); margin: 1rem 0 1.4rem; }

/* Themes band over the island */
.themes-band {
  position: relative; isolation: isolate; text-align: center;
  padding: clamp(6rem, 13vw, 10rem) 0;
  background: var(--ink) url("../img/hero-island.webp") center 78% / cover no-repeat;
}
.themes-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--deep), rgba(6, 23, 27, .55) 35%, rgba(6, 23, 27, .55) 65%, var(--paper) 140%); }
.themes-line { font: italic 500 clamp(1.6rem, 3.4vw, 2.7rem)/1.3 var(--display); max-width: 24em; margin: 0 auto 2.4rem; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.themes { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.4rem; list-style: none; padding: 0; margin: 0; font: 500 .8rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold-2); }
.themes li { position: relative; }
.themes li + li::before { content: ""; position: absolute; left: -1.38rem; top: .3em; width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid var(--gold); }

/* Sections */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section.flush { padding-top: clamp(3rem, 6vw, 4.5rem); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; }
.sec-head h2, .about-copy h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.sec-head .lede { margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(3rem, 7vw, 6rem); align-items: center; }
.about-photo { position: relative; margin: 0 18px 18px 0; }
.about-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold); z-index: -1; }
.about-photo img { display: block; width: 100%; aspect-ratio: 1 / .95; object-fit: cover; }
.about { position: relative; isolation: isolate; }
.about-copy > p { color: #3A4547; }
.about-follow { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font: 500 .74rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); }
.about-page { align-items: start; }
.about-contact { margin: 1rem 0 0; font-style: italic; color: var(--muted); }
/* "Watch the writing desk" on the desk photo, and the window the video plays in (main.js) */
.watch-btn {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .45rem 1.1rem .45rem .45rem;
  border: 1px solid rgba(228, 200, 138, .45); border-radius: 99px;
  background: rgba(6, 23, 27, .68); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--cream); font: 500 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: background .25s, border-color .25s;
}
.watch-btn:hover, .watch-btn:focus-visible { background: rgba(6, 23, 27, .88); border-color: var(--gold); }
.watch-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--gold); color: var(--ink); transition: transform .25s var(--ease); }
.watch-icon svg { width: 13px; height: 13px; margin-left: 2px; }
.watch-btn:hover .watch-icon { transform: scale(1.08); }
.mjv { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 16px; background: rgba(6, 23, 27, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: mjbFade .35s ease both; }
.mjv video { display: block; height: min(88vh, 850px); width: auto; max-width: 100%; aspect-ratio: 478 / 850; object-fit: contain; border-radius: 4px; background: #000; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.mjv .mjb-close { z-index: 1; }
.about-contact a { color: var(--gold-3); text-underline-offset: 3px; }
.about-page .about-photo { position: sticky; top: calc(var(--head) + 2rem); }

.social { display: flex; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid currentColor; border-radius: 50%; color: var(--gold-3); transition: background .25s, color .25s; }
.social a:hover { background: var(--gold-3); color: var(--paper); }
.social svg { width: 18px; height: 18px; }

/* Journal */
.journal { background: var(--cream); }
.journal .post-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem 2rem; }
.post-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(11, 35, 40, .35); }
.post-img { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--deep); }
.post-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .post-img img, .post-lead:hover .post-img img { transform: scale(1.04); }
.post-img-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--gold); background: radial-gradient(circle at 50% 120%, var(--teal-2), var(--deep)); }
.post-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.post-body .kicker { margin-bottom: .7rem; font-size: .68rem; }
.post-body h3 { font-size: 1.65rem; font-weight: 600; margin-bottom: .6rem; }
.post-body h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 500; }
.post-body h3 a, .post-body h2 a { text-decoration: none; }
.post-body h3 a:hover, .post-body h2 a:hover { color: var(--gold-3); }
.post-body p { color: var(--muted); font-size: 1.06rem; }
.read-time { margin-top: auto; font: 400 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.post-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 7fr 5fr; background: var(--paper); border: 1px solid var(--line); }
.post-lead .post-img { aspect-ratio: auto; min-height: 340px; }
.post-lead .post-body { justify-content: center; padding: clamp(2rem, 4vw, 3.4rem); }
.post-lead .text-link { align-self: start; margin-top: .6rem; }
.pagination { margin-top: 3.5rem; }
.nav-links { display: flex; gap: .4rem; justify-content: center; font: 500 .8rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.nav-links a, .nav-links span { padding: .6rem .9rem; border: 1px solid var(--line); text-decoration: none; }
.nav-links .current { background: var(--deep); color: var(--cream); border-color: var(--deep); }

/* Newsletter */
.newsletter {
  position: relative; overflow: hidden; text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(201, 165, 92, .16), transparent 70%), var(--deep);
  padding: clamp(5rem, 10vw, 8rem) 0;
}
.news-inner { display: flex; flex-direction: column; align-items: center; max-width: 720px; }
.news-mark { width: 64px; margin-bottom: 1.6rem; }
.newsletter h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 500; }
.news-form { display: flex; width: 100%; max-width: 520px; margin-top: 1.2rem; border: 1px solid var(--line-d); background: rgba(6, 23, 27, .4); padding: 6px; }
.news-form input[type="email"] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--cream); font: 400 1.1rem var(--serif); padding: .7rem 1rem; }
.news-form input::placeholder { color: rgba(244, 238, 226, .5); }
.news-form input:focus { outline: none; }
.news-form:focus-within { border-color: var(--gold); }
.form-msg { margin: 1.2rem 0 0; font-size: 1.05rem; }
.form-msg.ok { color: var(--gold-2); }
.form-msg.err { color: #F3A694; }
.fine { margin: 1.4rem 0 0; font: 400 .78rem var(--sans); letter-spacing: .04em; color: var(--muted-d); }
.fine a { color: var(--gold-2); }
/* The confirm / leave page an email link opens */
.reader-action { min-height: 70vh; display: grid; align-items: center; padding-top: calc(var(--head) + clamp(4rem, 8vw, 6rem)); }
.reader-action h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 500; }
.reader-action strong { color: var(--cream); font-weight: 500; }
.reader-action form { margin-top: 1.6rem; }
.reader-action .cta-row { justify-content: center; }

/* Page heads (inner pages) */
.page-head {
  position: relative; overflow: hidden;
  padding: calc(var(--head) + clamp(3.5rem, 8vw, 6rem)) 0 clamp(3rem, 6vw, 4.5rem);
  background: radial-gradient(ellipse 50% 90% at 85% 0%, rgba(242, 165, 64, .14), transparent 70%), var(--deep);
  text-align: center;
}
.page-head h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 500; margin-bottom: .4rem; }
.page-head .crumb { display: block; margin-bottom: .6rem; text-decoration: none; }
.page-head .crumb::before, .book-hero .crumb::before { content: "← "; }
.page-head .lede { margin-top: 1rem; }
.cat-list { justify-content: center; margin-top: 2rem; }
.page-head .tag-list a { color: var(--cream); border-color: var(--line-d); }
.page-head.lost .cta-row { justify-content: center; }

/* Single book */
.book-hero {
  padding: calc(var(--head) + clamp(3rem, 7vw, 5.5rem)) 0 clamp(4rem, 8vw, 6rem);
  background: radial-gradient(ellipse 50% 70% at 22% 55%, rgba(242, 165, 64, .16), transparent 70%), var(--deep);
}
.book-hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 6rem); align-items: center; }
.book-hero .crumb { text-decoration: none; color: var(--gold); }
.formats { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; border-top: 1px solid var(--line-d); border-left: 1px solid var(--line-d); max-width: 560px; }
.formats li { flex: 1 1 120px; display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; border-right: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d); }
.formats span { font: 500 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted-d); }
.formats b { font: 500 1.6rem/1.1 var(--display); color: var(--gold-2); }
.book-body-grid { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(3rem, 6vw, 5.5rem); align-items: start; }
.book-prose > p:first-child { font: italic 500 1.65rem/1.4 var(--display); color: var(--teal); }
.book-side { position: sticky; top: calc(var(--head) + 2rem); padding: 2rem; background: var(--cream); border: 1px solid var(--line); }
.mini-h { font: 500 .72rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-3); margin: 0 0 1rem; }
.mini-h:not(:first-child) { margin-top: 2rem; }
.details { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.2rem; margin: 0; font-size: 1.02rem; }
.details dt { font: 500 .72rem/1.9 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 0; }
.book-side .ku { color: var(--muted); margin-bottom: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.tag-list li, .tag-list a { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 99px; font: 400 .74rem var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.tag-list li:has(a) { padding: 0; border: 0; }
.content-note { margin-top: 2.6rem; padding: 1.4rem 1.6rem; border-left: 2px solid var(--gold); background: var(--cream); font-size: 1.02rem; }
.prose .content-note h2 { font: 500 .72rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-3); margin: 0 0 .6rem; }
.content-note p { margin: 0 0 .5em; }
.content-note p:last-child { margin: 0; }

/* Bookshelf */
.shelf { display: grid; gap: 3rem; }
.book-card { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(2rem, 4vw, 3rem); background: var(--cream); border: 1px solid var(--line); }
.book-card-cover { display: block; perspective: 1400px; text-decoration: none; }
.book-card-cover .book3d { --ry: -16deg; width: 100%; }
.book-card-cover:hover .book3d { --ry: -6deg; }
.book-card h3 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 500; margin-bottom: .4rem; }
.book-card h3 a { text-decoration: none; }
.book-card .kicker { margin-bottom: .6rem; }
.hook-sm { font: italic 500 1.35rem/1.35 var(--display); color: var(--gold-3); }
.book-card-body > p:not(.hook-sm) { color: #3A4547; }
.book-card .cta-row { margin-top: 1.2rem; }

/* Praise */
.praise { background: var(--cream); }
.praise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.quote { margin: 0; padding: 2rem; border-top: 1px solid var(--gold); }
.quote blockquote { margin: 0; font: italic 500 1.5rem/1.4 var(--display); }
.quote figcaption { margin-top: 1rem; font: 500 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); }

/* Long-form text */
.prose { font-size: 1.2rem; line-height: 1.78; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 2rem; font-weight: 500; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.5rem; margin: 1.8em 0 .5em; }
.prose a { color: var(--gold-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose blockquote { margin: 2em 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--gold); font: italic 500 1.6rem/1.4 var(--display); color: var(--teal); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--gold); }
.prose figure { margin: 2em 0; }
.prose figcaption { font: 400 .8rem var(--sans); color: var(--muted); margin-top: .6rem; }
.prose hr { border: 0; height: 24px; margin: 2.6em auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M20 15c4-1 8-4 10-8M30 7c-4 0-7 2-8 5M30 7c1 4 4 6 8 7M40 15c-4-1-8-4-10-8' fill='none' stroke='%23C9A55C' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 60px no-repeat; }
.entry-prose > p:first-child::first-letter { float: left; font: 500 4.6rem/.8 var(--display); color: var(--gold-3); margin: .1em .12em 0 0; }

/* Single post */
.entry-head h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.entry-meta { font: 400 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); margin: 1rem 0 0; }
.entry-img { margin-top: -2.5rem; margin-bottom: 0; position: relative; }
/* Shown whole: wide images span the column, square or tall ones (like the book mock-up) sit centred, never cropped */
.entry-img img { display: block; width: auto; height: auto; max-width: 100%; max-height: 620px; margin-inline: auto; box-shadow: 0 30px 60px -30px rgba(6, 23, 27, .5); }
.entry-prose { padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; }
.author-note { display: flex; gap: 1.6rem; align-items: flex-start; margin: 3rem 0; padding: 2rem; background: var(--cream); border: 1px solid var(--line); }
.author-note img { width: 54px; flex: none; }
.author-note h2 { font-size: 1.6rem; margin-bottom: .4rem; }
.author-note p { color: var(--muted); font-size: 1.05rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; padding-bottom: clamp(4rem, 8vw, 6rem); }
.post-nav a { display: block; text-decoration: none; font: 600 1.35rem/1.25 var(--display); }
.post-nav a span { display: block; font: 500 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); margin-bottom: .4rem; }
.post-nav .next { text-align: right; grid-column: 2; }

/* Footer */
.foot { background: var(--ink); padding: clamp(4rem, 8vw, 5.5rem) 0 2rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-d); }
.foot-logo { display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; font: 600 1.5rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.foot-logo img { width: 46px; }
.foot-blurb { margin: 1.2rem 0 1.6rem; color: var(--muted-d); font-style: italic; }
.foot .social a { color: var(--gold); }
.foot .social a:hover { background: var(--gold); color: var(--ink); }
.foot-h { font: 500 .72rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li + li { margin-top: .55rem; }
.foot-grid ul:not(.social) a { text-decoration: none; color: rgba(244, 238, 226, .78); font-size: 1.05rem; }
.foot-grid ul:not(.social) a:hover { color: var(--gold-2); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.8rem; font: 400 .76rem var(--sans); letter-spacing: .06em; color: var(--muted-d); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet and phone */
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .head-cta .btn { display: none; }
  /* backdrop-filter would trap the fixed menu panel inside the header bar */
  .solid-head .site-head, .site-head.stuck { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 29, 34, .97); }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 2.6rem;
    background: rgba(6, 23, 27, .97);
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav.open { opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: center; gap: 1.6rem; }
  .nav-list a { font: 500 2rem/1 var(--display); letter-spacing: .08em; }
  .nav-social { display: flex; }
  .nav-social a { color: var(--gold); }
  .spot-grid, .book-hero-grid, .about-grid, .book-body-grid { grid-template-columns: minmax(0, 1fr); }
  .spot-visual .book3d { width: min(68vw, 320px); }
  .spot-copy, .book-copy { text-align: center; }
  .spot-copy .cta-row, .book-copy .cta-row, .facts { justify-content: center; }
  .hook, .blurb { margin-inline: auto; }
  .formats { margin-inline: auto; }
  .about-photo, .about-page .about-photo { position: relative; top: 0; max-width: 560px; }
  .book-side { position: static; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-lead { grid-template-columns: 1fr; }
  .post-lead .post-img { min-height: 0; aspect-ratio: 16 / 9; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 782px) { .admin-bar .site-head { top: 46px; } }
@media (max-width: 700px) {
  :root { --head: 64px; }
  body { font-size: 1.1rem; }
  .brand-name { font-size: 1.12rem; letter-spacing: .1em; }
  .brand-mark { width: 28px; }
  .hero-bg img, .hero-bg canvas { object-position: 74% 60%; }
  .hero-inner { padding-bottom: 6rem; }
  .post-grid { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: start; }
  .book-card { grid-template-columns: 1fr; text-align: center; }
  .book-card-cover { width: min(60vw, 240px); margin-inline: auto; }
  .book-card .cta-row { justify-content: center; }
  .news-form { flex-direction: column; gap: 6px; }
  .news-form .btn { justify-content: center; }
  .author-note { flex-direction: column; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; text-align: left; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
}

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