/* Booking page. One screen: pick a day, pick a time, name and email, book. Colours and type match the homepage. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("/fonts/instrument-sans-latin-wdth-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-display: optional;
  font-weight: 400;
  src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --paper: #f2f0ea;
  --sheet: #f8f6f0;
  --ink: #131619;
  --machinery: #30363b;
  --structural: #656d73;
  --quiet: #c9cac4;
  --rule: #dcdad2;
  --control: #526f8f;
  --control-wash: #e2e6e8;
  --on-control: #f8f6f0;
  --amber: #b97b3f;
  --green-ink: #4a6553;
  --green-wash: #e0e7de;
  --fault: #a5523f;
  --fault-wash: #f1dfd8;
  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 3px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --paper: #131619;
  --sheet: #191d21;
  --ink: #ece9e1;
  --machinery: #c9cbc5;
  --structural: #9aa2a7;
  --quiet: #3b4349;
  --rule: #2a3137;
  --control: #7f9bb8;
  --control-wash: #1e2833;
  --on-control: #131619;
  --amber: #ca9159;
  --green-ink: #a6c2ad;
  --green-wash: #1c2921;
  --fault: #d07a64;
  --fault-wash: #33201b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--control); outline-offset: 2px; }
h1, h2 { margin: 0; }

.wrap { max-width: 880px; margin: 0 auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; border-bottom: 1px solid var(--rule); }
.mark { font-weight: 650; letter-spacing: -.01em; text-decoration: none; font-size: 17px; }
.top-link { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--structural); text-decoration: none; }
.top-link:hover { color: var(--ink); }

.intro { padding-block: clamp(32px, 6vw, 64px) clamp(20px, 3vw, 32px); }
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--structural); }
.eyebrow span + span::before { content: "·"; margin-right: 14px; color: var(--quiet); }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.025em; font-weight: 600; }
.lead { margin: 16px 0 0; font-size: clamp(17px, 1.6vw, 19px); color: var(--machinery); max-width: 58ch; }
.host { margin: 14px 0 0; font-size: 14px; color: var(--structural); }
.host strong { color: var(--ink); font-weight: 600; }

.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); }
.step + .step { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.step-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
h2 { font-size: 20px; letter-spacing: -.01em; font-weight: 600; display: flex; align-items: center; gap: 10px; }
h2:focus { outline: none; }
.n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.tz, .picked { margin: 0; font-size: 14px; color: var(--structural); }
.picked { color: var(--ink); font-weight: 600; }
.linklike { background: none; border: 0; padding: 0; color: var(--control); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.tz-picker { display: grid; gap: 6px; margin-bottom: 14px; max-width: 360px; }
.label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--structural); }
select, input { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--quiet); border-radius: var(--radius); }
input:focus, select:focus { border-color: var(--control); outline: 2px solid var(--control-wash); outline-offset: 0; }

/* Space held while open times load, so the page does not jump (measured 90px days; times 245px desktop, 464px mobile). */
#booker[aria-busy="true"] .days { min-height: 90px; }
#booker[aria-busy="true"] .times { min-height: 245px; }
@media (max-width: 640px) { #booker[aria-busy="true"] .times { min-height: 464px; } }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.day {
  flex: 0 0 auto; min-width: 74px; scroll-snap-align: start;
  display: grid; gap: 2px; justify-items: center; padding: 10px 8px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.day:hover { border-color: var(--quiet); }
.day-dow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--structural); }
.day-num { font-size: 20px; font-weight: 600; line-height: 1.1; }
.day-mon { font-size: 12px; color: var(--structural); }
.day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day[aria-pressed="true"] .day-dow, .day[aria-pressed="true"] .day-mon { color: var(--quiet); }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.time {
  min-height: 44px; padding: 10px 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.time:hover { border-color: var(--control); }
.time[aria-pressed="true"] { background: var(--control); border-color: var(--control); color: var(--on-control); }
.more-times { grid-column: 1 / -1; justify-self: start; margin-top: 4px; font-size: 14px; }
.status { margin: 12px 0 0; font-size: 14px; color: var(--structural); }
.status:empty { display: none; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-error { font-size: 13px; color: var(--fault); }
input[aria-invalid="true"] { border-color: var(--fault); }
.suggest { margin: 10px 0 0; font-size: 14px; color: var(--machinery); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#turnstile:empty { display: none; }
#turnstile { margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px;
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--machinery); }
.btn[disabled] { opacity: .6; cursor: progress; }
.form-error { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--fault-wash); color: var(--fault); font-size: 14px; }
.form-error a { color: inherit; }

.step.done { margin-top: 0; padding-top: 0; border-top: 0; }
.done h2 { font-size: clamp(26px, 3.4vw, 34px); }
.done-when { margin: 12px 0 0; font-size: 18px; font-weight: 600; }
.done-note { margin: 6px 0 0; color: var(--machinery); }
.done-small { margin: 18px 0 0; font-size: 14px; color: var(--structural); max-width: 60ch; }
.actions { margin: 0; }

.fallback { margin: 18px 2px 0; font-size: 14px; color: var(--structural); }
.form-note { margin: 12px 0 0; font-size: 13px; color: var(--structural); }

@media (max-width: 640px) {
  .fields { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .times { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
