/* AI-Driven Design. Colours sampled from the cover (source/cover.jpg); the calm
   yellow from the book photo Basit sent (source/mockup.jpg). */
@font-face { font-family: "Anton"; src: url("assets/fonts/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("assets/fonts/bebas-neue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Raleway"; src: url("assets/fonts/raleway.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("assets/fonts/raleway-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --ground: #c82128; --bright: #e72d28; --coral: #f05840; --peach: #fbaf7e; --yellow: #faf5a4;
  --mustard: #d6b83b; --mustard-deep: #c9a41c; --ink: #2b1205; --deep: #8e1218;
  --tall: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --heavy: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --sans: "Raleway", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 18px/1.6 var(--sans); color: #fff; background: var(--ground); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; background: var(--yellow); color: var(--deep); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px;
  font: 400 22px/1 var(--tall); letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
  border: 0; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.btn-yellow { background: var(--yellow); color: var(--deep); box-shadow: 0 6px 0 var(--deep); }
.btn-red { background: var(--ground); color: var(--yellow); box-shadow: 0 6px 0 var(--deep); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--deep); }
.btn:focus-visible, .buy-tag:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* The small buy control that stays for the whole page once the hero's button has gone. */
.buy-tag {
  position: fixed; z-index: 40; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  padding: 9px 14px 8px; background: var(--yellow); color: var(--deep); text-decoration: none;
  font: 400 18px/1 var(--tall); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 3px 0 var(--deep);
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.buy-tag.on, html:not(.motion) .buy-tag { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- The story, still version (reduced motion, no JavaScript) ---------- */
.story { position: relative; }
.stage { position: relative; padding: 9vh 7vw 12vh; }
.bands { display: none; }
.yellow-block { display: none; }
.book { margin: 0 auto 8vh; width: min(340px, 70vw); }
.hero { margin-bottom: 14vh; }
.line, .lane-word, .hook { margin: 0 0 9vh; max-width: 900px; }
.lane-word { font: 400 30px/1.1 var(--tall); letter-spacing: .04em; color: var(--peach); margin-bottom: 2vh; }
.lane-word[data-lane="2"] { margin-bottom: 9vh; }
html:not(.motion) .stage {
  background:
    linear-gradient(135deg, transparent 0 62%, var(--bright) 62% 68%, var(--coral) 68% 74%, var(--peach) 74% 80%, transparent 80%) top right / 60vw 60vw no-repeat,
    var(--ground);
}

.hero-kicker { margin: 0; font: 400 clamp(26px, 3vw, 46px)/1 var(--tall); letter-spacing: .02em; text-transform: uppercase; }
.hero h1 { margin: .08em 0 .18em; font: 400 clamp(64px, 9.4vw, 158px)/.86 var(--heavy); text-transform: uppercase; letter-spacing: -.005em; }
.hero h1 span { display: block; }
.hero h1 .t2 { color: var(--yellow); }
.hero-sub { margin: 0 0 .9em; max-width: 25em; font: 500 clamp(17px, 1.6vw, 25px)/1.3 var(--sans); }
/* The opening's bands run behind these lines as on the cover; a soft shadow keeps them readable over peach. */
.hero-sub, .hero-names, .hero-kicker { text-shadow: 0 1px 14px rgba(120, 10, 16, .55); }
.hero-names { margin: 0 0 1.2em; font: 400 clamp(24px, 2.5vw, 40px)/1 var(--tall); letter-spacing: .02em; text-transform: uppercase; }

.line { font: 400 clamp(34px, 4.2vw, 68px)/1.05 var(--tall); letter-spacing: .01em; text-transform: uppercase; }
.line .k { font-family: var(--heavy); font-style: normal; font-size: 1.22em; letter-spacing: 0; }
.line .y { color: var(--yellow); }
.line .w { display: inline-block; }
.l-decades .w, .l-q1 .w { display: block; }
.l-q2 { font-size: clamp(44px, 6vw, 104px); line-height: .98; }
.l-5c { font-size: clamp(60px, 8.4vw, 150px); line-height: .9; }
.l-5c .k { font-size: 1.3em; }
.l-7a .k { font-size: 1.3em; }

/* ---------- The story, moving version (html.motion is set by script.js) ---------- */
html.motion .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: 0;
}
html.motion .bands { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
html.motion .book { position: absolute; left: 0; top: 0; margin: 0; width: 10px; height: 10px; will-change: transform, opacity; }
html.motion .book img { width: 100%; height: 100%; object-fit: contain; }
html.motion .yellow-block { display: block; position: absolute; left: 0; top: 0; background: var(--yellow); opacity: 0; will-change: transform, opacity; }
html.motion .hero, html.motion .line, html.motion .lane-word, html.motion .hook { position: absolute; margin: 0; will-change: transform, opacity; }
html.motion [data-in] { visibility: hidden; }
html.motion .lane-word { left: 0; top: 0; white-space: nowrap; color: #fff; font-size: clamp(22px, 2.3vw, 36px); }

html.motion .hero { left: 6vw; top: 50%; transform: translateY(-50%); width: min(46vw, 700px); }
html.motion .l-decades, html.motion .l-econ { left: 6vw; top: 9vh; width: min(62vw, 1000px); font-size: clamp(30px, 3.5vw, 58px); }
html.motion .l-faster { left: 0; top: 0; white-space: nowrap; font-size: clamp(30px, 3.6vw, 60px); }
html.motion .l-q1 { left: 10vw; right: 10vw; top: 7vh; text-align: center; font-size: clamp(24px, 2.5vw, 42px); }
html.motion .l-q2 { left: 8vw; right: 8vw; top: 21vh; text-align: center; }
html.motion .l-5a { left: 6vw; top: 79vh; width: min(58vw, 980px); font-size: clamp(26px, 2.8vw, 46px); }
/* Right-aligned to end just short of the yellow block at the arrow's point (tip at 80vw). */
html.motion .l-5b, html.motion .l-5c { left: 6vw; right: calc(20vw + 150px); text-align: right; }
html.motion .l-5b { top: 30vh; font-size: clamp(26px, 2.8vw, 46px); }
html.motion .l-5c { top: 38vh; font-size: clamp(56px, 6.6vw, 120px); }
html.motion .l-6a { left: 6vw; top: 17vh; width: min(52vw, 860px); font-size: clamp(30px, 3.4vw, 56px); }
html.motion .l-6b { left: 6vw; top: 63vh; width: min(52vw, 860px); font-size: clamp(26px, 2.8vw, 46px); }
html.motion .l-7a { left: 6vw; top: 26vh; width: min(40vw, 640px); font-size: clamp(32px, 3.6vw, 60px); }
html.motion .hook { left: 0; top: 0; }

/* Phones and upright tablets: words in the top of the screen, the book and bands below (script.js uses the same test). */
@media (max-width: 760px), (max-aspect-ratio: 5/6) {
  html.motion .hero { left: 6vw; right: 6vw; top: 7svh; transform: none; width: auto; }
  .hero h1 { font-size: clamp(52px, 16vw, 120px); }
  .hero-kicker { font-size: clamp(24px, 6vw, 40px); }
  .hero-sub { font-size: clamp(15px, 3.6vw, 24px); max-width: 21em; margin-bottom: .6em; }
  .hero-names { font-size: clamp(22px, 5.4vw, 36px); margin-bottom: .7em; }
  .line { font-size: clamp(30px, 7.6vw, 54px); }
  html.motion .l-decades, html.motion .l-econ { left: 6vw; right: 6vw; top: 9svh; width: auto; font-size: clamp(30px, 7.6vw, 54px); }
  html.motion .l-faster { font-size: clamp(26px, 6.6vw, 48px); }
  html.motion .l-q1 { left: 6vw; right: 6vw; top: 6svh; font-size: clamp(22px, 5.6vw, 40px); }
  html.motion .l-q2 { left: 6vw; right: 6vw; top: 17svh; font-size: clamp(40px, 10vw, 76px); }
  html.motion .l-5a { left: 6vw; right: 6vw; top: 32svh; width: auto; font-size: clamp(22px, 5.6vw, 40px); }
  html.motion .l-5b, html.motion .l-5c { left: 6vw; right: 6vw; text-align: left; }
  html.motion .l-5b { top: 9svh; font-size: clamp(24px, 6vw, 42px); }
  html.motion .l-5c { top: 14svh; font-size: clamp(54px, 13.8vw, 100px); white-space: normal; }
  html.motion .l-6a { left: 6vw; right: 6vw; top: 8svh; width: auto; font-size: clamp(28px, 7.2vw, 50px); }
  html.motion .l-6b { left: 6vw; right: 6vw; top: 24svh; width: auto; font-size: clamp(22px, 5.6vw, 40px); }
  html.motion .l-7a { left: 6vw; right: 6vw; top: 7svh; width: auto; font-size: clamp(27px, 6.9vw, 48px); }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .btn { font-size: 20px; padding: 12px 20px; }
  .buy-tag { font-size: 16px; padding: 8px 11px 7px; }
}

/* ---------- The calm part: buy, pages, community, authors ---------- */
.buy, .pages, .community, .authors, .site-footer { background: var(--mustard); color: var(--ink); }
.buy { border-top: 6px solid var(--peach); padding: 12vh 6vw 10vh; }
.buy-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 5vw; align-items: center; }
.buy-photo img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}
.buy h2 { margin: 0 0 .25em; font: 400 clamp(52px, 6vw, 96px)/.9 var(--heavy); text-transform: uppercase; color: var(--ground); }
.buy h2 .small { display: block; font: 400 .42em/1.1 var(--tall); color: var(--ink); letter-spacing: .02em; }
.buy h2 .design { color: var(--deep); }
.buy-sub { margin: 0 0 .6em; font-weight: 600; font-size: 19px; line-height: 1.35; }
.buy-names { margin: 0 0 1em; font: 400 28px/1 var(--tall); letter-spacing: .03em; text-transform: uppercase; }
.price { margin: 0 0 .7em; font: 400 30px/1 var(--tall); letter-spacing: .04em; color: var(--deep); }
.stores { margin: 0 0 1.6em; }
.soon { display: inline-block; padding: 12px 22px; border: 2px dashed var(--deep); color: var(--deep); font: 400 20px/1 var(--tall); letter-spacing: .06em; text-transform: uppercase; }
.buy-blurb { margin: 0; font-size: 16.5px; line-height: 1.65; max-width: 36em; }

.pages { padding: 6vh 6vw 10vh; text-align: center; }
.pages h2, .community h2 { margin: 0 0 .8em; font: 400 clamp(30px, 3vw, 44px)/1 var(--tall); letter-spacing: .03em; text-transform: uppercase; color: var(--deep); }
.page-sheet {
  max-width: 560px; margin: 0 auto; padding: 64px 48px 56px; background: #fffdf6; color: var(--ink);
  box-shadow: 0 2px 0 #0001, 0 24px 50px -24px #5a3a0080; border-top: 6px solid var(--peach);
}
.ps-kicker { margin: 0; font: 400 24px/1 var(--tall); letter-spacing: .03em; text-transform: uppercase; }
.ps-title { margin: .1em 0 .3em; font: 400 54px/.9 var(--heavy); text-transform: uppercase; color: var(--ground); }
.ps-title span { color: var(--deep); }
.ps-sub { margin: 0 auto 1.4em; max-width: 22em; font-size: 15px; line-height: 1.4; }
.ps-names { margin: 0 0 2.4em; font: 400 22px/1 var(--tall); letter-spacing: .03em; text-transform: uppercase; }
.ps-note { margin: 0; padding-top: 1.4em; border-top: 1px solid #2b120522; font-style: italic; font-size: 15px; opacity: .75; }

.community { padding: 2vh 6vw 10vh; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1240px; margin: 0 auto; box-sizing: content-box; }
.community { max-width: none; }
.card { background: #fffdf6; padding: 36px 36px 40px; border-left: 8px solid var(--ground); max-width: 600px; justify-self: center; width: 100%; }
.card:first-child { justify-self: end; }
.card:last-child { justify-self: start; border-left-color: var(--coral); }
.card p { margin: 0 0 1.4em; font-size: 16.5px; }
.card .btn { overflow-wrap: anywhere; text-align: center; font-size: 18px; text-transform: none; letter-spacing: .02em; font-family: var(--sans); font-weight: 600; }

.authors { padding: 4vh 6vw 8vh; display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; max-width: 1240px; margin: 0 auto; box-sizing: content-box; }
.authors { max-width: none; }
.author { max-width: 560px; justify-self: center; }
.author img { width: 220px; aspect-ratio: 1; object-fit: cover; box-shadow: 14px 14px 0 var(--ground); margin-bottom: 30px; }
.author h3 { margin: 0 0 .4em; font: 400 40px/1 var(--tall); letter-spacing: .03em; text-transform: uppercase; color: var(--deep); }
.author p { margin: 0; font-size: 16.5px; }

.site-footer { padding: 5vh 6vw 6vh; border-top: 2px solid #2b120522; text-align: center; font-size: 14px; }
.site-footer p { margin: 0 0 .5em; }
.site-footer a { color: var(--deep); font-weight: 700; }

@media (max-width: 860px) {
  .buy-inner, .community, .authors { grid-template-columns: minmax(0, 1fr); }
  .card:first-child, .card:last-child { justify-self: stretch; }
  .buy { padding-top: 8vh; }
  .page-sheet { padding: 44px 26px 40px; }
  .ps-title { font-size: 42px; }
}

/* Concept-preview tape. The server adds it to the page (lib/preview-notice.mjs).
   Slim and translucent at the bottom so it never takes space from the story;
   only its controls take clicks. Adapted from Christmas at the Love Lodge. */
.preview-notice {
  position: fixed; z-index: 45; inset: auto 0 0;
  height: calc(44px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: none;
  background: #f3cf45ed; color: #111;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #111;
}
.preview-notice::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: repeating-linear-gradient(115deg, #111 0 12px, transparent 12px 22px);
}
.preview-tape {
  position: absolute; inset: 4px 260px auto 0; height: 39px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
}
.preview-notice[data-preview-notice="neutral"] .preview-tape { right: 64px; }
.preview-tape-track { display: flex; width: max-content; animation: preview-tape-flow 34s linear infinite; }
.preview-tape-group { display: flex; flex-shrink: 0; }
.preview-tape-group > span {
  display: flex; align-items: center; gap: 1.8rem; padding-right: 1.8rem; height: 39px; white-space: nowrap;
  font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
}
.preview-tape-group i { font-style: normal; font-size: 0.9rem; }
@keyframes preview-tape-flow { to { transform: translateX(-50%); } }
.preview-tape-controls {
  position: absolute; top: 0; right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 0.5rem; align-items: center; pointer-events: auto;
}
.preview-tape-controls a, .preview-tape-pause {
  display: inline-flex; justify-content: center; gap: 0.65rem; align-items: center;
  min-height: 44px; padding: 0.4rem 0.65rem; border: 0; background: transparent; color: #111;
  text-decoration: none; font: 700 0.78rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.preview-tape-controls a { border-left: 1px solid #1115; }
.preview-cta-copy { display: flex; flex-direction: column; gap: 4px; }
.preview-cta-copy small { font: 500 0.66rem/1 var(--sans); letter-spacing: 0.08em; }
.preview-tape-controls a:hover, .preview-tape-pause:hover { background: #1111; }
.preview-tape-controls a:focus-visible, .preview-tape-pause:has(input:focus-visible) { outline: 2px solid #111; outline-offset: -4px; }
.preview-tape-pause { position: relative; width: 44px; }
.preview-tape-pause svg { fill: currentColor; }
.preview-tape-pause input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.preview-tape-pause .i-play, .preview-notice:has(input:checked) .i-pause { display: none; }
.preview-notice:has(input:checked) .i-play { display: inline; }
.preview-notice:has(input:checked) .preview-tape-track { animation-play-state: paused; }
.has-preview-notice .site-footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .preview-tape { right: 195px; }
  .preview-notice[data-preview-notice="neutral"] .preview-tape { right: 52px; }
  .preview-tape-group > span { font-size: 0.66rem; gap: 1.2rem; padding-right: 1.2rem; }
  .preview-tape-controls { right: max(4px, env(safe-area-inset-right)); gap: 0; }
  .preview-tape-controls a { font-size: 0.7rem; padding-inline: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-tape-track { animation: none; }
  .preview-tape-pause { display: none; }
  .btn, .buy-tag { transition: none; }
}
