/* Heritage: a blueprint sheet. The plant draws itself as the reader scrolls; the title block's revision table is the timeline. */
#heritage { --bp: #0b1622; --line: #cfe1f2; --dim: rgba(207, 225, 242, .32); --lime: #b5d34f; position: relative; }
.hb-track { position: relative; }
.hb-stage { position: relative; height: 100vh; height: 100svh; min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 16px; padding: 84px max(16px, 4vw) 22px; box-sizing: border-box; overflow: hidden; }
.hb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; max-width: 1240px; width: 100%; margin: 0 auto; }
.hb-head h2 { margin: 0; font: 700 clamp(30px, 4.2vw, 54px)/1 var(--display, "Barlow Condensed", sans-serif); text-transform: uppercase; }
.hb-head p { margin: 0; color: var(--muted, #a9afb8); font-size: 15px; max-width: 48ch; }

/* the sheet: drafting grid, a border, the drawing, and the title block in the corner */
.hp-sheet { position: relative; max-width: 1240px; width: 100%; height: 100%; min-height: 0; margin: 0 auto; border-radius: 6px; overflow: hidden;
  background-color: var(--bp);
  background-image: linear-gradient(rgba(207, 225, 242, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 225, 242, .05) 1px, transparent 1px),
    linear-gradient(rgba(207, 225, 242, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 225, 242, .025) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.hp-sheet::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(207, 225, 242, .3); pointer-events: none; }
.hp-draw { position: absolute; inset: 0; width: 100%; height: 100%; }
.hp-draw path { fill: none; stroke: var(--line); stroke-width: calc(1.1px * var(--s, 1)); stroke-linejoin: round; stroke-linecap: round; transition: stroke .5s, fill .6s; }
.hp-draw .hp-s { fill: transparent; }
.hp-draw .hp-s.on { fill: var(--bp); }
.hp-draw .hp-c { stroke: var(--dim); stroke-width: calc(.8px * var(--s, 1)); }
.hp-draw .now { stroke: var(--lime); }
.hp-draw .hp-c.now { stroke: rgba(181, 211, 79, .55); }
#heritage.done .hp-draw path.hp-s, #heritage.done .hp-draw path.hp-l { stroke: #e9f3ff; }
.hp-tags { position: absolute; inset: 0; pointer-events: none; }
.hp-tag { position: absolute; left: 0; top: 0; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; font: 600 11px/1 "Barlow", sans-serif; letter-spacing: .06em; color: var(--line);
  translate: -50% -22px; padding-bottom: 6px; border-bottom: 1px solid var(--dim); }
.hp-tag span { display: none; color: #fff; }
.hp-tag.now { color: var(--lime); font-size: 13px; z-index: 2; background: rgba(11, 22, 34, .8); padding: 4px 6px 6px; border-color: var(--lime); }
.hp-tag.now span { display: inline; }
.hp-tag.past { opacity: .5; }
.hp-tag.hide { display: none; }
#heritage.done .hp-tag { opacity: .9; }
.hp-revs li[hidden] { display: none; }

/* the title block, bottom right, like every engineering drawing */
.hp-block { position: absolute; right: 18px; bottom: 18px; width: min(380px, 46%); background: rgba(11, 22, 34, .94); border: 1px solid rgba(207, 225, 242, .45);
  font: 500 12px/1.35 "Barlow", sans-serif; color: var(--line); }
.hp-revs { list-style: none; margin: 0; padding: 0; max-height: 112px; overflow: hidden; }
.hp-revs li { display: grid; grid-template-columns: 26px 44px 1fr; border-bottom: 1px solid rgba(207, 225, 242, .22); }
.hp-revs li > * { padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-revs li b { border-right: 1px solid rgba(207, 225, 242, .22); text-align: center; font-weight: 600; }
.hp-revs li span:nth-child(2) { border-right: 1px solid rgba(207, 225, 242, .22); }
.hp-revs li.now { color: var(--lime); animation: hprow .5s ease both; }
@keyframes hprow { from { background: rgba(181, 211, 79, .18); } to { background: transparent; } }
.hp-tb { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid rgba(207, 225, 242, .45); }
.hp-tb > div { padding: 7px 9px; }
.hp-tb > div + div { border-left: 1px solid rgba(207, 225, 242, .45); text-align: center; }
.hp-tb small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(207, 225, 242, .6); }
.hp-tb strong { font: 700 16px/1.15 "Barlow Condensed", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.hp-rev { font: 700 26px/1 "Barlow Condensed", sans-serif; color: var(--lime); }
.hp-stamp { position: absolute; right: 28px; top: 26px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--lime); color: var(--lime);
  display: grid; place-content: center; text-align: center; font: 700 11px/1.15 "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(-12deg) scale(1.6); opacity: 0; transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.hp-stamp b { font-size: 19px; }
.hp-stamp.in { opacity: .85; transform: rotate(-12deg) scale(1); }

.hb-detail { max-width: 1240px; width: 100%; margin: 0 auto; min-height: 3em; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.5; color: #d2d6dc; }
.hb-detail b { color: var(--lime); font-weight: 600; margin-right: 8px; }
.hb-detail.in { animation: hbin .45s ease both .15s; }
@keyframes hbin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .hb-stage { padding-top: 76px; gap: 12px; }
  .hb-head p { font-size: 14px; }
  .hp-block { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .hp-revs { max-height: 58px; }
  .hp-tag.past { display: none; }
  .hp-stamp { right: 16px; top: 18px; width: 70px; height: 70px; font-size: 9px; }
  .hp-stamp b { font-size: 15px; }
}

/* the years: pick one to jump there; replay at the end */
.hb-foot { max-width: 1680px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.hb-rail { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.hb-rail::-webkit-scrollbar { display: none; }
.hb-rail button { flex: 1 0 auto; min-width: 44px; min-height: 40px; padding: 0 4px; border: 0; border-top: 3px solid rgba(207, 225, 242, .16); background: none;
  color: rgba(207, 225, 242, .5); font: 600 11.5px/1 "Barlow", sans-serif; letter-spacing: .04em; cursor: pointer; }
.hb-rail button.past { border-top-color: rgba(181, 211, 79, .5); color: rgba(207, 225, 242, .75); }
.hb-rail button.on { border-top-color: var(--lime); color: var(--lime); }
.hb-rail button:hover { color: #fff; }
.hb-rail button:focus-visible, .hb-replay:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hb-replay { flex: none; min-height: 40px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(207, 225, 242, .4); background: none; color: #fff;
  font: 600 11.5px/1 "Barlow", sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
