/* Vintage Trade Co. — Freight Waybill world
   Boxcar paint, faded gold stencil, buff waybill stock, yard chalk. */

@font-face { font-family: "Stencil"; src: url("/assets/fonts/big-shoulders-stencil-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Stencil"; src: url("/assets/fonts/big-shoulders-stencil-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Gothic"; src: url("/assets/fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gothic"; src: url("/assets/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Franklin"; src: url("/assets/fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Franklin"; src: url("/assets/fonts/libre-franklin-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Franklin"; src: url("/assets/fonts/libre-franklin-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Typewriter"; src: url("/assets/fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Typewriter"; src: url("/assets/fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Chalk"; src: url("/assets/fonts/cabin-sketch-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* paint */
  --car: #2e1c13;          /* boxcar chocolate */
  --car-deep: #1f130c;     /* shadowed side / underframe */
  --car-night: #140c07;    /* car interior */
  --oxide: #5b3622;        /* lighter tuscan oxide */
  --oxide-hi: #6e4329;
  --car-warm: #3a2416;     /* lighter chocolate for warm content grounds */
  --rib: rgba(0, 0, 0, .22);
  --gold: #c9a556;         /* faded gold stencil */
  --gold-hi: #dcbb6c;
  --gold-dim: #9a7c3e;
  --chalk: #efe8dc;
  --chalk-dim: #cdbfa6;    /* secondary text on paint, tinted from the paint */
  /* paper */
  --buff: #e6d6b2;         /* waybill card stock */
  --buff-hi: #efe3c6;
  --buff-rule: #9b7f55;
  --ink: #26170e;
  --ink-soft: #5a4330;
  --stamp: #8f2d1a;        /* rubber-stamp red */

  --f-stencil: "Stencil", "Gothic", "Arial Narrow", sans-serif;
  --f-gothic: "Gothic", "Arial Narrow", sans-serif;
  --f-body: "Franklin", "Franklin Gothic", "Helvetica Neue", Arial, sans-serif;
  --f-type: "Typewriter", "Courier New", monospace;
  --f-chalk: "Chalk", "Big Shoulders Display", sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --wrap: 78rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* weathered paint: fractal grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0  1 0 0 0 0  1 0 0 0 0  0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  /* fibre in card stock */
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .12  0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E");
  /* stencil wear: mask that knocks small flecks out of the paint */
  --wear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.4 2.15'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23w)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--gold-dim) var(--car-deep); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--car);
  color: var(--chalk);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--car-deep); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.paper :focus-visible { outline-color: var(--stamp); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--car-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border: 3px solid var(--car-deep); border-radius: 0; }

h1, h2, h3 { margin: 0; font-family: var(--f-gothic); font-weight: 800; text-transform: uppercase; line-height: .95; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--gold); color: var(--car-deep); padding: .6rem 1rem; font-family: var(--f-gothic); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.skip:focus { top: 1rem; }

/* Painted surfaces: ribs + grain. Every boxcar region uses .paint */
.paint {
  position: relative;
  isolation: isolate;
  background-color: var(--car);
  background-image:
    var(--grain),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--rib-w, 7.5rem) - 6px), var(--rib) calc(var(--rib-w, 7.5rem) - 6px) calc(var(--rib-w, 7.5rem) - 3px), rgba(255, 220, 170, .045) calc(var(--rib-w, 7.5rem) - 3px) var(--rib-w, 7.5rem));
  background-blend-mode: soft-light, normal;
}
.paint--oxide { background-color: var(--oxide); --rib: rgba(0, 0, 0, .2); }
/* Yard grounds: content sections between cars. Grain only, no siding. */
.yard { position: relative; background-color: var(--car-deep); background-image: var(--grain); background-blend-mode: soft-light; }
.yard--warm { background-color: var(--car-warm); }
.paint--deep { background-color: var(--car-deep); }

/* Stenciled gold lettering with paint wear */
.stencil {
  font-family: var(--f-stencil);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: .03em;
  line-height: .86;
  -webkit-mask-image: var(--wear);
  mask-image: var(--wear);
  -webkit-mask-size: 300px;
  mask-size: 300px;
}

/* Rivet seam: a row of rivets along a panel edge */
.rivets {
  height: 14px;
  background:
    radial-gradient(circle at 46% 40%, #c08a5c 0 1.2px, #8a5b39 1.8px 3px, #1b0e07 3.6px 4.4px, transparent 5px) 0 50% / 24px 14px repeat-x,
    linear-gradient(var(--car-deep), var(--car-deep));
  border-block: 1px solid rgba(0, 0, 0, .35);
}

/* ———————————————————— Header ———————————————————— */
.site-head { position: relative; z-index: 20; background: var(--car-deep); border-bottom: 2px solid #000; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand-mark { width: 2.75rem; height: 2.75rem; flex: none; }
.brand-name { display: grid; line-height: 1; }
.brand-name b { font-family: var(--f-stencil); font-weight: 900; font-size: 1.55rem; letter-spacing: .04em; color: var(--gold); text-transform: uppercase; }
.brand-name small { font-family: var(--f-gothic); font-weight: 700; font-size: .78rem; letter-spacing: .2em; color: var(--chalk-dim); text-transform: uppercase; margin-top: .2rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; }
.nav a { display: block; padding: .55rem .85rem; font-family: var(--f-gothic); font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--chalk); border: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--gold-hi); border-color: rgba(201, 165, 86, .35); }
.nav a[aria-current="page"] { color: var(--gold); border-color: var(--gold-dim); }
.nav .nav-cta a { background: var(--gold); color: var(--car-deep); border-color: var(--gold); margin-left: .5rem; }
.nav .nav-cta a:hover { background: var(--gold-hi); color: var(--car-deep); }
.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem; padding: .55rem .8rem;
    background: transparent; color: var(--chalk); border: 1px solid var(--gold-dim);
    font: 800 1rem/1 var(--f-gothic); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  }
  .nav-toggle svg { width: 1.1rem; height: 1.1rem; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--car-deep); border-bottom: 2px solid #000; display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1.25rem; }
  .nav a { padding: .9rem .25rem; font-size: 1.35rem; border: 0; border-bottom: 1px solid rgba(201, 165, 86, .18); }
  .nav a[aria-current="page"] { border-color: rgba(201, 165, 86, .18); }
  .nav .nav-cta a { margin: 1rem 0 0; text-align: center; }
  .no-js .nav { display: block; position: static; }
}

/* ———————————————————— Buttons ———————————————————— */
.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .75rem 1.5rem;
  font-family: var(--f-gothic); font-weight: 800; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  text-decoration: none; cursor: pointer;
  color: var(--car-deep); background: var(--b); border: 2px solid var(--b);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 10px 22px -12px rgba(0, 0, 0, .7);
  transition: background-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn:hover { --b: var(--gold-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--ghost { background: transparent; color: var(--chalk); border-color: rgba(239, 232, 220, .45); box-shadow: none; }
.btn--ghost:hover { background: rgba(239, 232, 220, .06); border-color: var(--chalk); }
.btn--ink { --b: var(--ink); color: var(--buff-hi); }
.btn--ink:hover { --b: #3a2416; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: progress; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-gothic); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--gold); }
.link-arrow svg { width: 1em; height: 1em; transition: transform .25s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { color: var(--gold-hi); }

/* ———————————————————— Hero: the car side ———————————————————— */
.car-side { --rib-w: 6.5rem; overflow: hidden; }
.car-side__body { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(2rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3rem); align-items: center; }
.marks { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.marks__reporting { font-size: clamp(4.5rem, 9vw, 8rem); }
.marks__number { display: grid; gap: .3rem; padding-bottom: .35em; }
.marks__number span { font-family: var(--f-stencil); font-weight: 800; color: var(--gold); font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: .12em; line-height: 1; }
.marks__number small { font-family: var(--f-gothic); font-weight: 700; color: var(--chalk-dim); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; }
.hero-title { font-size: clamp(2.6rem, 5vw, 4.6rem); color: var(--chalk); max-width: 16ch; }
.hero-title em { font-style: normal; color: var(--gold); }
.hero-lead { margin-top: 1.4rem; max-width: 36rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--chalk-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.9rem; }

.capacity { margin: clamp(2rem, 4vw, 2.75rem) 0 0; display: grid; grid-template-columns: auto 1fr; gap: .2rem 1.1rem; max-width: 34rem; font-family: var(--f-gothic); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; color: var(--chalk-dim); border-top: 2px solid rgba(201, 165, 86, .45); padding-top: .9rem; }
.capacity dt { color: var(--gold); font-family: var(--f-stencil); font-weight: 800; letter-spacing: .14em; }
.capacity dd { margin: 0; color: var(--chalk); }

/* Door bay: opening on the left, wall on the right; the door rolls right on its track */
.door-bay { position: relative; aspect-ratio: 5 / 5.4; max-height: 38rem; width: 100%; justify-self: end; }
.door-track { position: absolute; left: -2%; right: -2%; top: 0; height: 12px; background: linear-gradient(#0c0704, #2a190f 60%, #0c0704); border-radius: 2px; box-shadow: 0 2px 0 rgba(255, 210, 150, .06); }
.door-track::after { content: ""; position: absolute; inset: auto 0 -10px 0; height: 6px; background: radial-gradient(circle, #6d4a2f 0 2px, transparent 2.5px) 0 0 / 22px 6px repeat-x; }
.door-sill { position: absolute; left: -2%; right: -2%; bottom: 0; height: 10px; background: linear-gradient(#0c0704, #241509); }
.door-opening {
  position: absolute; left: 0; top: 12px; bottom: 10px; width: 62%;
  background:
    radial-gradient(120% 70% at 30% 35%, rgba(255, 200, 120, .07), transparent 60%),
    linear-gradient(90deg, rgba(0,0,0,.6), transparent 18%, transparent 82%, rgba(0,0,0,.5)),
    var(--car-night);
  box-shadow: inset 0 0 0 3px #0a0603, inset 0 18px 30px -10px #000;
  overflow: hidden;
}
.door-opening .goods { position: absolute; left: 3%; top: 15%; width: 64%; height: 82%; color: var(--chalk); opacity: .88; }
.door-opening .chalk-note { position: absolute; left: 6%; top: 4%; max-width: 62%; font-family: var(--f-chalk); font-weight: 700; font-size: clamp(1.15rem, 1.8vw, 1.6rem); color: var(--chalk); transform: rotate(-4deg); opacity: .92; line-height: 1.05; }
.door {
  --open: 70%;
  position: absolute; left: 0; top: 12px; bottom: 10px; width: 62%;
  background-color: var(--oxide);
  background-image:
    var(--grain),
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 5px), rgba(0,0,0,.28) calc(20% - 5px) calc(20% - 2px), rgba(255, 220, 170, .06) calc(20% - 2px) 20%);
  background-blend-mode: soft-light, normal;
  box-shadow: -10px 0 24px -8px rgba(0,0,0,.55), inset 0 0 0 2px rgba(0,0,0,.35);
  transform: translateX(var(--open));
  animation: door-roll 1.6s var(--ease-out) .35s both;
}
.door::before, .door::after { /* door rollers at top, latch bar */
  content: ""; position: absolute;
}
.door::before { top: -9px; left: 10%; right: 10%; height: 12px; background: radial-gradient(circle at 50% 50%, #1b0f08 0 5px, #6a4a30 5.5px 6.5px, transparent 7px) 0 0 / 50% 12px repeat-x; }
.door::after { left: 7%; top: 44%; width: 7px; height: 16%; background: linear-gradient(90deg, #120a05, #3c2618, #120a05); border-radius: 2px; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.door__placard { position: absolute; right: 9%; top: 9%; font-size: clamp(1.4rem, 2.5vw, 2.2rem); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .14em; }
@keyframes door-roll { from { transform: translateX(0); } to { transform: translateX(var(--open)); } }

/* Tack board with the route card, fixed to the car wall beside the door */
.tackboard {
  position: absolute; right: 1%; bottom: 13%; width: min(50%, 17rem);
  padding: 10px; background: #3b2516; box-shadow: inset 0 0 0 2px rgba(0,0,0,.4), 0 14px 28px -12px rgba(0,0,0,.8);
  z-index: 2;
}
.route-card {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--buff) var(--fibre); padding: .85rem .9rem 1rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 14px -8px rgba(0,0,0,.6);
  transform: rotate(-1.5deg); transition: transform .35s var(--ease-out), box-shadow .35s;
}
.route-card::before { content: ""; position: absolute; top: 6px; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d9c08a, #6f5634); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.route-card:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 22px -10px rgba(0,0,0,.65); }
.route-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-top: .5rem; border-bottom: 2px solid var(--ink); font-family: var(--f-gothic); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.route-card__row { display: grid; grid-template-columns: 3.4rem 1fr; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid var(--buff-rule); font-size: .78rem; align-items: baseline; }
.route-card__row span:first-child { font-family: var(--f-gothic); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.route-card__row span:last-child { font-family: var(--f-type); font-size: .8rem; overflow-wrap: anywhere; }
.route-card__go { display: inline-flex; gap: .35rem; align-items: center; margin-top: .65rem; font-family: var(--f-gothic); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .9rem; color: var(--stamp); }
.route-card__go svg { width: 1em; height: 1em; }

/* Underframe: side sill, shaded trucks, rail */
.underframe { position: relative; height: clamp(5.25rem, 9vw, 7rem); background: linear-gradient(var(--car-night), #0c0704 70%, #1a120d); overflow: hidden; }
.underframe .side-sill { position: absolute; left: 0; right: 0; top: 0; height: 16px; background: linear-gradient(#1b0f08, #120a05); border-top: 1px solid rgba(255, 210, 150, .08); }
.underframe .side-sill::after { content: ""; position: absolute; inset: 5px 0 auto; height: 6px; background: radial-gradient(circle at 46% 40%, #b07e52 0 1px, #7a4f32 1.5px 2.4px, transparent 3px) 0 0 / 20px 6px repeat-x; }
.underframe .truck { position: absolute; bottom: 9px; height: calc(100% - 4px); width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.underframe .truck--a { left: 6%; }
.underframe .truck--b { right: 6%; }
.underframe .rail { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: linear-gradient(#8a7d72 0 2px, #4a3f38 2px 6px, #241c17 6px); }
@media (max-width: 36rem) { .underframe .truck--a { left: -4%; } .underframe .truck--b { right: -4%; } }

@media (max-width: 60rem) {
  .car-side__body { grid-template-columns: 1fr; }
  .door-bay { justify-self: stretch; aspect-ratio: 5 / 3.8; max-height: 26rem; }
  .tackboard { bottom: 10%; width: min(42%, 14rem); }
}
@media (max-width: 30rem) {
  .door-bay { aspect-ratio: 5 / 4.8; }
  .tackboard { width: 50%; padding: 7px; right: 0; }
  .route-card__head span:last-child { display: none; }
  .brand-name b { font-size: 1.2rem; }
  .brand-name small { font-size: .68rem; letter-spacing: .14em; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .route-card { padding: .7rem .6rem .8rem; }
  .route-card__row { grid-template-columns: 1fr; gap: 0; }
  .route-card__row span:last-child { font-size: .72rem; }
  .capacity { grid-template-columns: 1fr; gap: 0; }
  .capacity dd { margin-bottom: .45rem; }
}

/* ———————————————————— Sections ———————————————————— */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
.section-head p { color: var(--chalk-dim); font-size: 1.125rem; max-width: 40rem; margin: 0; }
.paper .section-head p { color: var(--ink-soft); }

/* The consist: four cars on one rail */
.consist { --rib-w: 9rem; }
.consist__train { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; row-gap: clamp(3rem, 6vw, 4.5rem); position: relative; }
.car { position: relative; display: grid; grid-template-rows: auto 1fr; align-content: start; color: inherit; text-decoration: none; transition: opacity .45s var(--ease-out), filter .45s var(--ease-out); }
.car__art { position: relative; z-index: 1; }
.car__art svg { width: 100%; height: auto; overflow: visible; transition: transform .5s var(--ease-out); }
.car__bill { padding: 1.4rem clamp(1.25rem, 3vw, 2.5rem) 0 0; max-width: 34rem; }
.car__bill h3 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin: 0 0 .7rem; color: var(--chalk); }
.car__bill p { color: var(--chalk-dim); font-size: 1.05rem; margin-bottom: .9rem; }
.car__bill ul { list-style: none; margin: 0 0 1.1rem; padding: 0; font-size: .98rem; }
.car__bill li { padding: .34rem 0; border-top: 1px solid rgba(201, 165, 86, .2); color: var(--chalk); }
.chalk-tag { position: absolute; right: 6%; top: -.4rem; font-family: var(--f-chalk); font-weight: 700; font-size: 1.35rem; color: var(--chalk); transform: rotate(-6deg) translateY(6px); opacity: 0; transition: opacity .3s, transform .45s var(--ease-out); pointer-events: none; }
.chalk-tag::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -.35rem; height: .5rem; border-bottom: 2px solid currentColor; border-radius: 50%; opacity: .8; }
.consist__train:has(.car:hover, .car:focus-within) .car:not(:hover, :focus-within) { opacity: .38; filter: saturate(.6); }
.car:hover .car__art svg, .car:focus-within .car__art svg { transform: translateY(-6px); }
.car:hover .chalk-tag, .car:focus-within .chalk-tag { opacity: .95; transform: rotate(-6deg) translateY(0); }
.car .link-arrow:focus-visible { outline-offset: 4px; }
@media (max-width: 48rem) { .consist__train { grid-template-columns: 1fr; } .car__bill { padding-right: 0; } }

/* Provenance */
.provenance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.provenance__word { font-size: clamp(3rem, 6.2vw, 6rem); margin-bottom: 1.5rem; }
.provenance__story p { font-size: 1.125rem; color: var(--chalk); max-width: 36rem; }
.provenance__story p.muted { color: var(--chalk-dim); }
@media (max-width: 56rem) { .provenance { grid-template-columns: 1fr; } }

/* Paper: waybill card stock */
.paper {
  position: relative; color: var(--ink);
  background: var(--buff) var(--fibre);
  box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 30px 60px -30px rgba(0,0,0,.9), 0 12px 20px -14px rgba(0,0,0,.6);
}
.paper a { color: var(--ink); }
.history { padding: clamp(1.25rem, 3vw, 2rem); transform: rotate(.6deg); }
.history__head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; border-bottom: 3px double var(--ink); padding-bottom: .5rem; margin-bottom: .25rem; }
.history__head h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.history__head span { font-family: var(--f-gothic); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--ink-soft); }
.history dl { margin: 0; }
.history__row { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--buff-rule); }
.history dt { font-family: var(--f-gothic); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; color: var(--ink-soft); padding-top: .15rem; }
.history dd { margin: 0; font-family: var(--f-type); font-size: 1rem; line-height: 1.45; }
.history__stamp { position: absolute; right: 1.25rem; bottom: 1.1rem; }
@media (max-width: 30rem) { .history__row { grid-template-columns: 1fr; gap: .15rem; } .history { transform: none; } }

.stamp {
  display: inline-block; padding: .3rem .7rem .2rem; border: 3px solid currentColor; border-radius: 4px;
  font-family: var(--f-stencil); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  color: var(--stamp); transform: rotate(-8deg); opacity: .85;
  -webkit-mask-image: var(--wear); mask-image: var(--wear); -webkit-mask-size: 220px; mask-size: 220px;
}

/* Routing: numbered stations on a line */
.routing { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.route { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: stn; }
.route::before { content: ""; position: absolute; left: 1.45rem; top: .9rem; bottom: .9rem; width: 4px; background: repeating-linear-gradient(var(--gold-dim) 0 14px, transparent 14px 22px); }
.route li { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1.25rem; padding-bottom: clamp(1.75rem, 3vw, 2.5rem); counter-increment: stn; }
.route li:last-child { padding-bottom: 0; }
.route__stn { position: relative; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--car); border: 3px solid var(--gold-dim); font-family: var(--f-stencil); font-weight: 900; font-size: 1.5rem; color: var(--gold); transition: border-color .4s, background-color .4s, color .4s; }
.route__stn::after { content: ""; position: absolute; right: -.55rem; top: -.55rem; width: .9rem; height: .9rem; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 3px var(--car); transform: scale(0); transition: transform .45s var(--ease-out); }
.route li.is-active .route__stn { border-color: var(--gold); background: var(--gold); color: var(--car-deep); }
.route li.is-active .route__stn::after { transform: scale(1); }
.route h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: .35rem 0 .5rem; }
.route p { color: var(--chalk-dim); max-width: 34rem; margin: 0; }
@media (max-width: 56rem) { .routing { grid-template-columns: 1fr; } }

/* Production band: oxide car */
.band { --rib-w: 5.5rem; }
.band__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 2rem 4rem; align-items: center; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.band h2 { font-size: clamp(2.4rem, 5.2vw, 4.5rem); }
.band h2 .stencil { display: block; font-size: 1.12em; margin-top: .1em; -webkit-mask-size: 260px; mask-size: 260px; }
.band p { color: var(--chalk); max-width: 40rem; margin: 1.25rem 0 0; font-size: 1.125rem; }
.band .chalk { font-family: var(--f-chalk); font-weight: 700; font-size: 1.6rem; color: var(--chalk); transform: rotate(-3deg); display: inline-block; margin-top: .75rem; line-height: 1; }
@media (max-width: 52rem) { .band__inner { grid-template-columns: 1fr; } }

/* ———————————————————— Footer: the car end ———————————————————— */
.site-foot { --rib-w: 4.5rem; padding-top: clamp(3.5rem, 7vw, 5rem); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem clamp(2rem, 5vw, 4rem); padding-bottom: 3rem; }
.foot-card { max-width: 24rem; padding: 1.1rem 1.2rem 1.25rem; transform: rotate(-1deg); }
.foot-card h2 { font-size: 1.15rem; letter-spacing: .1em; border-bottom: 2px solid var(--ink); padding-bottom: .4rem; margin-bottom: .2rem; }
.foot-card dl { margin: 0; }
.foot-card div { display: grid; grid-template-columns: 4.2rem 1fr; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--buff-rule); align-items: baseline; }
.foot-card dt { font-family: var(--f-gothic); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: var(--ink-soft); }
.foot-card dd { margin: 0; font-family: var(--f-type); font-size: .98rem; overflow-wrap: anywhere; }
.foot-col h2 { font-family: var(--f-stencil); color: var(--gold); font-size: 1.1rem; letter-spacing: .16em; margin-bottom: 1rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.foot-col a { text-decoration: none; color: var(--chalk); font-family: var(--f-gothic); font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; }
.foot-col a:hover { color: var(--gold-hi); text-decoration: underline; text-decoration-thickness: 2px; }
.foot-col p { color: var(--chalk-dim); font-size: .95rem; }
.foot-col p a { font-family: var(--f-body); font-weight: 600; font-size: inherit; text-transform: none; letter-spacing: 0; text-decoration: underline; }
.foot-legal { border-top: 1px solid rgba(201, 165, 86, .25); padding-block: 1.25rem 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; color: var(--chalk-dim); font-size: .875rem; }
.foot-legal p { margin: 0; }
.foot-legal a { color: var(--chalk-dim); }
.foot-legal a:hover { color: var(--chalk); }
@media (max-width: 56rem) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-card-wrap { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .foot-grid { grid-template-columns: 1fr; } }

/* ———————————————————— Inner page heads ———————————————————— */
.page-head { --rib-w: 6rem; padding-top: clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.page-head > .wrap { padding-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; }
.page-head h1 { font-size: clamp(2.8rem, 6.4vw, 5.75rem); max-width: 14ch; }
.page-head h1 em { font-style: normal; color: var(--gold); }
.page-head .lead { margin-top: 1.25rem; color: var(--chalk-dim); font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 40rem; }
.page-head .side-mark { font-size: clamp(4rem, 10vw, 8.5rem); text-align: right; justify-self: end; }
.page-head .side-mark small { display: block; font-size: .2em; letter-spacing: .3em; margin-top: .4em; }
@media (max-width: 52rem) { .page-head__grid { grid-template-columns: 1fr; } .page-head .side-mark { justify-self: start; text-align: left; font-size: clamp(3.5rem, 18vw, 6rem); } }

/* Call sheet table (productions) */
.callsheet { width: 100%; border-collapse: collapse; font-size: 1rem; }
.callsheet caption { text-align: left; }
.callsheet th, .callsheet td { text-align: left; vertical-align: top; padding: .9rem 1rem; border-bottom: 1px solid var(--buff-rule); }
.callsheet thead th { font-family: var(--f-gothic); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; color: var(--ink-soft); border-bottom: 3px double var(--ink); }
.callsheet tbody th { font-family: var(--f-gothic); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 1.3rem; line-height: 1.05; width: 30%; }
.callsheet td { font-family: var(--f-type); line-height: 1.5; }
.callsheet-card { padding: clamp(1rem, 3vw, 2rem); }
.callsheet-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; border-bottom: 3px solid var(--ink); padding-bottom: .6rem; margin-bottom: .25rem; }
.callsheet-card__head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.callsheet-card__head span { font-family: var(--f-gothic); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--ink-soft); }
@media (max-width: 40rem) {
  .callsheet thead { display: none; }
  .callsheet tr { display: block; padding: .9rem 0; border-bottom: 1px solid var(--buff-rule); }
  .callsheet tbody th, .callsheet td { display: block; width: auto; border: 0; padding: .15rem 0; }
}

/* Two-up notes */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: 2.5rem clamp(2rem, 4vw, 3.5rem); }
.note h3 { font-size: 1.6rem; margin-bottom: .6rem; color: var(--chalk); }
.note p { color: var(--chalk-dim); margin: 0; }
.note { border-top: 3px solid var(--gold-dim); padding-top: 1.1rem; }

/* FAQ */
.faq { max-width: 52rem; }
.faq details { border-top: 1px solid rgba(201, 165, 86, .3); }
.faq details:last-child { border-bottom: 1px solid rgba(201, 165, 86, .3); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; padding: 1.15rem 0; font-family: var(--f-gothic); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.1; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 1.4rem; height: 1.4rem; color: var(--gold); transition: transform .35s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq summary:hover { color: var(--gold-hi); }
.faq .answer { padding: 0 0 1.4rem; color: var(--chalk-dim); max-width: 44rem; }
.faq .answer p:last-child { margin: 0; }

/* ———————————————————— Waybill forms ———————————————————— */
.waybill-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 60rem) { .waybill-wrap { grid-template-columns: 1fr; } }
.waybill { position: relative; padding: clamp(1rem, 2.5vw, 1.75rem); }
.waybill__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem 1rem; border-bottom: 3px solid var(--ink); padding-bottom: .6rem; }
.waybill__head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.waybill__head span { font-family: var(--f-gothic); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--ink-soft); }
.waybill__note { font-size: .92rem; color: var(--ink-soft); margin: .75rem 0 1rem; }
.waybill fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.waybill legend { padding: 0; margin: 1.25rem 0 .5rem; font-family: var(--f-stencil); font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 1.05rem; color: var(--ink); }
.cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.cell { grid-column: span 3; position: relative; display: flex; flex-direction: column; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: transparent; transition: background-color .2s; }
.cell--full { grid-column: 1 / -1; }
.cell--2 { grid-column: span 2; }
.cell--4 { grid-column: span 4; }
.cell:focus-within { background: var(--buff-hi); box-shadow: inset 0 0 0 2px var(--stamp); }
.cell label, .cell .cell-label { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .6rem 0; font-family: var(--f-gothic); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; color: var(--ink-soft); }
.cell .req { color: var(--stamp); font-family: var(--f-body); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: .75rem; }
.cell input, .cell select, .cell textarea {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: var(--f-type); font-size: 1.05rem; line-height: 1.4;
  padding: .3rem .6rem .6rem; border-radius: 0; caret-color: var(--stamp);
  appearance: none;
}
.cell input::placeholder, .cell textarea::placeholder { color: #6b5239; opacity: 1; }
.cell input:focus, .cell select:focus, .cell textarea:focus { outline: none; }
.cell textarea { min-height: 8.5rem; resize: vertical; }
.cell select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2326170e' stroke-width='2.2'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 1rem; padding-right: 2rem; cursor: pointer; }
.cell input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
.cell[data-invalid] { background: rgba(143, 45, 26, .07); }
.cell[data-invalid] label { color: var(--stamp); }
.cell .err { display: none; padding: 0 .6rem .5rem; font-size: .85rem; color: var(--stamp); font-weight: 600; }
.cell[data-invalid] .err { display: block; }
.checks { grid-column: 1 / -1; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: .45rem .6rem .7rem; }
.checks .cell-label { padding: 0 0 .5rem; }
.checks__grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check span { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border: 1.5px solid var(--ink); font-family: var(--f-gothic); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; line-height: 1; background: transparent; transition: background-color .2s, color .2s; user-select: none; }
.check span::before { content: ""; width: .85rem; height: .85rem; border: 1.5px solid currentColor; flex: none; background: transparent; transition: background-color .15s; }
.check input:checked + span { background: var(--ink); color: var(--buff-hi); }
.check input:checked + span::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--ink); }
.check input:focus-visible + span { outline: 3px solid var(--stamp); outline-offset: 2px; }
.check:hover span { background: rgba(38, 23, 14, .07); }
.check input:checked:hover + span { background: #3a2416; }
@media (max-width: 34rem) { .cell, .cell--2, .cell--4 { grid-column: 1 / -1; } }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.waybill__foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; margin-top: 1.25rem; }
.waybill__foot .fine { font-size: .85rem; color: var(--ink-soft); max-width: 26rem; margin: 0; }
.turnstile-slot { min-height: 65px; margin-top: 1.1rem; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status[data-kind="error"] { color: var(--stamp); }
.form-status:empty { display: none; }

/* Received: stamp lands on the waybill */
.received { display: none; position: relative; padding: clamp(1.5rem, 4vw, 2.5rem); text-align: left; }
.waybill.is-sent form { display: none; }
.waybill.is-sent .received { display: block; }
.received .stamp { font-size: clamp(2.4rem, 7vw, 4rem); animation: stamp-in .55s var(--ease-out) both; }
.received h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 1.5rem 0 .6rem; }
.received p { color: var(--ink-soft); max-width: 34rem; }
@keyframes stamp-in { 0% { opacity: 0; transform: rotate(-14deg) scale(1.9); } 60% { opacity: .9; transform: rotate(-7deg) scale(.96); } 100% { opacity: .85; transform: rotate(-8deg) scale(1); } }

/* Contact sidebar: direct lines */
.direct { display: grid; gap: 1.5rem; }
.direct h2 { font-size: clamp(2rem, 4vw, 3rem); }
.direct p { color: var(--chalk-dim); }
.lines { margin: 0; display: grid; gap: 0; border-top: 2px solid rgba(201, 165, 86, .45); }
.lines div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(201, 165, 86, .22); align-items: baseline; }
.lines dt { font-family: var(--f-stencil); font-weight: 800; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.lines dd { margin: 0; font-family: var(--f-type); font-size: 1.1rem; overflow-wrap: anywhere; }
.lines dd a { color: var(--chalk); }
.lines dd a:hover { color: var(--gold-hi); }
.lines .tbd { color: var(--chalk-dim); }

/* ———————————————————— Legal documents (Read) ———————————————————— */
.doc-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.doc-toc { position: sticky; top: 1.5rem; font-size: .95rem; }
.doc-toc h2 { font-family: var(--f-stencil); color: var(--gold); font-size: 1rem; letter-spacing: .16em; margin-bottom: .75rem; }
.doc-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: .15rem; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: grid; grid-template-columns: 1.8rem 1fr; padding: .3rem 0; text-decoration: none; color: var(--chalk-dim); line-height: 1.35; }
.doc-toc a::before { content: counter(toc) "."; font-family: var(--f-type); color: var(--gold-dim); }
.doc-toc a:hover { color: var(--chalk); }
.doc { padding: clamp(1.5rem, 5vw, 3.5rem); max-width: 50rem; }
.doc__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-family: var(--f-gothic); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; color: var(--ink-soft); border-bottom: 3px double var(--ink); padding-bottom: .7rem; margin-bottom: 1.75rem; }
.doc h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.6rem 0 .8rem; scroll-margin-top: 1.5rem; }
.doc h2:first-of-type { margin-top: 0; }
.doc h3 { font-family: var(--f-body); text-transform: none; font-weight: 600; font-size: 1.1rem; letter-spacing: 0; line-height: 1.3; margin: 1.5rem 0 .5rem; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .45rem; }
.doc li::marker { color: var(--stamp); }
.doc .caps { text-transform: uppercase; font-size: .95rem; letter-spacing: .01em; }
.doc a { color: var(--stamp); }
@media (max-width: 56rem) { .doc-layout { grid-template-columns: 1fr; } .doc-toc { position: static; } }

/* 404 */
.lost { min-height: 70vh; display: grid; align-content: center; padding-block: 5rem; }
.lost .stencil { font-size: clamp(6rem, 22vw, 16rem); }
.lost h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 1rem 0; }
.lost p { color: var(--chalk-dim); max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
.received:focus { outline: none; }
