/* Chapter 1: the deck of eras. The section is tall; .decay__pin stays on screen while time moves. */

.decay { height: 560vh; }
.decay__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center;
  padding: 92px var(--gutter) 96px; gap: 4vw; max-width: 1440px; margin: 0 auto;
}
.decay__copy { position: relative; z-index: 2; display: grid; gap: 28px; align-content: center; }
.decay__year { height: clamp(96px, 13vw, 210px); margin-top: 12px; }
.odo { display: inline-flex; height: 100%; font: 600 clamp(96px, 13vw, 210px)/1 var(--sans); letter-spacing: -0.06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.odo__col { display: block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; will-change: transform; }
.odo__strip span { height: 1em; display: block; }
.decay__state { color: var(--grey-1); font-size: clamp(15px, 1.15vw, 17px); min-height: 3.2em; max-width: 40ch; line-height: 1.45; letter-spacing: -0.006em; }
.decay__state.is-in { animation: state-in 600ms var(--ease-out) both; }
@keyframes state-in { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.decay__note { color: var(--grey-3); margin-top: -12px; }
.decay__state b { color: var(--ink); font-weight: 500; }

.decay__deck { position: relative; height: min(76vh, 640px); perspective: 1700px; perspective-origin: 30% 40%; transform-style: preserve-3d; }
.dk {
  position: absolute; left: 50%; top: 50%; width: min(360px, 30vw); margin-left: calc(min(360px, 30vw) / -2); margin-top: -250px;
  height: 500px; display: flex; flex-direction: column; overflow: hidden; transform-origin: 50% 60%; will-change: transform, opacity;
  backface-visibility: hidden;
}
.dk::after { content: ''; position: absolute; inset: 0; background: #ece9e1; opacity: var(--fade, 0); pointer-events: none; border-radius: inherit; }
.dk__bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; font: 500 13px var(--sans); color: var(--ink); border-bottom: 1px solid var(--hairline); }
.dk__glyph { width: 16px; height: 16px; fill: var(--ink); flex: 0 0 auto; }
.dk__glyph--ai { width: 20px; height: 20px; color: var(--ink); }
.dk__year { margin-left: auto; color: var(--grey-3); }
.dk__body { flex: 1; min-height: 0; overflow: hidden; padding: 14px 16px 10px; display: grid; gap: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); align-content: start; }
.dk__who { display: flex; align-items: center; gap: 10px; }
.dk__who b { display: block; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.dk__who small { display: block; color: var(--grey-2); font-size: 12px; }
.dk__who--sm .dk__avatar { width: 22px; height: 22px; font-size: 12px; }
.dk__avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #23331d; color: #d9e8a6; font: 600 15px/1 var(--sans); letter-spacing: -0.04em; }
.dk__text { margin: 0; }
.dk__img { width: 100%; border-radius: 12px; object-fit: cover; }
.dk__img--wide { aspect-ratio: 16 / 10; }
.dk__img--square { aspect-ratio: 1; }
.dk__react { display: flex; justify-content: space-around; padding-top: 8px; border-top: 1px solid var(--hairline); color: var(--grey-2); font-size: 12.5px; }
.dk__thumb { position: relative; }
.dk__dur { position: absolute; right: 8px; bottom: 8px; background: rgba(10, 10, 10, 0.82); color: #fff; font: 500 11px var(--mono); padding: 2px 6px; border-radius: 4px; }
.dk__play { position: absolute; left: 50%; top: 50%; width: 46px; height: 32px; margin: -16px 0 0 -23px; border-radius: 9px; background: rgba(10, 10, 10, 0.78); }
.dk__play::after { content: ''; position: absolute; left: 19px; top: 9px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.dk__title { margin: 0; font-weight: 600; color: var(--ink); font-size: 15px; letter-spacing: -0.015em; line-height: 1.3; }
.dk__short { position: relative; margin: -14px -16px -10px; height: 360px; overflow: hidden; }
.dk__short img { width: 100%; height: 100%; object-fit: cover; }
.dk__short p { position: absolute; left: 16px; right: 56px; bottom: 18px; margin: 0; color: #fff; font-weight: 600; font-size: 16px; line-height: 1.25; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }
.dk__rail { position: absolute; right: 14px; bottom: 18px; display: grid; gap: 14px; }
.dk__rail i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.86); }
.dk__serp-q { border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 9px 14px; color: var(--ink); font-size: 13px; }
.dk__serp small { display: block; color: var(--grey-2); font-size: 12px; }
.dk__serp b { display: block; color: #1a3dbd; font-weight: 500; font-size: 16px; margin: 3px 0 4px; }
.dk__serp p { margin: 0; color: var(--grey-1); }
.dk__serp + .dk__img { aspect-ratio: 16 / 7; }
.dk__sub { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; }
.dk__sub b { color: var(--ink); }
.dk__sub small { color: var(--grey-2); }
.dk__comment { border-left: 2px solid var(--hairline-strong); padding-left: 12px; display: grid; gap: 8px; }
.dk__comment p { margin: 0; }
.dk__flair { display: inline-block !important; background: #f1efe8; padding: 1px 7px; border-radius: 999px; color: var(--grey-1) !important; margin-top: 2px; }
.dk__ask { margin: 0; justify-self: end; background: #f1f0eb; padding: 9px 13px; border-radius: 16px 16px 4px 16px; color: var(--ink); max-width: 85%; }
.dk__answer { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.dk__answer mark { background: linear-gradient(transparent 55%, rgba(201, 166, 97, 0.35) 55%); color: var(--ink); font-weight: 500; }
.dk__answer sup { font: 500 10px var(--mono); color: var(--gold-deep); }
.dk__cites { display: flex; gap: 6px; flex-wrap: wrap; }
.dk__product { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: #f8f7f3; }
.dk__product img { width: 64px; height: 48px; object-fit: cover; border-radius: 9px; }
.dk__product b { display: block; font-size: 13px; color: var(--ink); }
.dk__product small { color: var(--grey-2); font-size: 12px; }
.dk__chip { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(201,166,97,0.16), rgba(201,166,97,0.05)); color: #6d5726; font-size: 12.5px; font-weight: 500; }
.dk__chip-mark { width: 26px; height: 26px; color: var(--ink); flex: 0 0 auto; }
.dk__cites span { font: 400 11px var(--mono); padding: 4px 8px; border-radius: 999px; background: #f5f4f0; color: var(--grey-1); }

.dk__reach { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--hairline); }
.dk__reach .mono { color: var(--grey-3); font-size: 11px; }
.dk__meter { height: 4px; border-radius: 4px; background: #efede6; overflow: hidden; }
.dk__meter i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--reach, 0.3)); background: var(--ink); border-radius: 4px; transition: background-color 400ms var(--ease-out); }
.dk[data-state='late'] .dk__meter i { background: var(--late); }
.dk[data-state='late'] .dk__label { color: var(--late); }
.dk__label { color: var(--grey-2) !important; }

/* The present: gold, alive, Chip's mark in the bar. */
.dk--now { box-shadow: 0 0 0 1.5px rgba(201, 166, 97, 0.85), 0 0 0 7px rgba(201, 166, 97, 0.14), var(--lift-shadow); }
.dk--now .dk__meter i { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.dk--now[data-state='now'] .dk__label { color: var(--gold-deep) !important; }

@media (max-width: 900px) {
  .decay { height: 520vh; }
  .decay__pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; padding-top: 86px; gap: 0; }
  .decay__copy { gap: 14px; }
  .decay__copy .lede, .decay__note { display: none; }
  .decay__year { height: 72px; margin: 0; }
  .odo { font-size: 72px; }
  .decay__state { min-height: 3em; font-size: 12px; }
  .decay__deck { height: 100%; perspective-origin: 50% 30%; }
  .dk { width: min(300px, 76vw); margin-left: calc(min(300px, 76vw) / -2); margin-top: -215px; height: 430px; }
  .dk__body { font-size: 13px; }
  .dk__short { height: 300px; }
}

/* The era: the year in ink, then the growth method of that year, named large with its mark. */
.decay__copy { gap: 18px; }
.decay__copy .h { font-size: clamp(38px, 4.4vw, 72px); }
.decay__year { height: clamp(84px, 10vw, 160px); margin-top: 0; }
.odo { font-size: clamp(84px, 10vw, 160px); }
.decay__state { display: grid; gap: 4px; min-height: 0; max-width: 34ch; }
.decay__k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-3); }
.decay__m { display: flex; align-items: center; gap: 12px; font-size: clamp(28px, 3vw, 46px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; color: var(--ink); }
.decay__m .dk__glyph { width: 0.85em; height: 0.85em; flex: none; }
.decay__m .dk__glyph--ai { display: inline-grid; }
.decay__line { font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; color: var(--grey-1); }

@media (max-width: 900px) {
  .decay__m { font-size: 24px; }
  .decay__line { font-size: 12.5px; }
}
.decay__deck { height: min(62vh, 580px); }
.decay__note { display: none; }
@media (max-height: 800px) and (min-width: 901px) {
  .decay__copy .lede { display: none; }
  .decay__copy .h { font-size: clamp(34px, 3.8vw, 60px); }
  .decay__year, .odo { height: 96px; font-size: 96px; }
}
.decay__year { margin-bottom: 10px; }

/* Phone, last so it beats the global deck and year sizes above. The copy takes the top of the
   screen and the deck the rest of it, down to the bottom edge, so the whole card stays in view. */
@media (max-width: 900px) {
  .decay__pin { padding-bottom: 14px; }
  .decay__deck { height: 100%; min-height: 0; }
  .dk { --dk-h: min(420px, calc(100svh - 430px)); height: var(--dk-h); margin-top: calc(var(--dk-h) / -2); }
  .dk__short { height: calc(var(--dk-h) - 130px); }
}
