/* /book — …ERGO, IT THINKS. Black ground, amber and cream, read off the book's cover.
   Everything is scoped under .bk so nothing leaks into the rest of the site. */

@font-face { font-family: "Ergo Title"; src: url("assets/book/fonts/LiberationSansNarrow-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Ergo Sans"; src: url("assets/book/fonts/LiberationSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ergo Sans"; src: url("assets/book/fonts/LiberationSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/book/fonts/SourceSerif4-400-600.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/book/fonts/SourceSerif4-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

.bk {
  --amber: #f0a93a;
  --cream: #f4efe3;
  --dim: #d6cfbd;
  --mute: #8a8476;
  --rule: rgba(244, 239, 227, .16);
  --title: "Ergo Title", "Liberation Sans Narrow", "Arial Narrow", sans-serif;
  --sans: "Ergo Sans", "Liberation Sans", Arial, sans-serif;
  --gut: clamp(16px, 4vw, 40px);
  position: relative;
  z-index: 2;
  background: #000;
  color: var(--cream);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: left;
}
.bk *, .bk *::before, .bk *::after { box-sizing: border-box; }
.bk a { color: var(--cream); text-decoration: underline; text-decoration-color: rgba(244, 239, 227, .4); text-underline-offset: .22em; }
.bk a:hover { color: var(--amber); text-decoration-color: var(--amber); }
.bk ::selection { background: rgba(240, 169, 58, .35); color: var(--cream); }
.bk :focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.bk h1, .bk h2, .bk p, .bk figure, .bk blockquote, .bk ul, .bk ol { margin: 0; padding: 0; font-weight: inherit; }
.bk button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.bk summary { list-style: none; cursor: pointer; }
.bk summary::-webkit-details-marker { display: none; }
.bk input::placeholder { color: var(--mute); }
.bk .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* small caps label used across sections */
.bk .lbl { font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.bk .ttl { font-family: var(--title); font-weight: 700; text-transform: uppercase; line-height: 1.05; }
.bk .plus { position: absolute; font-family: var(--sans); font-size: 13px; line-height: 1; color: var(--mute); pointer-events: none; }
.bk .plus--tl { top: -9px; left: -6px; } .bk .plus--tr { top: -9px; right: -6px; }
.bk .plus--bl { bottom: -8px; left: -6px; } .bk .plus--br { bottom: -8px; right: -6px; }

/* ── hero ─────────────────────────────────────────────── */
.bk-hero { position: relative; overflow: hidden; min-height: min(100svh, 820px); display: flex; flex-direction: column; }
.bk-threads { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%); }
.bk-nav { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px var(--gut); }
.bk-nav__mark { text-decoration: none !important; font-family: var(--title); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.bk-nav__mark span:first-child { color: var(--amber); }
.bk-nav__link { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; min-height: 44px; display: inline-flex; align-items: center; }
.bk-hero__body { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(8px, 2vh, 24px) var(--gut) clamp(16px, 3vh, 32px); }
.bk-head { position: relative; display: block; height: clamp(220px, 44vh, 460px); width: auto; max-width: 100%; margin: 0 0 clamp(24px, 4.5vh, 44px); }
.bk-h1 { position: relative; width: 100%; margin: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0;
  font-family: var(--title); font-weight: 700; text-transform: uppercase; line-height: 1.1; cursor: default; user-select: none; font-size: min(4.2vw, 76px); }
.bk-h1__slot { position: relative; display: block; height: 1.1em; --prem: .78em; }
.bk-h1__slot > span { position: absolute; right: 0; top: 0; white-space: nowrap; transition: transform .65s cubic-bezier(.6, 0, .2, 1), opacity .65s ease; }
.bk-h1__dots { color: var(--amber); }
.bk-h1__prem { font-family: "Source Serif 4", Georgia, serif; font-style: italic; font-weight: 400; text-transform: none; font-size: var(--prem); color: var(--cream); padding-right: .55em; letter-spacing: .015em; }
.bk-h1__rest { text-align: left; white-space: nowrap; }
.bk-h1__rest .e { color: var(--amber); }
/* phones: the line before ERGO ends at the centre, ERGO, starts at the centre; IT THINKS sits centred below */
.bk-h1--narrow { font-size: min(11vw, 60px); row-gap: .04em; }
.bk-h1--narrow .bk-h1__slot { --prem: .62em; }
.bk-h1--narrow .bk-h1__prem { padding-right: .32em; }
.bk-h1--narrow .bk-h1__rest { grid-column: 1 / -1; text-align: center; }
.bk-h1--narrow .bk-h1__rest.e1 { grid-column: auto; text-align: left; color: var(--amber); }
.bk-sub, .bk-by { position: relative; font-family: var(--sans); font-size: clamp(11px, 1.1vw, 14px); letter-spacing: .2em; padding-left: .2em; text-transform: uppercase; }
.bk-sub { margin: clamp(18px, 3vh, 28px) 0 0 !important; color: var(--dim); }
.bk-by { margin: 12px 0 0 !important; color: var(--cream); }
.bk-by b { letter-spacing: .32em; }
/* ── sections ─────────────────────────────────────────── */
.bk-sec { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gut); position: relative; }
.bk-about { padding: clamp(32px, 5vw, 72px) var(--gut) clamp(40px, 6vw, 80px); }
.bk-about .lbl { margin-bottom: clamp(28px, 4vw, 44px); }
.bk-about__lead { max-width: 40rem; margin: clamp(48px, 7vw, 88px) 0 0 !important; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; text-wrap: pretty; }

/* the opening scene */
.bk-scene { max-width: 46rem; }
.bk-scene__intro { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: var(--dim); text-wrap: pretty; }
.bk-scene__q { position: relative; margin: clamp(28px, 4vw, 44px) 0 clamp(20px, 3vw, 32px) !important; font-family: "Source Serif 4", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(36px, 5vw, 68px); line-height: 1.1; color: var(--cream); }
.bk-scene__ghost { color: transparent; }
.bk-scene__caret { display: inline-block; width: .08em; height: .9em; margin: 0 -.08em 0 .03em; vertical-align: -.08em; background: var(--amber); opacity: 0; }
.bk-scene__caret.on { animation: bk-blink .9s steps(1) infinite; opacity: 1; }
@keyframes bk-blink { 50% { opacity: 0; } }
.bk-scene__a { font-size: clamp(22px, 2.3vw, 31px); line-height: 1.4; text-wrap: pretty; }
.bk-scene__a span { opacity: 0; transition: opacity .35s ease; }
.bk-scene__a span.in { opacity: 1; }
.bk-scene__a em { display: inline-block; color: var(--amber); font-style: italic; opacity: 0; transform: translateY(.2em); transition: opacity .8s ease, transform .8s ease; }
.bk-scene__a em.in { opacity: 1; transform: none; }
.bk-scene__src { margin: 18px 0 0 !important; font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }

/* the closing line of the book section */
.bk-turns__close { margin: clamp(28px, 4vw, 44px) 0 0 !important; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; }
.bk-turns__close span { color: var(--dim); }

/* why this book */
.bk-why { max-width: 820px; }
.bk-why__txt { margin-top: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.6; text-wrap: pretty; }
.bk-why__txt p:first-child { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.35; }
.bk-why__sign { margin: 28px 0 0 !important; font-family: var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }

/* moments */
.bk-moments { max-width: 1240px; padding: clamp(56px, 9vw, 120px) var(--gut); }
.bk-stage { position: relative; height: 440px; cursor: pointer; }
.bk-stage__axis { position: absolute; left: 0; right: 0; top: 220px; height: 1px; background: #333; }
.bk-stage__plus { position: absolute; top: 213px; font-family: var(--sans); font-size: 13px; line-height: 1; color: #555; }
.bk-still { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; }
.bk-still li { line-height: 1.35; }
.bk-still .y { font-family: var(--title); font-weight: 700; font-size: 22px; text-transform: uppercase; color: var(--amber); }
.bk-still .dark .y { color: transparent; -webkit-text-stroke: 1px rgba(244, 239, 227, .55); }
.bk-still .n { font-family: var(--sans); font-size: 14px; color: var(--cream); }

/* author */
.bk-author { padding: clamp(72px, 11vw, 150px) var(--gut); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: center; }
.bk-author figure { position: relative; width: min(100%, 360px); justify-self: center; }
.bk-author img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); background: #0a0a0a; }
.bk-author__txt { max-width: 32rem; }
.bk-author__name { margin: 14px 0 0 !important; font-size: clamp(34px, 4.4vw, 60px); }
.bk-author__txt p.bio { margin: 24px 0 0 !important; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; text-wrap: pretty; }
.bk-author__txt p.bio + p.bio { margin-top: 16px !important; color: var(--dim); }

/* notify */
.bk-notify { position: relative; max-width: 640px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px); border: 1px solid var(--rule); }
.bk-notify h2 { font-size: clamp(30px, 3.8vw, 48px); text-wrap: balance; }
.bk-notify__sub { margin: 16px 0 32px !important; font-size: 18px; line-height: 1.5; color: var(--dim); }
.bk-notify form { display: flex; flex-direction: column; gap: 10px; }
.bk-notify label { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.bk-notify__row { display: flex; flex-wrap: wrap; gap: 12px; }
.bk-notify input { flex: 1 1 240px; min-width: 0; min-height: 50px; padding: 0 16px; background: transparent; border: 1px solid rgba(244, 239, 227, .4); border-radius: 0; color: var(--cream); font-family: var(--sans); font-size: 16px; }
.bk-notify input:focus { border-color: var(--amber); }
.bk-notify button[type="submit"] { flex: 0 0 auto; min-height: 50px; padding: 0 28px; background: var(--cream); border: 1px solid var(--cream); border-radius: 0; color: #000; font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; transition: background .2s, border-color .2s; }
.bk-notify button[type="submit"]:hover { background: var(--amber); border-color: var(--amber); }
.bk-notify button[type="submit"]:active { background: var(--dim); border-color: var(--dim); }
.bk-notify__msg { margin: 6px 0 0 !important; min-height: 1.5em; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--dim); }
.bk-notify__msg.err { color: var(--amber); }
.bk-notify__priv { margin: 12px 0 0 !important; font-family: var(--sans); font-size: 13px; line-height: 1.55; color: var(--dim); }

/* faq */
.bk-faq { max-width: 820px; }
.bk-faq .lbl { margin-bottom: 32px; }
.bk-faq__list { border-top: 1px solid var(--rule); }
.bk-faq details { border-bottom: 1px solid var(--rule); }
.bk-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 0; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.35; }
.bk-faq summary:hover { color: var(--amber); }
.bk-faq summary b { font-family: var(--sans); font-weight: 400; font-size: 18px; color: var(--dim); }
.bk-faq details[open] summary b { transform: rotate(45deg); }
.bk-faq details p { padding: 0 0 24px; max-width: 36em; font-size: 18px; line-height: 1.6; color: var(--dim); text-wrap: pretty; }

.bk-foot { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gut) 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-family: var(--sans); font-size: 13px; line-height: 1.6; color: var(--dim); }

/* ── phones ───────────────────────────────────────────── */
@media (max-width: 719px) {
  .bk-hero__body { padding-bottom: 12px; }
  .bk-head { height: clamp(200px, 36vh, 300px); }
  .bk-sub { margin-top: 16px !important; }
  .bk-nav__mark { font-size: 16px; }
  .bk-stage { height: 400px; }
  .bk-author figure { width: min(100%, 300px); }
  .bk-notify { padding: 28px 18px; }
  .bk-notify button[type="submit"] { flex: 1 1 100%; }
  .bk-foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .bk * { transition: none !important; } }
