/* ==========================================================================
   Lee Bartlett — kintsugi for go-to-market systems
   Red means broken. Gold means mended.
   ========================================================================== */

:root {
  --ink: #0c0b0a;
  --ink-2: #14120f;
  --ink-3: #1d1a16;
  --bone: #efe6d6;
  --bone-2: #cfc5b3;
  --muted: #8c8475;
  --dim: #5a544b;
  --gold: #d9a845;
  --gold-hi: #f5dc95;
  --gold-lo: #94661c;
  --red: #e2452f;
  --line: rgba(239, 230, 214, .12);

  --gold-grad: linear-gradient(100deg, #9a6a1c 0%, #d9a845 26%, #fbe7a8 46%, #d9a845 64%, #a8761f 100%);

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 5vw, 84px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  position: relative;
  overflow-x: clip;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(16px, .4vw + 13.5px, 19px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.nowrap { white-space: nowrap; }

.skip {
  position: fixed; left: 12px; top: -64px; z-index: 600;
  background: var(--gold); color: var(--ink);
  padding: 10px 14px; border-radius: 8px;
  font: 500 14px var(--f-mono); text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* The shimmer tile starts and ends on the same colour and slides exactly one tile
   per cycle (a 200%-wide tile at -200% sits 2x the box to the right), so the
   loop has no seam and no jump. */
.gold {
  background-image: linear-gradient(90deg, #a8761f 0%, #d9a845 18%, #fbe7a8 34%, #d9a845 50%, #a8761f 68%, #94661c 84%, #a8761f 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
  padding-right: .06em; /* keep italic overhang inside the clip */
}
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: -200% 0; } }

.seal {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  background: var(--red); color: #fff3e6;
  font: 600 12px/1 var(--f-mono); letter-spacing: .04em;
  border-radius: 5px;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .28);
}

/* ---------- buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .7em;
  padding: 1.05em 1.6em;
  border-radius: 999px;
  border: 1px solid rgba(239, 230, 214, .26);
  font: 500 .76rem/1 var(--f-mono);
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--bone);
  transition: color .45s var(--ease-out), border-color .45s, transform .35s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bone); border-radius: inherit;
  transform: translateY(102%);
  transition: transform .55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--ink); border-color: var(--bone); }
.btn--gold { color: var(--ink); border-color: transparent; background: var(--gold-grad); background-size: 200% 100%; }
.btn--gold::before { background: var(--bone); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- overlays ---------- */
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.grain::before {
  content: ""; position: absolute; inset: -60%;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }   20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -2%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.cracks {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: hidden; pointer-events: none; z-index: 70;
}
.crack { fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset .3s cubic-bezier(.2, .9, .2, 1), opacity .8s; filter: drop-shadow(0 0 3px rgba(226, 69, 47, .7)); }
.mend  { fill: none; stroke: #f0cf7a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.1s cubic-bezier(.65, 0, .25, 1); filter: drop-shadow(0 0 5px rgba(245, 220, 149, .75)); }
.crack-g { transition: opacity 1.5s; }
.crack-g.is-mended .crack { opacity: 0; }
.crack-g.fade { opacity: 0; }
.chip {
  fill: var(--bone);
  transform-box: fill-box; transform-origin: center;
  animation: chip .95s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes chip { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
html.is-shaking main { animation: shake .55s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); }
}

.progress {
  position: fixed; right: 18px; top: 50%; z-index: 80;
  width: 1px; height: 32vh; transform: translateY(-50%);
  background: var(--line);
}
.progress i {
  position: absolute; inset: 0; display: block;
  background: linear-gradient(to bottom, var(--gold-lo), var(--gold-hi));
  transform-origin: top; transform: scaleY(var(--p, 0));
  box-shadow: 0 0 8px rgba(217, 168, 69, .6);
}
@media (max-width: 760px) { .progress { display: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  color: var(--bone);
  transition: color .4s, transform .6s var(--ease-out);
}
.nav::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 11, 10, .88), rgba(12, 11, 10, 0));
  transition: opacity .4s;
}
.nav--light { color: var(--ink); }
.nav--light::before { opacity: 0; }
.nav--hidden { transform: translateY(-110%); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 400 1.12rem var(--f-display); letter-spacing: -.01em; }
.nav__brand:hover .seal { transform: rotate(4deg) scale(1.06); }
.nav__brand .seal { transition: transform .4s var(--ease-out); }
.nav__links { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav__links a {
  position: relative; padding: 6px 0;
  font: 500 .74rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 520px) {
  .nav__name { display: none; }
  .nav__links a { font-size: .68rem; letter-spacing: .12em; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 100px var(--gutter) 92px;
  overflow: hidden;
}
.hero__copy { position: relative; z-index: 3; width: min(57%, 920px); }
.hero__title {
  margin: 0 0 1.8rem;
  font-family: var(--f-display);
  font-weight: 320;
  font-size: clamp(2.6rem, min(5.9vw, 10.6vh), 7.2rem);
  line-height: .98;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
}
.hero__title em { font-weight: 360; }
.line { display: block; overflow: hidden; padding: .06em .16em .12em; margin: -.06em -.16em -.12em; }
.line__in { display: inline-block; }
.js .line__in { transform: translateY(118%) rotate(5deg); transform-origin: 0 100%; }
.is-ready .line__in { transform: none; transition: transform 1.3s var(--ease-out) calc(var(--i, 0) * 110ms + 80ms); }

/* the cracked word: two halves break apart along the crack, then rejoin with a
   gold seam that lives only inside the letters it passes through */
.breakword { position: relative; display: inline-block; }
.breakword__a, .breakword__b { display: inline-block; transition: transform .9s var(--ease-out), color .5s; }
.breakword__a { clip-path: polygon(0 -20%, 53% -20%, 47% 24%, 56% 47%, 45% 71%, 51% 120%, 0 120%); transform-origin: 0 100%; }
.breakword__b { position: absolute; left: 0; top: 0; clip-path: polygon(53% -20%, 100% -20%, 100% 120%, 51% 120%, 45% 71%, 56% 47%, 47% 24%); transform-origin: 100% 100%; }
.breakword__gold { /* the same crack, painted through the glyphs with background-clip */
  position: absolute; left: 0; top: 0; pointer-events: none;
  color: transparent; opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolyline points='53,-20 47,24 56,47 45,71 51,120' fill='none' stroke='%23cf9f3c' stroke-width='4.5' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  transition: opacity .25s;
}
.breakword.is-broken .breakword__a { transform: translate(-.07em, .02em) rotate(-4deg); transition-duration: .16s; color: #f3d6cc; }
.breakword.is-broken .breakword__b { transform: translate(.08em, -.03em) rotate(3.5deg); transition-duration: .16s; color: #f3d6cc; }
.breakword.is-mended .breakword__a { transform: translateX(-.012em); }
.breakword.is-mended .breakword__b { transform: translateX(.012em); }
.breakword.is-mended .breakword__gold { opacity: 1; transition: opacity .4s .45s; }

.hero__lede {
  max-width: 34em; margin: 0 0 2rem;
  font-size: clamp(1.02rem, .5vw + .85rem, 1.22rem);
  color: var(--bone-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.js .hero__lede, .js .hero__cta { opacity: 0; transform: translateY(18px); }
.is-ready .hero__lede, .is-ready .hero__cta { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.is-ready .hero__lede { transition-delay: .55s; }
.is-ready .hero__cta { transition-delay: .7s; }

.hero__portrait {
  position: absolute; z-index: 2;
  right: 0; top: 0; bottom: 0;
  width: min(46vw, 780px);
  margin: 0;
  touch-action: pan-y;
}
.hero__portrait canvas { position: absolute; left: 0; right: 0; top: 84px; bottom: 54px; width: 100%; height: calc(100% - 138px); }
.portrait-fallback { display: none; position: absolute; bottom: 54px; right: 4%; width: 82%; height: auto; filter: grayscale(.3) sepia(.35) contrast(1.05); }
.hero__portrait:not(.is-live) .portrait-fallback { display: block; }

.marquee {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: rgba(12, 11, 10, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 14px 0;
}
/* spacing is a margin, not a gap, so the two halves of the track are exactly equal and -50% loops seamlessly */
.marquee__track { display: flex; align-items: center; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.marquee__track > * { margin-right: 2.2rem; }
html:not(.js) .marquee__track { animation: none; }
.marquee span { font: 300 italic 1.35rem/1 var(--f-display); letter-spacing: -.01em; color: var(--bone-2); font-variation-settings: "SOFT" 100, "WONK" 1; }
.marquee i { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; padding-top: 104px; padding-bottom: 0; }
  .hero__copy { width: 100%; }
  .hero__portrait { position: relative; width: auto; height: 78vh; height: 78svh; margin: 24px calc(var(--gutter) * -1) 0; }
  .hero__portrait canvas { top: 36px; bottom: 56px; height: calc(100% - 92px); }
}

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(42px); transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- divider seam ---------- */
.divider { position: relative; height: 70px; margin: 0 var(--gutter); }
.divider svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.divider polyline {
  fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-linejoin: round;
  stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000);
  transition: stroke-dashoffset 2.4s var(--ease-io);
  filter: drop-shadow(0 0 4px rgba(217, 168, 69, .5));
}
.divider.in polyline { stroke-dashoffset: 0; }

/* ---------- five reasons intro ---------- */
.reasons-intro {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); align-items: center; gap: clamp(30px, 5vw, 90px);
  padding: clamp(110px, 18vh, 200px) var(--gutter) clamp(70px, 10vh, 120px);
}
.bowl { position: relative; animation: float 7s ease-in-out infinite; }
.bowl svg { display: block; width: 100%; height: auto; overflow: visible; transition: transform 1s var(--ease-out); }
.bowl:hover svg { transform: rotate(-5deg) translateY(-6px); }
.bowl__shadow { fill: rgba(217, 168, 69, .07); }
.bowl__foot { fill: #8f826c; }
.bowl__mouth { fill: url(#bowlInside); }
.bowl__lip { fill: none; stroke: rgba(255, 248, 235, .18); stroke-width: 2; }
.bowl__body { fill: url(#bowlGlaze); }
.bowl__sheen { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 6; stroke-linecap: round; filter: blur(3px); }
.bowl__rim { fill: none; stroke: #f6efe2; stroke-width: 3; }
.bowl__seam {
  fill: none; stroke: url(#bowlGold); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1 1.2; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease-io) var(--d, 0s);
  filter: drop-shadow(0 0 4px rgba(245, 220, 149, .55));
}
.bowl__seam--in { stroke-width: 4.5; }
.bowl.in .bowl__seam { stroke-dashoffset: 0; }
html:not(.js) .bowl__seam { stroke-dashoffset: 0; }
@keyframes float { 50% { transform: translateY(-12px); } }
@media (max-width: 1100px) {
  .reasons-intro { grid-template-columns: minmax(0, 1fr); }
  .bowl { width: min(70%, 380px); justify-self: center; order: -1; margin-bottom: 1rem; }
}
.big {
  margin: 0 0 clamp(2.5rem, 6vh, 4.5rem); max-width: 15ch;
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 8.4rem); line-height: .95; letter-spacing: -.045em;
}
.num-outline {
  display: inline-block; margin-right: .05em;
  font-size: 1.55em; line-height: .7; vertical-align: -.16em;
  font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100, "WONK" 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--gold);
}
.toc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 1180px; }
.toc a {
  position: relative;
  display: grid; grid-template-columns: 4.2rem 1fr auto; align-items: baseline; gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font: 330 clamp(1.25rem, 2.5vw, 2.35rem)/1.15 var(--f-display); letter-spacing: -.02em;
  transition: padding .6s var(--ease-out), color .4s;
}
.toc a span:first-child { font: 500 .76rem var(--f-mono); letter-spacing: .14em; color: var(--gold); }
.toc a i { font-style: normal; font: 400 1rem var(--f-mono); color: var(--muted); transition: transform .5s var(--ease-out), color .4s; }
.toc a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease-out);
}
.toc a:hover { padding-left: 1.4rem; color: var(--gold-hi); }
.toc a:hover::after { transform: scaleX(1); }
.toc a:hover i { transform: translateY(4px); color: var(--gold); }

/* ---------- reason (shared) ---------- */
.reason { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(90px, 15vh, 170px) var(--gutter); }
.reason__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 120px); align-items: center; }
.reason__title {
  margin: 0 0 2.2rem;
  font: 320 clamp(1.9rem, 3.5vw, 3.9rem)/1.05 var(--f-display);
  letter-spacing: -.03em;
}
@media (max-width: 900px) { .reason__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 01 the book ----------
   A CSS 3D hardback. The cover is one rigid board; every leaf is a chain of
   hinged strips (.book__leaf > .book__seg > …) so the paper curls
   as it turns. JS writes the transforms; nothing here animates on its own
   except the gentle float. */
/* the section pins while the book opens, so every page gets real scroll distance */
.reason--seller { padding: 0; height: 240vh; }
.seller__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 72px var(--gutter) 24px;
}
@media (max-width: 900px) {
  .seller__sticky .reason__grid { gap: 8px; }
  .seller__sticky .reason__title, .decade__sticky .reason__title { font-size: clamp(1.6rem, 6.4vw, 2.2rem); margin-bottom: 1.2rem; }
}

.book {
  --W: clamp(136px, 15.5vw, 268px);
  --H: calc(var(--W) * 1.5625); /* the real cover is 0.64:1 */
  --S: calc(var(--W) / 6);
  --T: 18px;
  position: relative;
  display: grid; place-items: center;
  height: calc(var(--H) + 190px);
}
@media (max-width: 900px) { .book { --W: clamp(120px, 38vw, 220px); height: calc(var(--H) + 110px); } }
.book__glow {
  position: absolute; left: 50%; top: 50%; pointer-events: none;
  width: calc(var(--W) * 3); height: calc(var(--H) * 1.25);
  margin: calc(var(--H) * -.6) 0 0 calc(var(--W) * -1.5);
  background: radial-gradient(closest-side, rgba(217, 168, 69, .17), rgba(217, 168, 69, 0));
  transform: scaleX(.55);
}
.book__stage { perspective: 1800px; animation: bookFloat 7s ease-in-out infinite; }
@keyframes bookFloat { 50% { transform: translateY(-8px); } }
.book__tilt, .book__obj, .book__cover, .book__leaf, .book__seg { transform-style: preserve-3d; }
.book__tilt { transform: rotateX(10deg) rotateY(-30deg); will-change: transform; }
.book__obj {
  position: relative; width: calc(var(--W) * 2); height: var(--H);
  transform: translateX(calc(var(--W) * -.5));
}
.book__board {
  position: absolute; left: 50%; top: -5px;
  width: calc(var(--W) + 7px); height: calc(var(--H) + 10px);
  background: linear-gradient(135deg, #2a2927, #151514);
  border-radius: 2px 7px 7px 2px;
  transform: translateZ(-2px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
}
/* stands in for the open cover; lies exactly where the turned cover's endpaper would */
.book__board--l { left: auto; right: 50%; transform: translateZ(calc(var(--T) * -1)); box-shadow: none; visibility: hidden; }
/* page-block thickness: fore-edge on the right, bottom edges under each half */
.book__edge, .book__bottom { position: absolute; background-color: #e6dcc8; }
.book__edge {
  top: 0; right: 0; width: var(--T); height: var(--H);
  transform-origin: 100% 50%; transform: rotateY(90deg);
  background-image: repeating-linear-gradient(to right, #f1e9d8 0 1px, #c9bda6 1px 2px);
}
.book__bottom {
  top: 100%; width: var(--W); height: var(--T);
  transform-origin: 50% 0;
  background-image: repeating-linear-gradient(to bottom, #f1e9d8 0 1px, #c9bda6 1px 2px);
}
.book__bottom--r { left: 50%; transform: rotateX(90deg); }
.book__bottom--l { left: 0; transform: translateZ(calc(var(--T) * -1)) rotateX(90deg) scaleY(0); }

.book__cover, .book__leaf, .book__seg { position: absolute; top: 0; transform-origin: 0 50%; }
.book__cover {
  left: 50%; top: -5px;
  width: calc(var(--W) + 7px); height: calc(var(--H) + 10px);
  transform: translateZ(var(--T));
}
.book__leaf { left: 50%; width: calc(var(--S) + 1px); height: var(--H); }
.book__seg { left: var(--S); width: calc(var(--S) + 1px); height: 100%; }
.book__seg--last { width: var(--S); }
.book__face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.book__face--back { transform: rotateY(180deg); }
.book__face > .pg { position: absolute; top: 0; }
.sh { position: absolute; inset: 0; pointer-events: none; }

/* paper */
.pg {
  width: var(--W); height: var(--H);
  background: linear-gradient(to right, #d6c9b0 0, #ece3d0 8%, #f5eee1 26%, #f1e8d8 100%);
}
.pg--verso { background: linear-gradient(to left, #d6c9b0 0, #ece3d0 8%, #f5eee1 26%, #f1e8d8 100%); }
.book__right { position: absolute; left: 50%; top: 0; overflow: hidden; }
.pg--text::before { /* three paragraphs of handwritten-looking squiggles, drawn by JS */
  content: ""; position: absolute; inset: 0;
  background: var(--text-a) 0 0 / 100% 100% no-repeat;
}
.pg--alt::before { background-image: var(--text-b); }
.pg--text::after { /* folio */
  content: attr(data-n); position: absolute; left: 0; right: 0; bottom: 7%;
  text-align: center; font: italic 400 10px/1 var(--f-display); color: #9d917c;
}
.pg--title svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg--title text { font-family: "Alfa Slab One", var(--f-display); text-anchor: middle; fill: #2f2922; }
.pg--title .pg__no1 { fill: #e57a2c; }
.pg--title .pg__by { letter-spacing: .3em; fill: #5a4f40; }
.pg--title polyline { fill: none; stroke: #b8862b; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pg--feature { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 14%; text-align: center; }
.pg--feature b { font: italic 400 calc(var(--W) * .5)/.9 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.04em; color: #a8761f; }
.pg--feature span { margin-top: .7em; font: italic 360 calc(var(--W) * .07)/1.3 var(--f-display); color: #5a4f40; }
.book__hl { /* highlighter strokes that sweep in once the book lies open */
  position: absolute; z-index: 1; left: 13%; width: 66%; height: 1.4%;
  top: 40.5%; /* lines 3 and 4 of the second paragraph */
  background: rgba(226, 178, 79, .5); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--ease-out) .2s;
}
.book__hl--2 { top: 42.4%; width: 40%; transition-delay: .75s; }
.book.is-open .book__hl { transform: scaleX(1); }

/* cover */
/* cover: "The No.1 Best Seller", redrawn in SVG on the charcoal spotlight */
.cover__front {
  border-radius: 2px 6px 6px 2px;
  background: radial-gradient(51.6% 52.8% at 50% 54%, #888886 0, #787876 25%, #575756 50%, #343331 75%, #1c1b18 100%);
}
.cover__front::after { /* spine fold and a soft sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .4) 0, rgba(255, 255, 255, .07) 1.6%, rgba(0, 0, 0, .18) 3.2%, transparent 5.5%),
    linear-gradient(115deg, rgba(255, 255, 255, .07) 0, transparent 38%, transparent 72%, rgba(255, 255, 255, .035) 100%);
}
.cover__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover__art text { font-family: "Alfa Slab One", var(--f-display); fill: #fbfbfa; }
.cover__art .cover__no1, .cover__quote, .cover__quote text { fill: #f58939; }
.cover__quote text { font-family: "Barlow Condensed", var(--f-body); font-style: italic; font-weight: 700; }
.cover__endpaper {
  border-radius: 6px 2px 2px 6px;
  background: linear-gradient(to left, rgba(0, 0, 0, .35), transparent 7%), linear-gradient(160deg, #2b2a28, #191817);
}

/* ---------- 02 kintsugi ten ---------- */
/* pinned like the book: the 10 holds mid-screen until it has mended */
.reason--decade { padding: 0; height: 220vh; }
.decade__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 72px var(--gutter) 24px;
}
.reason--decade .reason__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
@media (max-width: 900px) { .reason--decade .reason__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.ten-wrap { position: relative; }
.ten { display: block; width: 100%; height: auto; max-height: calc(100svh - 150px); overflow: visible; --p: 0; }
.ten__glyph { font-family: var(--f-display); font-size: 860px; font-weight: 520; letter-spacing: -50px; text-anchor: middle; font-variation-settings: "SOFT" 40, "WONK" 0; }
.ten__shard .ten__glyph { fill: url(#tenGlaze); }
.ten__shard {
  transform-box: view-box;
  transform-origin: var(--ox) var(--oy);
  transform:
    translate(calc(var(--dx) * (1 - var(--p)) * 1px), calc(var(--dy) * (1 - var(--p)) * 1px))
    rotate(calc(var(--r) * (1 - var(--p)) * 1deg));
}
/* the seams fade in together once the shards are back in place */
.ten__seam {
  fill: none; stroke: url(#tenGold); stroke-width: 11; stroke-linejoin: round; stroke-linecap: round;
  opacity: 0; transition: opacity .9s var(--ease-out);
}
.ten.is-whole .ten__seam { opacity: 1; }

/* ---------- 03 orbit ---------- */
.orbit {
  position: relative;
  height: clamp(460px, 80vh, 780px);
  margin: 0 calc(var(--gutter) * -1);
  overflow: hidden;
}
.orbit__rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit__rings ellipse { fill: none; stroke: rgba(239, 230, 214, .1); stroke-dasharray: 2 7; }
.orbit__rings ellipse:nth-child(2) { stroke: rgba(217, 168, 69, .16); }
.orbit__center {
  position: absolute; left: 50%; top: 50%; z-index: 50;
  margin: 0; transform: translate(-50%, -50%);
  text-align: center; white-space: nowrap;
  font: 320 clamp(1.7rem, 4vw, 3.8rem)/1.02 var(--f-display); letter-spacing: -.03em;
}
.orbit__names { list-style: none; margin: 0; padding: 0; }
.js .orbit__names li { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.orbit__names li {
  white-space: nowrap;
  font: 360 clamp(1rem, 2vw, 2.3rem)/1 var(--f-display); letter-spacing: -.01em;
  color: var(--bone);
  transition: color .3s;
}
.orbit__names li.is-mono { font: 500 clamp(.7rem, 1vw, .95rem)/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; }
.orbit__names li.is-italic { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.orbit__names li:hover { color: var(--gold-hi); }
html:not(.js) .orbit { height: auto; margin: 0; }
html:not(.js) .orbit__center { position: static; transform: none; margin-bottom: 2rem; }
html:not(.js) .orbit__names { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; }

/* ---------- 04 machine ---------- */
.reason--machine { padding: 0; height: 480vh; }
.machine__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 2.4vh, 28px);
  padding: 84px var(--gutter) 28px;
  overflow: hidden;
}
.machine__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; }
.phase { grid-area: 1 / 1; opacity: 0; transform: translateY(22px); transition: opacity .5s, transform .7s var(--ease-out); pointer-events: none; }
.phase.on { opacity: 1; transform: none; }
.phase p { margin: 0; max-width: 30ch; font: 320 clamp(1.5rem, 3vw, 3.1rem)/1.06 var(--f-display); letter-spacing: -.03em; }
.machine__stage { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; aspect-ratio: 1200 / 520; max-height: 56vh; }
.machine__stage svg, .machine__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.machine__svg { overflow: visible; }
.pipe { fill: none; stroke-linecap: round; }
.pipe--outer { stroke: rgba(239, 230, 214, .2); stroke-width: 36; }
.pipe--inner { stroke: var(--ink); stroke-width: 32; }
.pipe--core { stroke: rgba(239, 230, 214, .07); stroke-width: 1; stroke-dasharray: 3 9; }
.crack-line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 0 5px var(--red)); }
.seam-line { fill: none; stroke: url(#mGold); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; filter: url(#mGlow); }
.node__halo { fill: none; stroke: rgba(239, 230, 214, .06); stroke-width: 1; }
.node__ring { fill: var(--ink-2); stroke: rgba(239, 230, 214, .42); stroke-width: 1.5; transition: stroke .5s; }
.node__core { fill: var(--bone); transition: fill .5s; }
.node__label { font: 500 13px var(--f-mono); letter-spacing: .16em; fill: var(--bone); text-anchor: middle; }
.node__status { font: 500 11px var(--f-mono); letter-spacing: .14em; fill: var(--muted); text-anchor: middle; opacity: 0; transition: opacity .4s, fill .4s; }
.node.is-scanned .node__status { opacity: 1; }
.node--bad.is-scanned .node__status, .node--rev.is-scanned .node__status { fill: var(--red); }
.node--bad.is-scanned .node__ring { stroke: var(--red); }
.node--bad.is-scanned .node__core { fill: var(--red); }
.node--bad.is-scanned .node__halo { stroke: rgba(226, 69, 47, .5); animation: halo 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.is-fixed .node--bad .node__status, .is-fixed .node--rev .node__status { fill: var(--gold-hi); }
.is-fixed .node--bad .node__ring, .is-fixed .node--rev .node__ring { stroke: var(--gold); }
.is-fixed .node--bad .node__core, .is-fixed .node--rev .node__core { fill: var(--gold-hi); }
.is-fixed .node--bad .node__halo { animation: none; opacity: 0; }
.is-fixed .node--rev .node__halo { stroke: rgba(217, 168, 69, .6); animation: halo 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.lens { transition: opacity .35s; }
.lens__ring { fill: rgba(217, 168, 69, .04); stroke: var(--gold-hi); stroke-width: 1.2; }
.lens__ring--dash { fill: none; stroke: rgba(245, 220, 149, .5); stroke-dasharray: 4 7; animation: spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.lens line, .lens__leader { stroke: var(--gold-hi); stroke-width: 1.2; fill: none; }
.lens__title { font: 500 14px var(--f-mono); letter-spacing: .18em; fill: var(--gold-hi); }
.lens__sub { font: italic 300 22px var(--f-display); fill: var(--bone); }
.lens--rev text { text-anchor: end; }
#lens .lens__leader { stroke-dasharray: 1; stroke-dashoffset: 1; } /* drawn out by JS */
#lens .lens__callout text { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .machine__stage { flex: none; max-height: none; max-width: none; width: 250%; margin: 2vh 0 0; transition: transform .6s var(--ease-out); }
  .node__label { font-size: 17px; }
  .node__status { font-size: 15px; }
  .phase p { font-size: 1.45rem; }
}

/* ---------- 05 radar ---------- */
.radar { position: relative; width: min(100%, 560px); margin-inline: auto; aspect-ratio: 1; }
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar__grid polygon { fill: none; stroke: rgba(239, 230, 214, .1); }
.radar__grid polygon:last-child { stroke: rgba(239, 230, 214, .22); }
.radar__grid line { stroke: rgba(239, 230, 214, .1); }
.radar__label { font: 500 13px var(--f-mono); letter-spacing: .12em; fill: var(--muted); text-anchor: middle; dominant-baseline: middle; }
.radar__before { fill: none; stroke: rgba(226, 69, 47, .55); stroke-width: 1.4; stroke-dasharray: 5 6; }
.radar__shape { fill: rgba(226, 69, 47, .12); stroke: var(--red); stroke-width: 2; stroke-linejoin: round; transition: fill 1s, stroke 1s; }
.radar.is-tuned .radar__shape { fill: rgba(217, 168, 69, .16); stroke: var(--gold-hi); filter: drop-shadow(0 0 10px rgba(217, 168, 69, .5)); }
.radar__blip { fill: var(--red); transition: fill 1s, r .3s; }
.radar__blip.hot { r: 9; filter: drop-shadow(0 0 8px var(--red)); }
.radar.is-tuned .radar__blip { fill: var(--gold-hi); }
.radar.is-tuned .radar__blip.hot { filter: drop-shadow(0 0 8px var(--gold)); }
.radar__sweep {
  position: absolute; inset: 12%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(217, 168, 69, 0) 0deg, rgba(217, 168, 69, 0) 280deg, rgba(217, 168, 69, .28) 357deg, rgba(251, 231, 168, .85) 359.4deg, rgba(217, 168, 69, 0) 360deg);
}
.radar__core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  background: var(--ink); border: 1px solid rgba(217, 168, 69, .5);
  font: italic 500 1.7rem/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--gold-hi);
  box-shadow: 0 0 40px rgba(217, 168, 69, .2);
}

/* ---------- manifesto ---------- */
.manifesto {
  position: relative; z-index: 1;
  margin: 90px 0;
  padding: clamp(110px, 20vh, 230px) var(--gutter);
  background: var(--bone); color: var(--ink);
  overflow-x: clip;
  --p: 0;
}
.edge { position: absolute; left: 0; width: 100%; height: clamp(26px, 4vw, 54px); display: block; overflow: visible; }
.edge--top { bottom: calc(100% - 1px); }
.edge--bot { top: calc(100% - 1px); }
.edge polygon { fill: var(--bone); }
.edge polyline { fill: none; stroke: var(--gold); stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(217, 168, 69, .6)); }
.manifesto__text {
  margin: 0; max-width: 14ch;
  font: 320 clamp(2.7rem, 8.4vw, 10rem)/.94 var(--f-display);
  letter-spacing: -.05em;
  font-variation-settings: "SOFT" 20, "WONK" 0;
}
.manifesto__text em { color: #a8761f; font-weight: 400; }
.manifesto__text .word { display: inline-block; white-space: nowrap; }
.manifesto__text .ch {
  display: inline-block;
  transform:
    translate3d(calc(var(--dx) * (1 - var(--p)) * 1px), calc(var(--dy) * (1 - var(--p)) * 1px), 0)
    rotate(calc(var(--r) * (1 - var(--p)) * 1deg));
  opacity: calc(.06 + var(--p) * .94);
}
.manifesto__text em .ch:last-child { margin-right: .04em; }

/* ---------- connect ---------- */
.connect {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 24px;
  min-height: 100vh;
  padding: clamp(110px, 18vh, 200px) var(--gutter) 0;
  overflow: hidden;
}
.connect__copy { align-self: center; padding-bottom: 8vh; position: relative; z-index: 2; }
.connect__q { margin: 0 0 .6rem; font: 320 clamp(1.4rem, 2.5vw, 2.4rem)/1.2 var(--f-display); color: var(--bone-2); letter-spacing: -.02em; }
.connect__big {
  margin: 0 0 3rem;
  font: 300 clamp(4.4rem, 14.5vw, 17rem)/.86 var(--f-display);
  letter-spacing: -.06em; white-space: nowrap;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}
.connect__big em { color: var(--gold-hi); }
.connect__big .lt { display: inline-block; }
.connect__big .dot { color: var(--red); display: inline-block; animation: throb 2.4s ease-in-out infinite; }
@keyframes throb { 50% { color: var(--gold); transform: translateY(-.04em); } }
.connect__links { display: grid; gap: 12px; max-width: 560px; }
.pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 12px;
  padding: 1.15rem 1.5rem;
  border: 1px solid rgba(239, 230, 214, .22); border-radius: 999px;
  text-decoration: none;
  transition: border-color .4s, color .4s, transform .35s var(--ease-out);
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.pill:hover::before, .pill:focus-visible::before { transform: none; }
.pill:hover, .pill:focus-visible { color: var(--ink); border-color: transparent; }
.pill__k { font: 500 .74rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.pill__v { font: italic 360 1.25rem var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.connect__photo { position: relative; margin: 0; align-self: end; justify-self: center; width: min(100%, 520px); }
.connect__photo img {
  position: relative; z-index: 2; width: 100%;
  filter: saturate(.92) contrast(1.03);
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 16%), linear-gradient(to top, transparent 0, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, transparent 0, #000 16%), linear-gradient(to top, transparent 0, #000 10%);
  mask-composite: intersect;
}
.enso { position: absolute; z-index: 1; left: 50%; top: -8%; width: 125%; transform: translateX(-50%) rotate(-12deg); overflow: visible; }
.enso__stroke { fill: none; stroke: url(#ensoGold); stroke-width: 30; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s var(--ease-io); }
.enso__dry { fill: none; stroke: rgba(245, 220, 149, .45); stroke-width: 7; stroke-linecap: round; stroke-dasharray: .7 .05 .1 .2; stroke-dashoffset: 1; transition: stroke-dashoffset 2.9s var(--ease-io) .15s; }
.connect__photo.in .enso__stroke { stroke-dashoffset: 0; }
.connect__photo.in .enso__dry { stroke-dashoffset: 0; }
html:not(.js) .enso__stroke, html:not(.js) .enso__dry { stroke-dashoffset: 0; }
.seal--stamp {
  position: absolute; z-index: 3; right: 2%; bottom: 14%;
  width: 72px; height: 72px; font-size: 22px; border-radius: 8px;
  transform: rotate(-9deg) scale(2.4); opacity: 0;
  transition: transform .45s cubic-bezier(.5, 0, .2, 1.4) 1.8s, opacity .2s 1.8s;
}
.connect__photo.in .seal--stamp { transform: rotate(-9deg) scale(1); opacity: 1; }
html:not(.js) .seal--stamp { transform: rotate(-9deg); opacity: 1; }
@media (max-width: 900px) {
  .connect { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .connect__copy { padding-bottom: 2rem; }
  .connect__photo { width: min(86%, 440px); }
  .pill { grid-template-columns: 5.6rem 1fr auto; padding: 1rem 1.2rem; }
  .pill__v { font-size: 1.05rem; }
}

/* ---------- footer ---------- */
.footer { position: relative; z-index: 3; border-top: 1px solid var(--line); background: var(--ink); padding: 36px var(--gutter) 30px; }
.footer__note { margin: 0 0 30px; max-width: 54em; color: var(--muted); font-size: .95rem; }
.footer__note b { color: var(--bone-2); font-weight: 600; }
.footer__kanji { font-size: 1.25rem; color: var(--gold); margin-right: .3em; vertical-align: -.08em; }
.footer__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px;
  font: 500 .68rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.footer__links { display: flex; gap: 22px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--gold-hi); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .line__in, .js .hero__lede, .js .hero__cta { opacity: 1; transform: none; }
  .grain::before { animation: none; }
}
