/* The booking page: the night side holds the promise and the three steps, the paper side holds the questions,
   then the day and time, then the booking. call.js moves between the steps; without it the questions show
   with a note that booking needs a script. */

.cb { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: var(--header-h); min-height: 100svh; }

/* ---------- the night side ---------- */
.cb-side__in { display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 26px); padding: clamp(32px, 6vh, 72px) var(--pad) clamp(28px, 5vh, 56px); }
.cb-side__kicker { color: #BDB8B1; }
.cb-side__h { margin: 0; font-size: clamp(48px, 5.4vw, 104px); }
.cb-free { color: var(--accent); }
.cb-side__keep { margin: -4px 0 0; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.15; letter-spacing: -.015em; font-weight: 500; }
.cb-steps { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid #2B2C33; }
.cb-step { display: flex; gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid #2B2C33; color: #8E8A86; font-size: 18px; letter-spacing: -.01em; transition: color var(--dur-standard) var(--ease-pull); }
.cb-step .mono { min-width: 2.2em; padding: 2px 6px; margin-left: -6px; text-align: center; }
.cb-step[aria-current="step"] { color: var(--night-ink); }
.cb-step[aria-current="step"] .mono { color: var(--accent-ink); font-weight: 700; background: var(--accent); }
.cb-step.is-done { color: #BDB8B1; }
.cb-step.is-done span:last-child::after { content: ""; display: inline-block; width: .5em; height: .28em; margin-left: .5em; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-.25em) rotate(-45deg); }
.cb-side__body { margin: 0; max-width: 46ch; color: #BDB8B1; font-size: 16px; line-height: 1.5; }
.cb-side__out { margin: 0; color: #8E8A86; text-transform: none; letter-spacing: .02em; font-size: 13px; line-height: 1.6; }
.cb-side__out a { color: var(--night-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the paper side ---------- */
.cb-main { padding: clamp(40px, 7vh, 96px) var(--pad) clamp(72px, 12vh, 160px); }
.cb-panel { max-width: 760px; }
.cb-panel[hidden] { display: none; }
.cb-panel__h { margin: 0; outline: none; }
.cb-panel__sub { margin: 12px 0 0; font-size: 18px; line-height: 1.45; max-width: 52ch; }
.cb-note[hidden] { display: none; }
.cb-note { margin: 0 0 28px; padding: 14px 16px; border: 1px solid var(--ink); font-size: 16px; max-width: 760px; }
.cb-note a { color: inherit; }
.cb-summary { margin: 22px 0 0; color: var(--accent); font-weight: 500; }
.cb-summary[hidden] { display: none; }

/* A question: its number, its words, then the answer on one ruled line. */
.cb-q { position: relative; display: grid; gap: 8px; padding: 30px 0 4px; }
.cb-q label { display: flex; gap: 14px; align-items: baseline; cursor: text; }
.cb-q__n { color: var(--accent); font-weight: 700; min-width: 2.2em; }
.cb-q__l { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; font-weight: 500; letter-spacing: -.012em; }
.cb-opt { margin-left: 6px; font: 400 12px/1 var(--font-label), monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Every answer sits on a dark 2px line (about 4:1 on the paper), so it reads as a place to write. */
.cb-q input, .cb-q textarea, .cb-q select {
  --line: rgba(18, 19, 23, .55);
  width: 100%; margin: 0; padding: 8px 2px 6px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0;
  background: transparent; color: var(--ink);
  transition: border-color var(--dur-quick) var(--ease-stop), box-shadow var(--dur-quick) var(--ease-stop);
  font: 400 clamp(19px, 1.7vw, 24px)/1.35 var(--font-body), system-ui, sans-serif; letter-spacing: -.01em; outline: none;
}
.cb-q input, .cb-q select { min-height: 44px; }
.cb-q textarea { resize: vertical; min-height: 2.2em; }
.cb-q input::placeholder, .cb-q textarea::placeholder { color: #6B6663; }
.cb-q input:focus, .cb-q textarea:focus, .cb-q select:focus { border-bottom-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
/* Question 5 is a box: the one answer that wants a few sentences. */
.cb-q #f-about { min-height: 9.5em; padding: 12px 14px; border: 2px solid var(--line); border-radius: 2px; background: rgba(244, 242, 239, .7); }
.cb-q #f-about:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cb-q__s { margin: -2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; max-width: 56ch; }
.cb-q__e { margin: 0; color: var(--accent); font-size: 15px; font-weight: 500; }
.cb-q__e:empty { display: none; }
.cb-q.is-bad :is(input, textarea, select) { --line: var(--accent); }
.cb-q.is-bad :is(input, textarea, select):focus { border-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.cb-select { position: relative; }
.cb-select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.cb-select select:invalid { color: #6B6663; }
.cb-select::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.cb-contact { margin: 44px 0 0; padding: 0; border: 0; border-top: 1px solid var(--ink); }
.cb-contact legend { padding: 18px 0 0; color: var(--ink); font-weight: 700; float: left; width: 100%; }
.cb-contact legend + .cb-q { clear: both; }
.cb-trap, .cb-trap input { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cb-actions { margin-top: 40px; }

/* ---------- a day, then a time ---------- */
.cb-back { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 18px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cb-back:hover { color: var(--ink); }
.cb-status { margin: 24px 0 0; color: var(--muted); }
.cb-status:empty { display: none; }
.cb-status a { color: var(--ink); }
.cb-status button { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.cb-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(86px, 1fr); gap: 8px; margin-top: 28px; padding-bottom: 6px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.cb-days:empty, .cb-times:empty { display: none; }
.cb-pick { position: relative; cursor: pointer; }
.cb-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cb-day { scroll-snap-align: start; display: grid; gap: 4px; min-height: 92px; padding: 12px 12px 10px; border: 1px solid var(--rule); border-radius: 2px; background: rgba(244, 242, 239, .72); color: var(--ink); transition: background var(--dur-quick) var(--ease-stop), color var(--dur-quick) var(--ease-stop), border-color var(--dur-quick) var(--ease-stop); }
.cb-day .mono { font-size: 11px; }
.cb-day b { font: 700 32px/1 var(--font-display), system-ui, sans-serif; letter-spacing: -.035em; }
.cb-day:hover { border-color: var(--ink); }
.cb-day.is-on { background: var(--ink); border-color: var(--ink); color: var(--night-ink); }
.cb-day.is-none { opacity: .38; cursor: default; }
.cb-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.cb-time { display: grid; place-content: center; gap: 5px; min-height: 68px; padding: 8px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); text-align: center; transition: background var(--dur-quick) var(--ease-stop), color var(--dur-quick) var(--ease-stop); }
.cb-time span { font: 500 22px/1 var(--font-display), system-ui, sans-serif; letter-spacing: -.02em; }
.cb-time small { font: 400 11px/1 var(--font-label), monospace; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.cb-time:hover { background: rgba(18, 19, 23, .06); }
.cb-time.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cb-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cb-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--ink); }
.cb-confirm[hidden] { display: none; }
.cb-confirm__when { display: grid; gap: 6px; margin: 0; }
.cb-confirm__when strong { font: 500 clamp(22px, 2vw, 30px)/1.15 var(--font-display), system-ui, sans-serif; letter-spacing: -.02em; }
.cb-confirm .cb-summary { flex-basis: 100%; margin: 0; order: 3; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- booked ---------- */
.cb-done__k { color: var(--accent); font-weight: 700; }
.cb-done__h { margin: 10px 0 26px; font-size: clamp(44px, 5.6vw, 96px); outline: none; }
.cb-done__line { margin: 0 0 18px; max-width: 30ch; }
.cb-done__line strong { font-weight: 500; overflow-wrap: anywhere; }
.cb-done__actions, .cb-panel .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Each step arrives the way the site's reveals do: up a little, out of nothing. */
@media (prefers-reduced-motion: no-preference) {
  .cb-panel.is-in { animation: cb-in var(--dur-standard) var(--ease-stop) both; }
  @keyframes cb-in { from { opacity: 0; transform: translateY(16px); } }
}

@media (min-width: 960px) {
  .cb { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .cb-side { position: sticky; top: var(--header-h); align-self: start; height: calc(100svh - var(--header-h)); }
  .cb-side__in { height: 100%; }
  .cb-side__body { margin-top: auto; }
  .cb-main { padding-inline: clamp(40px, 6vw, 112px) var(--pad); }
}
@media (min-width: 960px) and (max-height: 800px) {
  .cb-side__h { font-size: clamp(44px, 4.6vw, 80px); }
  .cb-step { padding: 10px 0; font-size: 16px; }
}
@media (max-width: 959px) {
  .cb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #2B2C33; }
  .cb-step { display: grid; gap: 4px; padding: 12px 8px 12px 0; border-bottom: 0; font-size: 14px; line-height: 1.2; }
  .cb-step .mono { justify-self: start; margin-left: 0; }
  .cb-side__body { font-size: 15px; }
  .cb-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
