:root {
  --paper: #f7f3ea;
  --card: #fffdf8;
  --ink: #1b1914;
  --ink-2: #4a463e;
  --ink-3: #8a8375;
  --rule: #e6dfd0;
  --dash: #d6cdb9;
  --accent: #c2410c;
  --night: #16140f;
  --night-2: #b9b2a3;
  --night-rule: #34302a;
  --side: 360px;
  --block: 440px;
  --pt: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---------- work: a pinned stage while the rail travels ---------- */
.work { position: relative; }
.pin {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr);
  transform-origin: 50% 0; transform: scale(calc(1 - var(--q, 0) * .06));
  border-radius: calc(var(--q, 0) * 20px); overflow: hidden; background: var(--paper);
}
.pin::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--night); opacity: calc(var(--q, 0) * .35);
}

/* left column */
.side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 28px 32px; border-right: 1px solid var(--rule); overflow-y: auto;
}
.me { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; }
.me img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; object-position: 50% 30%; filter: saturate(.85); }
.me div { display: grid; font-size: 11px; letter-spacing: .6px; line-height: 1.5; }
.me b { font-weight: 500; letter-spacing: 1.2px; }
.me span { color: var(--ink-3); }

h1 { font-weight: 300; font-size: 60px; line-height: .95; letter-spacing: -2.4px; text-transform: uppercase; margin: 0; }
.lede { color: var(--ink-2); font-size: 15px; margin: 18px 0 0; max-width: 300px; }

.index { margin-top: 30px; display: grid; font-size: 13px; }
.index a { display: flex; align-items: center; gap: 12px; padding: 6px 0; text-decoration: none; color: var(--ink-2); }
.index a span { font-size: 11px; color: var(--ink-3); width: 20px; }
.index a::after { content: ""; flex: 1; border-bottom: 1px dashed transparent; margin-left: 4px; }
.index a:hover { color: var(--ink); }
.index a:hover::after { border-color: var(--dash); }
.index a[aria-current="true"] { color: var(--ink); }
.index a[aria-current="true"] span { color: var(--accent); }
.index a[aria-current="true"]::after { border-color: var(--accent); }

.facts { font-size: 12px; }
.facts dl { margin: 0; }
.facts dl div { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--dash); }
.facts dl div:last-child { border-bottom: 1px dashed var(--dash); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.facts .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; }
.facts .links a { text-decoration: none; }
.facts .links a::after { content: " ↗"; color: var(--ink-3); }
.facts .links a:hover { color: var(--accent); }

/* the rail. Without JS it is a plain horizontal scroller; with JS the page scroll moves it. */
.viewport { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
html.js .viewport { overflow: hidden; }
.rail {
  position: relative; display: flex; align-items: flex-start; gap: 44px; width: max-content;
  padding: var(--pt) 40px 28px 32px; outline: none; will-change: transform;
}
.chain {
  position: absolute; left: 32px; top: calc(var(--pt) + 21px); height: 0;
  border-top: 1px dashed var(--dash); pointer-events: none;
}

.block {
  --t: 1;
  position: relative; flex: 0 0 var(--block); width: var(--block); display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0 18px 18px;
  opacity: calc(.3 + var(--t) * .7);
  transform: translateY(calc((1 - var(--t)) * 36px)) rotate(calc((1 - var(--t)) * 1.2deg));
}
.block::before {
  content: ""; position: absolute; left: -27px; top: 17px; width: 9px; height: 9px;
  background: var(--paper); border: 1px solid var(--dash); transform: rotate(45deg);
}
.block:first-of-type::before { display: none; }

.bh {
  display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--ink-3); padding: 14px 0 12px; border-bottom: 1px dashed var(--dash);
}
.bh span:first-child { color: var(--accent); }

.frame { display: block; margin-top: 16px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; text-decoration: none; }
.bar {
  display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  font-size: 10.5px; color: var(--ink-3); border-bottom: 1px solid var(--rule); background: #fbf9f4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--dash); flex: none; }
.bar i:last-of-type { margin-right: 8px; }
.shot { display: block; background: #fff; }
.shot img { display: block; width: 100%; height: auto; }
.frame { transition: border-color .3s, box-shadow .3s; }
.frame:hover { border-color: var(--dash); box-shadow: 0 10px 24px rgba(27, 25, 20, .08); }
.frame:hover .bar { color: var(--accent); }

.block h2 { font-weight: 300; font-size: 32px; letter-spacing: -1.2px; line-height: 1; margin: 20px 0 0; }
.what { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }

.receipt { margin: 0; padding-top: 16px; font-size: 11.5px; }
.receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-top: 1px dashed var(--dash); }
.receipt dt { color: var(--ink-3); flex: none; }
.receipt dd { margin: 0; text-align: right; }
.receipt .hit { color: var(--accent); }

.go { display: flex; gap: 16px; margin: 0; padding-top: 10px; border-top: 1px dashed var(--dash); font-size: 11.5px; }
.go a { text-decoration: none; }
.go a:hover { color: var(--accent); }

/* end of the chain, pointing down to the record */
.endcap {
  position: relative; flex: 0 0 160px; align-self: flex-start; margin-top: 4px;
  display: flex; flex-direction: column; gap: 8px; padding: 12px 0 0 6px;
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-3); text-decoration: none;
}
.endcap::before {
  content: ""; position: absolute; left: -27px; top: 13px; width: 9px; height: 9px;
  background: var(--accent); transform: rotate(45deg);
}
.endcap b { font-size: 28px; font-weight: 400; color: var(--accent); }

.progress { position: absolute; left: var(--side); right: 0; bottom: 0; height: 2px; background: var(--rule); }
.progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }

/* ---------- record: a paper slip on the dark sheet that slides over the stage ---------- */
.record {
  position: relative; z-index: 2; background: var(--night); color: #f2eee5;
  border-radius: 24px 24px 0 0; padding: 88px 64px 72px; min-height: 100vh;
}
.record-in {
  max-width: 1120px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 96px; align-items: start;
}
.kick { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); margin: 0; }

.slip {
  --zz: 10px;
  position: relative; background: var(--card); color: var(--ink); padding: 36px 34px 44px;
  font-size: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zz) * 2) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zz) * 2) 100%;
}
.slip > header { text-align: center; padding-bottom: 18px; border-bottom: 1px dashed var(--dash); }
.slip > header b { display: block; font-weight: 500; font-size: 15px; letter-spacing: 2px; }
.slip > header span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .6px; text-transform: uppercase; }

.lines { list-style: none; padding: 0; margin: 10px 0 0; }
.lines li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; }
.lines .it { display: flex; flex-direction: column; min-width: 0; }
.lines .it b { font-family: Inter, sans-serif; font-weight: 400; font-size: 17px; line-height: 22px; letter-spacing: -.2px; }
.lines .it small { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.lines i { flex: 1; height: 17px; border-bottom: 2px dotted var(--dash); min-width: 24px; }
.lines .amt { font-size: 16px; font-weight: 500; line-height: 22px; white-space: nowrap; }

.slip details { margin-top: 6px; }
.slip summary {
  cursor: pointer; list-style: none; font-size: 13px; color: var(--accent); padding: 8px 0;
  border-top: 1px dashed var(--dash);
}
.slip summary::-webkit-details-marker { display: none; }
.slip details[open] summary { color: var(--ink-3); }
.slip details .lines .it b { font-size: 15px; }
.slip details .lines .amt { font-size: 14px; }

.sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--ink); }
.sum span { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; }
.sum b { font-family: Inter, sans-serif; font-weight: 400; font-size: 44px; letter-spacing: -2px; line-height: 1; }
.sum.small { margin-top: 8px; padding-top: 0; border-top: 0; }
.sum.small b { font-size: 18px; letter-spacing: 0; }

.slip > footer { margin-top: 28px; text-align: center; font-size: 11px; color: var(--ink-3); letter-spacing: .6px; }
.slip .code {
  display: block; height: 38px; margin: 0 auto 8px; width: 78%;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 13px);
}

.aside { position: sticky; top: 88px; }
.names { display: grid; margin-top: 14px; }
.names a {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 300; font-size: 44px; letter-spacing: -1.6px; line-height: 1.25;
  color: #fff; text-decoration: none; border-bottom: 1px dashed var(--night-rule); padding: 6px 0;
}
.names a span { font-size: 20px; color: var(--night-2); }
.names a:hover, .names a:hover span { color: var(--accent); }
.mail { display: inline-block; margin-top: 64px; font-weight: 300; font-size: 30px; letter-spacing: -.8px; text-decoration: none; color: #fff; }
.mail:hover { color: var(--accent); }
.aside .foot { font-size: 12px; color: var(--night-2); margin: 14px 0 0; }
.aside .foot a { text-decoration: none; }
.aside .foot a:hover { color: #fff; }

/* ---------- phones and small tablets: everything stacks ---------- */
@media (max-width: 900px) {
  .pin { position: static; height: auto; display: block; transform: none; border-radius: 0; overflow: visible; }
  .pin::after, .progress, .chain { display: none; }
  .side { border-right: 0; padding: 24px 16px 8px; overflow: visible; gap: 24px; }
  .me { margin-bottom: 28px; }
  h1 { font-size: 44px; letter-spacing: -1.6px; }
  .index { display: none; }
  .viewport, html.js .viewport { overflow: visible; }
  .rail { flex-direction: column; align-items: stretch; width: auto; gap: 28px; padding: 16px; transform: none !important; }
  .block { width: auto; flex: none; opacity: 1; transform: none; }
  .block::before { left: 50%; top: -19px; margin-left: -5px; }
  .endcap { flex: none; align-self: center; align-items: center; padding: 8px 0 24px; margin: 0; }
  .endcap::before { left: 50%; top: -19px; margin-left: -5px; }
  .record { padding: 48px 16px 40px; border-radius: 20px 20px 0 0; }
  .record-in { grid-template-columns: 1fr; gap: 56px; }
  .slip { padding: 28px 20px 40px; }
  .lines .it b { font-size: 16px; }
  .sum b { font-size: 36px; }
  .aside { position: static; }
  .names a { font-size: 32px; letter-spacing: -1px; }
  .mail { font-size: 20px; margin-top: 40px; word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  .block { opacity: 1; transform: none; }
  .frame { transition: none; }
  .pin { transform: none; border-radius: 0; }
  .pin::after { opacity: 0; }
}
