/* Shared site styles: tokens, header, footer, buttons + the homepage. Blog-only rules live in blog.css. */
:root {
  color-scheme: light;
  --ink: #111111;
  --paper: #f3f1ea;
  --c1: #ff5a36; /* chapter 01 — tomato */
  --c3: #ffe03a; /* chapter 03 — lemon */
  --c4: #9fc9ff; /* chapter 04 — sky */
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font: 400 17px/1.5 var(--sans); }
main [id] { scroll-margin-top: 76px; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }

.skip-link { position: fixed; z-index: 30; top: 8px; left: 8px; transform: translateY(-160%); padding: .75rem 1rem; background: var(--c3); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

.wrap { max-width: 1360px; margin-inline: auto; padding-inline: 32px; }
.label { font: 500 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.display { font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .86; }
.arr { display: inline-block; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--ink); }
.site-head .wrap { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.logo { font-weight: 900; font-stretch: 62%; font-size: 34px; letter-spacing: -.02em; line-height: 1; }
.logo .dot { display: inline-block; color: var(--c1); animation: pulse 2s ease-in-out infinite; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.nl { padding-block: 12px; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 2px; transition: background-size .3s ease; }
.nl:hover { background-size: 100% 2px; }
.prog { position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c1) 0 25%, var(--ink) 25% 50%, var(--c3) 50% 75%, var(--c4) 75%); }

/* ---------- Hero ---------- */
.hero { padding-block: 56px 24px; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; letter-spacing: .05em; }
.hero-meta .pop { color: var(--c1); }
.hero-title { margin-top: 40px; font-size: clamp(60px, 13.4vw, 196px); line-height: .86; letter-spacing: -.01em; }
.w { display: inline-block; overflow: hidden; vertical-align: top; }
.w > span { display: inline-block; animation: wordup 1.1s var(--ease-out) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
.sweep { color: transparent; -webkit-text-stroke: 2px var(--ink); background: linear-gradient(var(--sweep, var(--c1)), var(--sweep, var(--c1))) no-repeat 0 0 / 0% 100%; -webkit-background-clip: text; background-clip: text; }
.w > .sweep { animation: wordup 1.1s var(--ease-out) backwards, fillsweep 5.5s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms + 150ms), 1.6s; }
.w > .mark { padding: 0 .08em; background: linear-gradient(var(--c1), var(--c1)) no-repeat 0 0 / 100% 100%; animation: wordup 1.1s var(--ease-out) backwards, marker .8s var(--ease-io) backwards; animation-delay: calc(var(--i) * 70ms + 150ms), 1.15s; }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; margin-top: 48px; }
.hero-foot p { flex: 0 1 460px; font-size: 20px; }
.badge { position: relative; flex: 0 0 168px; width: 168px; height: 168px; border-radius: 50%; background: var(--ink); color: var(--paper); transition: background-color .3s; }
.badge:hover { background: var(--c1); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge:hover .spin { animation-duration: 5s; }
.badge .bob { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--c1); }
.badge:hover .bob { color: var(--ink); }
.badge .bob span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }

/* ---------- Crossed tapes ---------- */
.tapes { position: relative; height: 230px; overflow: hidden; }
.tape { position: absolute; left: -6%; right: -6%; overflow: hidden; white-space: nowrap; }
.tape--a { top: 52px; z-index: 2; transform: rotate(-3deg); background: var(--c3); border-block: 2px solid var(--ink); }
.tape--b { top: 112px; z-index: 1; transform: rotate(2.5deg); background: var(--ink); color: var(--paper); }
.ticker { display: inline-flex; animation: ticker 36s linear infinite; }
.ticker > span { padding-right: 40px; }
.tape--a .ticker { padding-block: 16px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 30px; }
.tape--b .ticker { padding-block: 14px; font: 500 16px var(--mono); text-transform: uppercase; letter-spacing: .12em; animation-direction: reverse; animation-duration: 44s; }
.tape:hover .ticker { animation-play-state: paused; }

/* ---------- Journey intro ---------- */
.intro { padding-block: 72px 96px; }
.intro > .label { margin-bottom: 28px; }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 64px; }
.split > :first-child { flex: 999 1 520px; min-width: 0; }
.split > p { flex: 1 1 320px; max-width: 460px; font-size: 19px; line-height: 1.55; }
.h-section { font-size: clamp(52px, 8vw, 120px); }
.chapters { margin-top: 72px; display: flex; flex-wrap: wrap; border: 2px solid var(--ink); }
.seg { min-height: 200px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; border-right: 2px solid var(--ink); transition: flex-grow .6s cubic-bezier(.2, .8, .2, 1); }
.seg:last-child { border-right: 0; }
.seg > span { font: 500 12px var(--mono); letter-spacing: .05em; }
.seg strong { font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: 40px; line-height: .9; }
.seg--1 { flex: 1 1 200px; background: var(--c1); }
.seg--2 { flex: 2.2 1 260px; background: var(--ink); color: var(--paper); }
.seg--3 { flex: 1.6 1 240px; background: var(--c3); }
.seg--4 { flex: 1.2 1 200px; background: var(--c4); }
.seg:hover { flex-grow: 3.4; }
.seg .arr { font-weight: 400; font-stretch: 100%; transform: rotate(45deg); }
.seg:hover .arr { transform: rotate(0deg) scale(1.15); }

/* ---------- Chapters ---------- */
.chapter { border-top: 2px solid var(--ink); overflow: hidden; }
.chapter > .wrap { padding-block: 48px 96px; }
.chapter--1 { background: var(--c1); }
.chapter--2 { background: var(--ink); color: var(--paper); }
.chapter--3 { background: var(--c3); }
.chapter--4 { background: var(--c4); }
.chapter--4 > .wrap { padding-bottom: 112px; }
.chapter-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.giant { font-weight: 900; font-stretch: 62%; font-size: clamp(110px, 30vw, 440px); line-height: .84; letter-spacing: -.03em; white-space: nowrap; margin: 24px 0 48px -8px; }
.giant--outline { color: transparent; -webkit-text-stroke: 2px var(--paper); }
.h-chapter { font-size: clamp(44px, 6vw, 88px); line-height: .88; }
.h-chapter-lg { max-width: 1100px; font-size: clamp(44px, 7vw, 112px); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px 48px; margin-top: 48px; max-width: 1000px; }
.cols p { font-size: 19px; line-height: 1.55; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.btn, .btnf { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; }
.btn { border: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 0% 100%; transition: background-size .4s var(--ease-io), color .3s; }
.btn:hover { background-size: 100% 100%; color: var(--paper); }
.btnf { background: var(--ink); color: var(--c3); }
.btn:hover .arr, .btnf:hover .arr, .cta:hover .arr { transform: translate(4px, -4px); }

/* Odometer years */
.odo { display: inline-block; height: .84em; overflow: hidden; vertical-align: top; }
.odo--static { overflow: visible; }
.col { display: block; line-height: .84em; transform: translateY(calc((var(--d) + 10) * -.84em)); }

/* 01 */
.ch1 { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.ch1-copy { flex: 999 1 520px; min-width: 0; }
.ch1-copy .h-chapter { margin-bottom: 36px; }
.ch1-copy .cols { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px 40px; }
.ch1-copy .cols p { font-size: 18px; }
.ch1-copy .btns { margin-top: 40px; }
.stat { flex: 1 1 300px; max-width: 380px; align-self: flex-end; position: relative; overflow: hidden; padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 16px; background: var(--ink); color: var(--paper); }
.stat-num { font-weight: 900; font-stretch: 62%; font-size: 128px; line-height: .8; color: var(--c1); font-variant-numeric: tabular-nums; }
.slices { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); pointer-events: none; }
.slices span { background: var(--paper); transform: scaleY(0); transform-origin: bottom; }

/* 02 */
.ch2-head p { color: #d6d4cc; font-size: 18px; }
.scribble { position: relative; display: inline-block; color: var(--c3); }
.scribble svg { position: absolute; left: 0; bottom: -.16em; width: 100%; height: .2em; overflow: visible; }
.draw { fill: none; stroke: var(--c3); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 0; }
.ventures { margin-top: 64px; border-top: 2px solid var(--paper); }
.vrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; padding: 28px 8px; border-bottom: 2px solid var(--paper);
  background: linear-gradient(var(--c4), var(--c4)) no-repeat 0 0 / 0% 100%; transition: background-size .55s var(--ease-io), color .3s; }
.vrow > span { flex: 0 0 260px; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c4); transition: color .3s; }
.vrow h3 { flex: 1 1 320px; font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(44px, 6.4vw, 96px); line-height: .9; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.vrow p { flex: 1 1 260px; max-width: 320px; font-size: 15px; color: #c9c7bf; transition: color .3s; }
.vrow:hover { background-size: 100% 100%; color: var(--ink); }
.vrow:hover > span, .vrow:hover p { color: var(--ink); }
.vrow:hover h3 { transform: translateX(16px); }
.vrow:hover .arr { transform: rotate(45deg); }

/* 03 */
.ch3-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0 48px; }
.ch3-top .giant { margin: 0 0 0 -8px; }
.stamp { position: relative; flex: 0 0 220px; width: 220px; height: 220px; }
.stamp > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.stamp-icon .sway { display: block; width: 88px; height: 88px; animation: sway 4.2s ease-in-out infinite; }
.hl { padding: 0 .06em; color: var(--c3); background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 50% / 100% 76%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ch3-after { font-size: 17px !important; color: #3a3520; }

/* 04 */
.next-giant { display: flex; align-items: center; }
.next-giant > span { display: inline-block; }
.next-giant .next-arrow { margin-left: .1em; font-stretch: 100%; font-weight: 400; font-size: .5em; line-height: 1; }
.next-arrow span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
.sweep--ink { --sweep: var(--ink); -webkit-text-stroke-color: var(--ink); animation: fillsweep 6s ease-in-out 1s infinite; }
.caret { display: inline-block; width: .42em; height: .74em; margin-left: .08em; vertical-align: -.02em; background: var(--ink); animation: blink 1.05s steps(1) infinite; }
.cta { position: relative; overflow: hidden; margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 28px; background: var(--ink); color: var(--paper); }
.cta > span { position: relative; }
.cta-text { font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 52px); line-height: .95; }
.cta .arr { font-size: 44px; }
.cta-bg { position: absolute !important; inset: 0; background: var(--c1); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-io); }
.cta:hover .cta-bg { transform: scaleX(1); }

/* ---------- Writing ---------- */
.writing { border-top: 2px solid var(--ink); }
.writing > .wrap { padding-block: 96px 112px; }
.writing-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.writing-top .btn { font: 500 13px var(--mono); letter-spacing: .04em; }
.writing h2 { margin: 32px 0 48px; }
.wrows { border-top: 2px solid var(--ink); }
.wrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 40px; padding: 18px 12px; border-bottom: 2px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 0% 100%; transition: background-size .5s var(--ease-io), color .3s; }
.wrow-year { flex: 0 0 180px; font-weight: 900; font-stretch: 62%; font-size: 72px; line-height: 1; }
.wrow-year--c1 { color: var(--c1); }
.wrow-year--ol { color: transparent; -webkit-text-stroke: 2px var(--ink); transition: -webkit-text-stroke-color .3s; }
.wrow h3 { flex: 1 1 300px; font-weight: 600; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.wrow .arr { font-size: 32px; }
.wrow:hover { background-size: 100% 100%; color: var(--paper); }
.wrow:hover .wrow-year--ol { -webkit-text-stroke-color: var(--paper); }
.wrow:hover h3 { transform: translateX(14px); }
.wrow:hover .arr { transform: rotate(45deg); }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--paper); overflow: hidden; }
.foot > .wrap { padding-top: 40px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.foot-row div { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-row .spin { display: inline-block; color: var(--c3); }
.foot-name { margin-top: 32px; font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(36px, 11.4vw, 180px); line-height: .78; letter-spacing: -.01em; white-space: nowrap; transform: translateY(.12em); }
.foot-name span { display: inline-block; transition: transform .55s cubic-bezier(.2, .8, .2, 1), color .3s; transition-delay: calc(var(--i) * 28ms); }
.foot:hover .foot-name span { transform: translateY(-.14em); color: var(--c3); }

/* ---------- Always-on motion ---------- */
.spin { animation: spin 22s linear infinite; transform-origin: center; }
.pop { display: inline-block; animation: pop 2.6s ease-in-out infinite; }

/* ---------- Reveal on scroll (site.js adds .armed / .in) ---------- */
.armed [data-reveal]:not(.in) .rv { opacity: 0; }
.in .rv { animation: rise 1s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
.armed [data-reveal]:not(.in) .col { transform: translateY(0); }
.in .col { animation: roll 2s var(--ease-out) backwards; animation-delay: calc(var(--k, 0) * 120ms + 100ms); }
.armed .stat:not(.in) .slices span { transform: scaleY(1); }
.stat.in .slices span { animation: unslice .7s cubic-bezier(.7, 0, .3, 1) backwards; animation-delay: calc(var(--k) * 70ms + 200ms); }
.armed [data-reveal]:not(.in) .draw { stroke-dashoffset: 400; }
.in .draw { animation: draw 1.1s var(--ease-io) .6s backwards; }
.armed [data-reveal]:not(.in) .hl { background-size: 0% 76%; }
.in .hl { animation: marker-hl 1s var(--ease-io) .55s backwards; }

/* Scroll-linked extras where supported */
@supports (animation-timeline: scroll()) {
  .prog { animation: grow linear both; animation-timeline: scroll(root); }
  .drift { animation: drift linear both; animation-timeline: view(); }
}

@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wordup { from { transform: translateY(105%); } }
@keyframes marker { from { background-size: 0% 100%; } }
@keyframes marker-hl { from { background-size: 0% 76%; } }
@keyframes fillsweep { 0% { background-size: 0% 100%; background-position: 0 0; } 45% { background-size: 100% 100%; background-position: 0 0; } 55% { background-size: 100% 100%; background-position: 100% 0; } 100% { background-size: 0% 100%; background-position: 100% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(56px); } }
@keyframes roll { from { transform: translateY(0); } }
@keyframes unslice { from { transform: scaleY(1); } }
@keyframes draw { from { stroke-dashoffset: 400; } }
@keyframes bob { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(6px); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(.14em); } }
@keyframes pop { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(45deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) scale(1.04); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { from { transform: translateX(4%); } to { transform: translateX(-6%); } }

@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  .hero { padding-top: 40px; }
  .hero-title { margin-top: 28px; }
  .tapes { height: 190px; }
  .tape--a { top: 40px; }
  .tape--a .ticker { font-size: 24px; padding-block: 12px; }
  .tape--b { top: 96px; }
  .intro { padding-block: 48px 72px; }
  .chapters { margin-top: 48px; }
  .seg { min-height: 140px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .seg:last-child { border-bottom: 0; }
  .seg strong { font-size: 34px; }
  .chapter > .wrap { padding-block: 36px 72px; }
  .giant { margin: 16px 0 32px -4px; font-size: 40vw; }
  .stamp { flex-basis: 160px; width: 160px; height: 160px; }
  .stamp-icon .sway { width: 64px; height: 64px; }
  .stat { max-width: none; }
  .stat-num { font-size: 104px; }
  .vrow { padding-block: 22px; }
  .vrow > span { flex-basis: 100%; }
  .wrow-year { flex-basis: 100%; font-size: 56px; }
  .writing > .wrap { padding-block: 72px 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .prog { display: none; }
}
