/* Van Hire, shared stylesheet. Loads first on every page. Tokens live here only. */

:root {
  --black: #000;
  --ink: #161616;
  --white: #fff;
  --paper: #f3f3f3;
  --rule: #dadada;
  --rule-strong: #bcbcbc;
  --mute: #5e5e5e;
  --mute-on-black: #a8a8a8;
  --rule-on-black: #2a2a2a;
  --red: #c8102e;
  --red-press: #a50d25;
  --red-tint: #fbe9ec;
  --ok: #1f7a3a;
  --ok-tint: #e7f4eb;

  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  --step-4: clamp(2.8rem, 2rem + 4vw, 5.2rem);

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 112px);
  --radius: 6px;
  --control: 52px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--black) var(--paper); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
}
::selection { background: var(--red); color: var(--white); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--black); border: 3px solid var(--paper); border-radius: 8px; }

img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--red); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0 0 1em; max-width: 62ch; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
small, .small { font-size: 0.9375rem; }
.mute { color: var(--mute); }
.tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--red); color: var(--white); padding: 10px 14px; z-index: 50; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin: 0; }
.on-black { background: var(--black); color: var(--white); }
.on-black .mute { color: var(--mute-on-black); }
.on-paper { background: var(--paper); }

/* Header */
.site-header { background: var(--black); color: var(--white); position: sticky; top: 0; z-index: 40; }
.site-header__row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em; text-decoration: none; }
.wordmark__mark { width: 14px; height: 14px; background: var(--red); border-radius: 2px; transform: skewX(-12deg); }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { text-decoration: none; font-weight: 500; padding: 8px 0; position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover::after { transform: scaleX(1); } }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav .nav-account { border: 1.5px solid var(--white); border-radius: var(--radius); padding: 9px 16px; }
.site-nav .nav-account::after { display: none; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--white); border-radius: var(--radius); color: var(--white); padding: 8px 14px; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--black); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; border-top: 1px solid var(--rule-on-black); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule-on-black); font-size: 1.15rem; }
  .site-nav a::after { display: none; }
  .site-nav .nav-account { margin-top: 14px; text-align: center; border-bottom: 1.5px solid var(--white); }
}

/* Footer */
.site-footer { background: var(--black); color: var(--white); padding: 56px 0 32px; margin-top: auto; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; align-items: start; }
.site-footer p { color: var(--mute-on-black); }
.site-footer nav { display: grid; gap: 10px; }
.site-footer nav a { text-decoration: none; }
.site-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule-on-black); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--mute-on-black); font-size: 0.9375rem; }
.site-footer__legal a { color: var(--white); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: 24px; } }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--control); padding: 0 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; background: var(--ink); color: var(--white);
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--red); color: var(--white); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--red-press); }
  .btn-ghost:hover { border-color: var(--ink); }
  .on-black .btn-ghost:hover { border-color: var(--white); }
}
.btn-ghost { background: transparent; color: inherit; border-color: var(--rule-strong); }
.btn-light { background: var(--white); color: var(--black); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; font-weight: 500; }

/* Forms */
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--mute); font-size: 0.9375rem; margin: -2px 0 8px; }
.input {
  width: 100%; min-height: var(--control); padding: 0 14px; border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius); background: var(--white); font: inherit; color: var(--ink);
  transition: border-color 140ms ease;
}
textarea.input { min-height: 120px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input::placeholder { color: #767676; }
.field-error { color: var(--red); font-weight: 500; margin-top: 6px; font-size: 0.9375rem; }
.field-error:empty { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checkbox input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.form-note { background: var(--paper); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.form-note p { margin: 0; }
.alert { border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; font-weight: 500; }
.alert:empty { display: none; }
.alert--error { background: var(--red-tint); color: var(--red-press); }
.alert--ok { background: var(--ok-tint); color: var(--ok); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9375rem; padding: 4px 12px 4px 10px; border-radius: 999px; border: 1.5px solid var(--rule-strong); white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); }
.pill--pending::before { background: var(--rule-strong); }
.pill--confirmed { border-color: var(--ink); }
.pill--confirmed::before { background: var(--ink); }
.pill--collected { border-color: var(--red); color: var(--red-press); }
.pill--collected::before { background: var(--red); }
.pill--returned { color: var(--mute); }

/* Van figure: a cut-out on a paper surface */
.van-figure { background: var(--paper); border-radius: var(--radius); padding: 8%; display: grid; place-items: center; aspect-ratio: 2 / 1; min-width: 0; }
.van-figure img { width: 100%; height: 100%; object-fit: contain; min-width: 0; }

/* Definition rows */
.spec { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; margin: 0; }
.spec div { display: contents; }
.spec dt { color: var(--mute); padding: 10px 0; border-top: 1px solid var(--rule); }
.spec dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--rule); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Narrow reading column for app pages */
.narrow { max-width: 560px; }
.page-title { padding-top: clamp(32px, 5vw, 56px); }
.page-title p { margin: 0; color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
