/*
 * Developed by A-Y
 * Frontend Development & Custom CSS
 * Email: ahmeddeveloper33@gmail.com
 *
 * brucedobish.com
 * One stylesheet for every page. No framework, no build step.
 */

/* ------------------------------------------------------------
   Tokens
------------------------------------------------------------ */
:root {
  --bg: #F7F6F3;
  --bg-2: #EFEDE8;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink-2: #424245;
  --mute: #6E6E73;
  --faint: #A1A1A6;
  --line: rgba(29, 29, 31, .12);
  --line-2: rgba(29, 29, 31, .07);

  --accent: #A3222B;          /* garnet, pulled from the cover */
  --accent-hover: #8C1B23;
  --accent-soft: #F3E3E1;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;

  --nav-h: 56px;
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 22px;

  --shadow-sm: 0 1px 2px rgba(20, 16, 14, .04), 0 6px 20px rgba(20, 16, 14, .05);
  --shadow-lg: 0 1px 2px rgba(20, 16, 14, .04), 0 30px 70px -36px rgba(40, 22, 18, .32);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

/* ------------------------------------------------------------
   Base
------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 300;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
  transform: translateY(-160%); transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.wrap--narrow { max-width: calc(860px + var(--gutter) * 2); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Page transitions between pages (Chrome and Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

/* ------------------------------------------------------------
   Type helpers
------------------------------------------------------------ */
.kicker { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: -.005em; }
.h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: 1.02; letter-spacing: -.022em;
  margin-top: 12px;
}
.h2 em { font-style: italic; color: var(--accent); }
.h2, .page-title, .intro__line, .pull, .stop__card h3, .next strong, .press__card h3, .pages__item { text-wrap: balance; }
.lede, .hero__lede, .intro__body, .prose p, .stop__card p { text-wrap: pretty; }
.lede {
  font-family: var(--serif);
  font-size: clamp(1.18rem, 1.55vw, 1.4rem);
  line-height: 1.55; color: var(--ink-2);
  margin-top: 18px; max-width: 54ch;
}
.prose p { font-size: clamp(1.02rem, 1.12vw, 1.1rem); line-height: 1.72; color: var(--ink-2); max-width: 60ch; }
.prose p + p { margin-top: 16px; }
.prose .lead {
  font-family: var(--serif); color: var(--ink);
  font-size: clamp(1.22rem, 1.6vw, 1.45rem); line-height: 1.55;
}
.hand { font-family: var(--hand); font-weight: 500; }

/* ------------------------------------------------------------
   Buttons and links
------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--tint { background: rgba(29, 29, 31, .065); color: var(--ink); }
.btn--tint:hover { background: rgba(29, 29, 31, .11); }
.btn--block { width: 100%; min-height: 52px; }

.more {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-size: 17px; font-weight: 500;
}
.more svg { width: 8px; height: 13px; transition: transform .25s var(--ease); }
.more:hover svg { transform: translateX(3px); }
.more:hover span { text-decoration: underline; text-underline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }

/* ------------------------------------------------------------
   Navigation
------------------------------------------------------------ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding-top: env(safe-area-inset-top);
  background: rgba(247, 246, 243, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
  view-transition-name: site-nav;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav__inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h);
}
.brand {
  font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: -.01em;
  transition: opacity .2s ease;
}
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__link { position: relative; font-size: 14px; color: var(--ink-2); transition: color .2s ease; }
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -9px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent);
}
.nav__cta { min-height: 34px; padding: 0 16px; font-size: 14px; }

/* Mobile only: iOS style back chevron and collapsed title */
.nav__back, .nav__title { display: none; }
.nav__burger {
  display: none; position: relative;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
}
.nav__burger span {
  position: absolute; left: 12px; width: 20px; height: 1.5px; border-radius: 2px;
  background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav__burger span:nth-child(1) { top: 18px; }
.nav__burger span:nth-child(2) { top: 25px; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* Mobile menu sheet */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 18px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  background: rgba(242, 241, 237, .9);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet__label { font-size: 13px; color: var(--mute); padding: 0 16px 8px; text-transform: uppercase; letter-spacing: .02em; }
.sheet__group {
  background: var(--card); border-radius: 14px; overflow: hidden;
  transform: translateY(14px); transition: transform .45s var(--ease);
}
.sheet__group + .sheet__label { margin-top: 28px; }
.sheet.is-open .sheet__group { transform: none; }
.sheet__row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; padding: 0 16px; font-size: 17px;
}
.sheet__row + .sheet__row::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line-2);
}
.sheet__row svg { width: 8px; height: 13px; color: #C4C4C7; flex: none; }
.sheet__row[aria-current="page"] { color: var(--accent); font-weight: 600; }
.sheet__row:active { background: rgba(0, 0, 0, .04); }
.sheet .btn { margin-top: 24px; }

/* ------------------------------------------------------------
   Sections
------------------------------------------------------------ */
.sec { padding-block: clamp(84px, 12vh, 150px); }
.sec--tight { padding-block: clamp(56px, 8vh, 96px); }
.sec--alt { background: var(--bg-2); }
.sec-head { max-width: 780px; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .lede { margin-inline: auto; }
.sec--first { padding-top: clamp(28px, 5vh, 56px); }
.sec-foot { margin-top: clamp(40px, 6vh, 64px); }
.sec-foot--center { text-align: center; }

/* ------------------------------------------------------------
   Hero (home)
------------------------------------------------------------ */
.hero { padding: calc(var(--nav-h) + clamp(36px, 8vh, 96px)) 0 clamp(64px, 10vh, 120px); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.3rem, 7.6vw, 7.2rem);
  line-height: .93; letter-spacing: -.03em;
  margin-top: 18px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__lede {
  font-family: var(--serif); color: var(--ink-2);
  font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.45;
  max-width: 32ch; margin-top: 28px;
}
.hero__meta { margin-top: 26px; font-size: 14px; color: var(--mute); }

/* Hero composition: a polaroid of Bruce and the book */
.art { position: relative; width: min(100%, 540px); aspect-ratio: 54 / 58; margin-inline: auto; }
.polaroid {
  position: absolute; top: 2%; right: 0; width: 58%;
  padding: 4.4% 4.4% 16%;
  background: #fff; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 34px 60px -30px rgba(40, 22, 18, .42);
  rotate: 4deg;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform .6s var(--ease);
}
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #ddd; }
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 4.6%;
  text-align: center; font-family: var(--hand); font-weight: 500;
  font-size: clamp(19px, 2vw, 25px); color: #2b2b2e;
}
.tape {
  position: absolute; top: -13px; left: 50%; width: 36%; height: 28px;
  translate: -50% 0; rotate: -4deg;
  background: rgba(233, 222, 199, .82);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
  clip-path: polygon(2% 0, 98% 6%, 100% 92%, 0 100%);
}
.art .book-stage { position: absolute; left: 0; bottom: 4%; }

/* ------------------------------------------------------------
   3D book (CSS only)
------------------------------------------------------------ */
.book-stage {
  position: relative;
  perspective: 1600px;
  transform: translate3d(calc(var(--mx, 0px) * -1), calc(var(--my, 0px) * -1), 0);
  transition: transform .6s var(--ease);
}
.book-float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 6px; } }
.book3d {
  --w: clamp(168px, 19vw, 262px);
  --t: clamp(22px, 2.3vw, 32px);
  --ry: 24deg;
  --rx: 3deg;
  position: relative;
  width: var(--w); height: calc(var(--w) * 1.514);
  transform-style: preserve-3d;
  transform: rotateY(var(--ry)) rotateX(var(--rx));
  transition: transform .9s var(--ease);
}
.book3d__front, .book3d__back {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 2px 5px 5px 2px;
  backface-visibility: hidden;
}
.book3d__front { transform: translateZ(calc(var(--t) / 2)); background: #1b0e10; }
.book3d__front img { width: 100%; height: 100%; object-fit: cover; }
.book3d__front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .34) 0, rgba(255, 255, 255, .16) 1.4%, rgba(0, 0, 0, .1) 3.2%, transparent 7%),
    linear-gradient(118deg, rgba(255, 255, 255, .16) 0%, transparent 38%);
}
.book3d__back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); background: #170b0d; }
.book3d__spine {
  position: absolute; top: 0; left: calc(50% - var(--t) / 2);
  width: var(--t); height: 100%;
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: linear-gradient(90deg, #12080a, #2b1116 48%, #12080a);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.book3d__spine span {
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: calc(var(--t) * .34); letter-spacing: .14em;
  text-transform: uppercase; white-space: nowrap; color: #EBD3C8;
}
.book3d__spine span i { font-style: italic; text-transform: none; letter-spacing: .02em; color: #E58A84; }
.book3d__pages {
  position: absolute; top: 1.4%; left: calc(50% - var(--t) / 2 + 1px);
  width: calc(var(--t) - 2px); height: 97.2%;
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px));
  background: repeating-linear-gradient(90deg, #F5F0E7 0 1px, #E3DCCD 1px 2px);
}
.book-shadow {
  position: absolute; left: 6%; right: -10%; bottom: -7%; height: 12%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(40, 20, 18, .34), transparent 72%);
  filter: blur(7px); z-index: -1;
}

/* ------------------------------------------------------------
   Intro statement
------------------------------------------------------------ */
.intro { padding-block: clamp(96px, 16vh, 190px); text-align: center; }
.intro__line {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 5.8vw, 5rem);
  line-height: 1.03; letter-spacing: -.025em;
}
.intro__line + .intro__line { margin-top: .08em; }
.intro__line--alt { font-style: italic; color: var(--accent); }
.intro__body {
  font-family: var(--serif); color: var(--ink-2);
  font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.55;
  max-width: 54ch; margin: 40px auto 0;
}

/* ------------------------------------------------------------
   Author
------------------------------------------------------------ */
.author__grid {
  display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(44px, 7vw, 104px); align-items: center;
}
.portrait { position: relative; width: min(100%, 430px); margin-inline: auto; isolation: isolate; }
.portrait::before {
  content: ""; position: absolute; inset: -16px 16px 16px -16px; z-index: -1;
  border: 1px solid rgba(163, 34, 43, .34); border-radius: 34px;
}
.portrait__img { border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); background: #ddd; }
.portrait__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.chip {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px 8px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .1);
  font-size: 13px; font-weight: 600;
}
.chip svg { width: 14px; height: 14px; color: var(--accent); }
.author__body .prose { margin-top: 26px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.fact { background: var(--card); border-radius: 18px; padding: 18px 18px 16px; box-shadow: var(--shadow-sm); }
.fact__k { font-family: var(--serif); font-weight: 500; font-size: clamp(1.45rem, 2.1vw, 1.85rem); line-height: 1.05; letter-spacing: -.015em; }
.fact__l { font-size: 13px; line-height: 1.35; color: var(--mute); margin-top: 8px; }

/* ------------------------------------------------------------
   iOS style grouped list
------------------------------------------------------------ */
.glist { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 14px; overflow: hidden; }
.glist--muted { background: var(--bg); }
.glist__row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 50px; padding: 12px 18px; font-size: 15px;
}
.glist__row + .glist__row::before,
.glist li + li > .glist__row::before {
  content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; background: var(--line-2);
}
.glist__label { color: var(--mute); flex: none; }
.glist__value { color: var(--ink); font-weight: 500; text-align: right; }
.glist__value small { display: block; font-weight: 400; color: var(--mute); font-size: 13px; }
a.glist__row { transition: background-color .2s ease; }
a.glist__row:hover { background: rgba(0, 0, 0, .025); }
a.glist__row .glist__label { color: var(--ink); }
.glist__end { display: inline-flex; align-items: center; gap: 10px; color: var(--mute); }
.glist__end svg { width: 8px; height: 13px; color: #C4C4C7; }
.glist__icon {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px; margin-right: 12px;
  background: var(--accent); color: #fff;
}
.glist__icon svg { width: 16px; height: 16px; }
.glist__lead { display: inline-flex; align-items: center; }

/* ------------------------------------------------------------
   Book card
------------------------------------------------------------ */
.bookcard {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(36px, 6vw, 92px); align-items: center;
  background: var(--card); border-radius: 34px;
  padding: clamp(28px, 5.5vw, 76px);
  box-shadow: var(--shadow-lg);
}
.cover { position: relative; width: min(100%, 340px); margin-inline: auto; }
.cover img {
  width: 100%; border-radius: 3px 7px 7px 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 44px 70px -34px rgba(60, 22, 20, .55);
  transition: transform .7s var(--ease);
}
.cover::after {
  content: ""; position: absolute; inset: 0; border-radius: 3px 7px 7px 3px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(255, 255, 255, .14) 1.4%, rgba(0, 0, 0, .08) 3%, transparent 7%);
}
.cover:hover img { transform: translateY(-6px); }
.bookcard > .book-stage { justify-self: center; margin-block: 12px 28px; }
.book-stage--lg .book3d { --w: clamp(200px, 23vw, 300px); --t: clamp(26px, 2.6vw, 36px); }
.bookcard__by { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--mute); margin-top: 10px; }
.bookcard .prose { margin-top: 22px; }
.pull {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.32; color: var(--ink);
  margin-top: 26px;
}
.aside { display: inline-block; margin-top: 6px; font-family: var(--hand); font-weight: 500; font-size: clamp(1.55rem, 2.3vw, 1.95rem); color: var(--accent); rotate: -2deg; }
.bookcard .glist { margin-top: 28px; }

/* ------------------------------------------------------------
   In these pages (sticky, scroll driven)
------------------------------------------------------------ */
.pages { position: relative; height: 330vh; background: var(--bg-2); }
.pages__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center;
}
.pages__grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 88px); align-items: center; width: 100%;
}
.pages__stage { display: flex; justify-content: center; position: relative; perspective: 1800px; }
.pages .book3d {
  --w: clamp(180px, 22vw, 300px);
  --t: clamp(26px, 2.8vw, 40px);
  --ry: calc(80deg - var(--p, 0) * 58deg);
  --rx: calc(4deg - var(--p, 0) * 2deg);
  transition: none;
}
.pages__list { list-style: none; margin: 18px 0 0; padding: 0; }
.pages__item {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.9rem, 3.9vw, 3.35rem);
  line-height: 1.08; letter-spacing: -.022em;
  padding-block: .1em;
  color: var(--ink); opacity: .16;
  transition: opacity .45s var(--ease);
}
.pages__item.is-on { opacity: 1; }
.pages__item--end { font-style: italic; color: var(--accent); }
.pages__note { margin-top: 26px; font-size: 15px; color: var(--mute); }

/* ------------------------------------------------------------
   His story: one line, many stops
------------------------------------------------------------ */
.route { position: relative; max-width: 1040px; margin: clamp(52px, 8vh, 96px) auto 0; }
.route__track {
  position: absolute; top: 8px; bottom: 8px; left: 50%;
  width: 6px; margin-left: -3px; border-radius: 6px; background: var(--line-2);
}
.route__fill {
  position: absolute; inset: 0; border-radius: 6px; background: var(--accent);
  transform-origin: top; transform: scaleY(var(--fill, 0));
}
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(36px, 6vh, 72px); }
.stop { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(56px, 8vw, 120px); align-items: center; }
.stop__dot {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: #fff; border: 4px solid var(--ink);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.stop.is-passed .stop__dot { border-color: var(--accent); }
.stop:last-child .stop__dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.stop__card {
  background: var(--card); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 30px);
  box-shadow: var(--shadow-sm);
  max-width: 440px;
}
.stop__card > img { margin: calc(clamp(22px, 2.6vw, 30px) * -1) calc(clamp(22px, 2.6vw, 30px) * -1) 22px; width: calc(100% + clamp(22px, 2.6vw, 30px) * 2); max-width: none; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.stop:nth-child(odd) .stop__card { grid-column: 1; grid-row: 1; justify-self: end; }
.stop:nth-child(even) .stop__card { grid-column: 2; grid-row: 1; justify-self: start; }
.stop__station {
  grid-row: 1; align-self: center;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
}
.stop:nth-child(odd) .stop__station { grid-column: 2; justify-self: start; }
.stop:nth-child(even) .stop__station { grid-column: 1; justify-self: end; text-align: right; }
.stop.is-passed .stop__station { color: var(--accent); }
.stop__card h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem); line-height: 1.08; letter-spacing: -.015em;
}
.stop__card p { margin-top: 10px; color: var(--ink-2); line-height: 1.65; }
.stop__card .more { margin-top: 14px; }

/* ------------------------------------------------------------
   Press and speaking
------------------------------------------------------------ */
.press__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.press__card { background: var(--card); border-radius: 28px; padding: clamp(24px, 3.6vw, 44px); box-shadow: var(--shadow-sm); }
.press__card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 1.9rem); letter-spacing: -.015em; line-height: 1.1; }
.press__card > p { margin-top: 10px; color: var(--ink-2); }
.press__card .glist { margin-top: 22px; }
.list-dot { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.list-dot li { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 15px; font-weight: 500; }

/* Segmented control and bios */
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 10px; background: rgba(118, 118, 128, .14);
  position: relative; margin-top: 22px;
}
.seg button {
  position: relative; z-index: 1;
  min-width: 110px; min-height: 34px; padding: 0 16px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.seg button[aria-selected="true"] { background: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.bio { margin-top: 18px; padding: 20px 22px; border-radius: 16px; background: var(--bg); }
.bio p { color: var(--ink-2); line-height: 1.7; }
.bio p + p { margin-top: 12px; }
.bio[hidden] { display: none; }
.copy-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.copy-row .note { font-size: 14px; color: var(--mute); }

/* ------------------------------------------------------------
   Contact
------------------------------------------------------------ */
.contact__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.contact__info .glist { margin-top: 30px; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-sm); color: var(--ink);
  transition: color .2s ease, transform .2s var(--ease);
}
.social a:hover { color: var(--accent); transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; }

.form-card { background: var(--card); border-radius: 28px; padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow-lg); }
.form-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -.015em; }
.form-card > p { color: var(--mute); font-size: 15px; margin-top: 4px; }
.fgroup { margin-top: 20px; background: var(--bg); border-radius: 14px; overflow: hidden; }
.fgroup + .fgroup { margin-top: 14px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; }
.frow .field + .field { box-shadow: inset 1px 0 0 var(--line-2); }
.field { position: relative; display: block; padding: 11px 16px 9px; transition: background-color .2s ease; }
.fgroup > .field + .field::before,
.fgroup > .frow + .field::before,
.fgroup > .field + .frow::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line-2); }
.fgroup > .field + .frow { position: relative; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--mute); letter-spacing: 0; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin: 1px 0 0; padding: 2px 0 3px;
  border: 0; outline: none; background: transparent; border-radius: 0;
  font: inherit; font-size: 17px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 116px; line-height: 1.5; }
.field select { cursor: pointer; padding-right: 22px; }
.field--select::after {
  content: ""; position: absolute; right: 18px; bottom: 18px;
  width: 7px; height: 7px; border-right: 1.6px solid var(--mute); border-bottom: 1.6px solid var(--mute);
  transform: rotate(45deg); pointer-events: none;
}
.field:focus-within { background: #fff; }
.field:focus-within label { color: var(--accent); }
.field.is-invalid label { color: var(--accent); }
.field__err { display: block; font-size: 12px; color: var(--accent); min-height: 0; }
.field__err:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__submit { margin-top: 18px; }
.form__submit.is-busy { opacity: .6; pointer-events: none; }
.form__status { margin-top: 12px; font-size: 15px; min-height: 22px; color: var(--mute); }
.form__status.is-ok { color: #1E7B3A; }
.form__status.is-err { color: var(--accent); }
.form__fine { margin-top: 6px; font-size: 13px; color: var(--faint); }

/* ------------------------------------------------------------
   Inner pages
------------------------------------------------------------ */
.page-head { padding: calc(var(--nav-h) + clamp(26px, 6vh, 64px)) 0 clamp(8px, 2vh, 24px); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 17px; font-weight: 500; margin-left: -2px; }
.back svg { width: 9px; height: 15px; }
.back:hover span { text-decoration: underline; text-underline-offset: 3px; }
.page-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.9rem, 7.2vw, 5.6rem);
  line-height: .98; letter-spacing: -.03em;
  margin-top: 14px;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-sub { font-family: var(--serif); color: var(--ink-2); font-size: clamp(1.18rem, 1.6vw, 1.42rem); line-height: 1.5; max-width: 56ch; margin-top: 18px; }

.next {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(24px, 3.4vw, 40px) clamp(24px, 3.6vw, 44px);
  border-radius: 28px; background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.next:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.next small { display: block; font-size: 14px; font-weight: 600; color: var(--accent); }
.next strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.02em; line-height: 1.05; margin-top: 4px; }
.next__arrow {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff;
  transition: transform .35s var(--ease);
}
.next__arrow svg { width: 10px; height: 16px; }
.next:hover .next__arrow { transform: translateX(4px); }

.lost { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 40px) 0 60px; }
.lost .page-title { margin-top: 10px; }

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.footer {
  background: #EFEEEA; color: var(--mute); font-size: 13px; line-height: 1.5;
  padding: 52px 0 calc(28px + env(safe-area-inset-bottom));
}
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand { color: var(--ink); font-size: 22px; }
.footer__tag { margin-top: 10px; max-width: 34ch; }
.footer h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { transition: color .2s ease; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------
   Reveal on scroll (only when JS runs)
------------------------------------------------------------ */
.js .r { opacity: 0; translate: 0 18px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.js .r.in { opacity: 1; translate: 0 0; }
.js .r[data-d="1"] { transition-delay: .08s; }
.js .r[data-d="2"] { transition-delay: .16s; }
.js .r[data-d="3"] { transition-delay: .24s; }

/* ------------------------------------------------------------
   Responsive
------------------------------------------------------------ */
@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav-h: 52px; }
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__back {
    display: grid; place-items: center; position: absolute; top: 50%;
    left: calc(max(var(--gutter), env(safe-area-inset-left)) - 14px);
    width: 44px; height: 44px; margin-top: -22px; color: var(--accent);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .nav__back svg { width: 11px; height: 19px; }
  .nav__title {
    display: block; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
    max-width: 56%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 17px; font-weight: 600; letter-spacing: -.02em;
    opacity: 0; transition: opacity .2s ease;
  }
  .nav.show-title .nav__title, .nav.show-title .nav__back { opacity: 1; pointer-events: auto; }
  .nav.show-title .brand { opacity: 0; pointer-events: none; }

  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .art { width: min(100%, 460px); }
  .author__grid, .press__grid, .contact__grid { grid-template-columns: 1fr; }
  .bookcard { grid-template-columns: 1fr; }
  .cover { width: min(70%, 300px); }
}

@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts .fact:last-child { grid-column: 1 / -1; }

  .pages { height: 300vh; }
  .pages__grid { grid-template-columns: 1fr; gap: 26px; text-align: left; }
  .pages__stage { order: -1; }
  .pages .book3d { --w: clamp(130px, 40vw, 180px); --t: 24px; }
  .pages__item { font-size: clamp(1.45rem, 6.6vw, 2rem); }
  .pages__note { margin-top: 16px; font-size: 14px; }

  .route__track { left: 11px; margin-left: 0; }
  .stop { grid-template-columns: 1fr; gap: 10px; padding-left: 40px; align-items: start; }
  .stop__dot { left: 14px; top: 1px; margin: 0 0 0 -10px; width: 20px; height: 20px; }
  .stop:nth-child(odd) .stop__station, .stop:nth-child(even) .stop__station { grid-column: 1; grid-row: 1; justify-self: start; text-align: left; line-height: 22px; }
  .stop:nth-child(odd) .stop__card, .stop:nth-child(even) .stop__card { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; }

  .hero { padding-bottom: 56px; }
  .intro { padding-block: 72px 88px; }
  .portrait { width: min(86%, 430px); }

  .frow { grid-template-columns: 1fr; }
  .frow .field + .field { box-shadow: none; }
  .frow .field + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line-2); }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .next strong { font-size: 1.6rem; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(3rem, 15vw, 3.6rem); }
  .actions .btn { flex: 1 1 auto; }
  .seg button { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .r { opacity: 1; translate: none; }
  .pages { height: auto; }
  .pages__sticky { position: relative; height: auto; padding-block: 96px; }
  .pages__item { opacity: 1; }
  .pages .book3d { --ry: 24deg; }
  @view-transition { navigation: none; }
}
