/* ---------- Booking page: flat and quiet. Progress rings fixed at the left edge, one step at a time in the middle ---------- */
.book { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }

.book__top { padding: 24px clamp(20px, 4vw, 48px) 0; }

.book__main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: clamp(40px, 9vh, 96px) 20px 80px; }

/* ----- Progress: on desktop, pinned to the left of the screen and vertically centered ----- */
.rail { position: fixed; left: clamp(20px, 4vw, 48px); top: 50%; transform: translateY(-50%); z-index: 2; }
.rail__steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }

.rail__btn {
  display: flex; align-items: center; gap: 12px;
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; font-size: 15px; letter-spacing: -0.01em; color: var(--ink-muted); text-align: left;
  cursor: pointer; transition: color .3s ease;
}
.rail__btn[disabled] { cursor: default; }
.rail__btn:not([disabled]):hover .rail__label { color: var(--ink); }
.rail__btn:not([disabled]):hover .ring__base { stroke: #8f8f8d; }
.rail__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.rail__step.is-current .rail__btn { color: var(--ink); font-weight: 500; }
.rail__step.is-done .rail__btn, .rail__step.is-partial .rail__btn { color: #55554f; }

/* The ring: dotted border; a solid arc fills it clockwise (--p is 0 to 1, set by booking.js) */
.ring { position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; }
.ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }   /* the arc starts at the top */
.ring__base { fill: none; stroke: #bbbbb9; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 0 6.25; transition: stroke .3s ease, opacity .3s ease; }   /* 16 round dots */
.ring__arc {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.86;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  opacity: clamp(0, calc(var(--p, 0) * 60), 1);          /* nothing at all while empty (no stray dot) */
  transition: stroke-dashoffset .5s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}
.ring__no { display: none; }

.ring__check { position: absolute; width: 12px; height: 12px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .3s ease .15s, transform .3s ease .15s; }

.is-current .ring__base { stroke: #8f8f8d; }           /* the step you are on: darker dots, black arc growing */
.is-current .ring__no { color: var(--ink); }
.is-partial .ring__base { stroke: #8f8f8d; }           /* passed, but not filled in completely: the ring stays as full as it really is, no check */
.is-partial .ring__no { color: #55554f; }
.is-done .ring__base, .is-done .ring__no { opacity: 0; }   /* filled in completely: one full solid ring and a check */
.is-done .ring__check { opacity: 1; transform: none; }

/* ----- One step at a time, straight on the page: a heading, the fields, and the buttons ----- */
.booking { width: 100%; }

.panel { animation: panel-in .4s cubic-bezier(.2, .7, .2, 1); }
.panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel__head { margin-bottom: 36px; }
.panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.panel__foot .btn:only-child { margin-left: auto; }
.panel__foot .btn[disabled] { opacity: .6; cursor: default; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #cfcfcc; }
.btn--ghost:hover { background: rgba(0, 0, 0, .04); }

.panel__eyebrow { margin: 0 0 14px; font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.book__h { margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 36px); font-weight: 500; line-height: 1.08; letter-spacing: -0.04em; }
.book__h:focus { outline: none; }
.book__sub { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.book__note { margin: 28px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

/* ----- Fields: no fill, a hairline border that turns black on focus ----- */
.fields { display: grid; gap: 22px; }
.fields__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

fieldset.group { min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { display: block; margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 500; color: #55554f; }
.field__opt { margin-left: 4px; font-weight: 400; color: #8a8a88; }

.field__input, .money {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: inset 0 0 0 1px #cfcfcc;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: box-shadow .18s ease;
}
.field__input::placeholder { color: #a0a09e; }
.field__input:hover, .money:hover { box-shadow: inset 0 0 0 1px #a9a9a7; }
.field__input:focus, .money:focus-within { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.field__input--area { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; min-height: 96px; }
.field__input[aria-invalid="true"], .money:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px #b3261e; }

.money { display: flex; align-items: center; gap: 10px; }
.money__cur { flex: none; font-size: 15px; color: var(--ink-muted); }
.money__input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.money__input:focus { outline: none; }
.custom { margin-top: 16px; }
.custom[hidden] { display: none; }

.field__error, .form-error { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: #b3261e; }
.field__error[hidden], .form-error[hidden] { display: none; }
.form-error { margin: 20px 0 0; }

/* ----- Options: one line each. A hairline row; a picked one gets a thin black border and a filled, drawn check ----- */
.opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.opts .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* an odd last option takes the whole row */

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #cfcfcc;
  cursor: pointer;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.opt:hover { box-shadow: inset 0 0 0 1px #a9a9a7; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.opt__text { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: #66665f; transition: color .2s ease; }
.opt:has(input:checked) .opt__text { color: var(--ink); }

.opt__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid #a9a9a7;
  border-radius: 6px;                       /* square-ish = pick several */
  transition: background-color .2s ease, border-color .2s ease;
}
.opts--radio .opt__box { border-radius: 50%; }   /* round = pick one */
.opt__box svg { width: 12px; height: 12px; fill: none; stroke: #fafafa; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; }
.opt:has(input:checked) .opt__box { background: var(--ink); border-color: var(--ink); }
.opt:has(input:checked) .opt__box svg { opacity: 1; transform: none; }

/* ----- Summary on the last step ----- */
.summary { margin: 0 0 28px; padding: 0; }
.summary > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.summary > div:first-child { border-top: 0; padding-top: 0; }
.summary dt { font-size: 13px; color: var(--ink-muted); }
.summary dd { margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }

/* Bots fill this field; people never see it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .rail__btn, .ring__base, .ring__arc, .ring__no, .ring__check, .opt, .opt__text, .opt__box, .opt__box svg, .field__input, .money { transition: none; }
}

/* ----- Calendar (step 4): the month on the left, the times on the right, sized to fit the screen ----- */
/* this step is wider than the others so the month and the times sit side by side */
.book__main:has(.panel--wide:not([hidden])) { max-width: 860px; padding-top: clamp(24px, 6vh, 64px); }
.panel--wide .panel__head { margin-bottom: 24px; }
.book__main:has(.panel--wide:not([hidden])) .book__note { display: none; }   /* keeps this step inside the screen */
.panel--wide .panel__foot { margin-top: 24px; padding-top: 20px; }

.cal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 56px; align-items: start; }
.cal__status, .cal__tz { grid-column: 1 / -1; }

.cal__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__month { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; }
.cal__nav { display: flex; gap: 6px; }
.cal__navbtn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px #cfcfcc; color: var(--ink); cursor: pointer; transition: box-shadow .18s ease, opacity .18s ease; }
.cal__navbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cal__navbtn:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--ink); }
.cal__navbtn[disabled] { opacity: .35; cursor: default; }
.cal__navbtn:focus-visible, .cal__day:focus-visible, .cal__slot:focus-visible, .cal__modebtn:focus-visible, { outline: 2px solid var(--ink); outline-offset: 2px; }

.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__week span { padding: 4px 0 6px; font-size: 12px; text-align: center; color: #8a8a88; }
.cal__grid { row-gap: 4px; }

/* days are rounded squares (a 12px radius on 40px, like the buttons and options) */
.cal__day {
  justify-self: center;
  display: grid; place-items: center;
  width: 40px; height: 40px; max-width: 100%;
  margin: 0; padding: 0; border: 1.5px solid transparent; border-radius: 12px;
  background: transparent;
  font: inherit; font-size: 14px; font-weight: 500; font-variant-numeric: proportional-nums; letter-spacing: 0; text-align: center; line-height: 1; padding-top: 1px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cal__day:hover:not([disabled]):not(.is-selected) { border-color: #a9a9a7; }
.cal__day[disabled] { color: #bdbdbb; font-weight: 400; cursor: default; }
.cal__day.is-today { border: 1.5px dotted #8f8f8d; }   /* today wears a dotted outline, like the step rings */
.cal__day.is-selected { background: var(--ink); color: #fafafa; border-color: var(--ink); }

/* times */
.cal__times { min-width: 0; }
.cal__hint { margin: 0; padding-top: 52px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.cal__hint[hidden], .cal__head[hidden], .cal__slots[hidden], .cal__clock[hidden] { display: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 32px; margin-bottom: 12px; animation: panel-in .3s cubic-bezier(.2, .7, .2, 1); }
.cal__when { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; }

.cal__mode { display: flex; gap: 2px; padding: 2px; border-radius: 10px; box-shadow: inset 0 0 0 1px #cfcfcc; }
.cal__modebtn { height: 28px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-muted); cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.cal__modebtn[aria-pressed="true"] { background: var(--ink); color: #fafafa; }

.cal__slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; max-height: 336px; overflow-y: auto; padding: 2px; margin: -2px; scrollbar-width: thin; animation: panel-in .3s cubic-bezier(.2, .7, .2, 1); }
.cal__slot {
  height: 32px; margin: 0; padding: 0 4px; border: 0; border-radius: 10px; background: transparent;
  box-shadow: inset 0 0 0 1px #cfcfcc;
  font: inherit; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; color: #66665f;
  cursor: pointer; transition: box-shadow .2s ease, color .2s ease;
}
.cal__slot:hover { box-shadow: inset 0 0 0 1px #a9a9a7; }
.cal__slot.is-selected { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }

/* the sliding ruler: ticks under a fixed needle. Drag, scroll or tap; it snaps to the free times */
.cal__ruler { animation: panel-in .3s cubic-bezier(.2, .7, .2, 1); }
.cal__ruler[hidden] { display: none; }
.cal__readout { display: grid; gap: 4px; margin: 4px 0 18px; }
.cal__big { font-size: 34px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1.05; color: var(--ink); }
.cal__big.is-empty { color: #b3b3b1; }
.cal__small { font-size: 13px; color: var(--ink-muted); }

.cal__track { position: relative; height: 100px; border-radius: 12px; box-shadow: inset 0 0 0 1px #cfcfcc; overflow: hidden; }
.cal__scroll {
  height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  cursor: grab; touch-action: pan-x;
  margin: 0 10px; padding-bottom: 30px; box-sizing: border-box;
}
.cal__scroll::-webkit-scrollbar { display: none; }
.cal__scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 12px; }
.cal__scroll.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.cal__ticks { position: relative; display: flex; align-items: flex-end; width: max-content; min-width: 100%; height: 100%; padding: 0 calc(50% - 14px) 0; box-sizing: border-box; }

.cal__tick { --k: 0; --h: 18px; --grow: 26px; position: relative; flex: none; display: block; width: 28px; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; scroll-snap-align: center; cursor: pointer; font: inherit; }
.cal__tick--hour { --h: 32px; --grow: 12px; }
.cal__tick::before {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px;
  height: calc(var(--h) + var(--k) * var(--grow));                         /* grows upward under the pointer */
  background: #9d9d9b;
  background: color-mix(in srgb, var(--ink) calc(var(--k) * 100%), #9d9d9b);
}
.cal__tick.is-off { cursor: default; }
.cal__tick.is-off::before { height: 6px; background: #d4d4d2; }
.cal__tick i { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 500; white-space: nowrap; color: #8a8a88; pointer-events: none; transition: color .2s ease; }
.cal__tick.is-active i { color: var(--ink); }

/* the pointer: a small cone at the top, pointing down at the tick that rises to meet it */
.cal__needle { position: absolute; left: 50%; top: 10px; width: 14px; height: 9px; margin-left: -7px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }

.cal__parts { display: flex; gap: 6px; margin-top: 14px; }
.cal__part { flex: 1; height: 32px; margin: 0; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px #cfcfcc; font: inherit; font-size: 13px; font-weight: 500; color: #66665f; cursor: pointer; transition: box-shadow .2s ease, color .2s ease; }
.cal__part:hover:not([disabled]) { box-shadow: inset 0 0 0 1px #a9a9a7; }
.cal__part[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.cal__part[disabled] { opacity: .4; cursor: default; }

.cal__status { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.cal__status[hidden] { display: none; }
.cal__tz { margin: 16px 0 0; font-size: 13px; color: var(--ink-muted); }

/* narrower screens: the times go under the month */
@media (max-width: 800px) {
  .cal { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .cal__hint { padding-top: 0; }
  .cal__slots { max-height: none; }
}
@media (max-width: 400px) { .cal__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .cal__head, .cal__slots, .cal__ruler { animation: none; } .cal__day, .cal__slot, .cal__navbtn, .cal__modebtn, .cal__tick::before, .cal__part { transition: none; } }

/* ----- After booking: the five step rings fly in from the left and land as one black tile with a check. Then a dark card with the time ----- */
.panel--done { animation: none; }
.book__main:has(.panel--done:not([hidden])) { padding-top: clamp(32px, 9vh, 88px); }
.book__main:has(.panel--done:not([hidden])) .book__note { display: none; }

.mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 0 28px; border-radius: 20px; background: var(--ink); opacity: 0; transform: scale(.6); }
.mark svg { width: 36px; height: 36px; fill: none; stroke: #fafafa; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; }
.is-landed .mark { opacity: 1; transform: none; transition: opacity .25s ease, transform .55s cubic-bezier(.2, 1.3, .35, 1); }
.is-landed .mark svg { animation: mark-draw .45s cubic-bezier(.4, 0, .2, 1) .22s both; }
@keyframes mark-draw { from { stroke-dashoffset: 100; opacity: 0; } 8% { opacity: 1; } }

.done__rise { opacity: 0; }
.is-landed .done__rise { animation: done-rise .65s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.3s + var(--d, 0s)); }
@keyframes done-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.done__head { margin-bottom: 28px; }

/* the time, in the same dark card as the call-to-action on the home page, with the hero's plus pattern very faint behind it */
.done__card {
  position: relative; overflow: hidden;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 14px; background: var(--btn-dark); color: #fafafa;
}
.done__card::before {
  content: ""; position: absolute; inset: 0 0 0 52%; pointer-events: none; opacity: .09;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%);
  mask-image: linear-gradient(90deg, transparent, #000 75%);   /* the pluses fade in from the right, like the hero's */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 9.5v9M9.5 14h9' stroke='white' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") right top / 28px 28px;
}
.done__card p { position: relative; margin: 0; }
.done__zone { position: absolute; top: clamp(24px, 4vw, 36px); right: clamp(24px, 4vw, 36px); padding: 4px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font-size: 12px; font-weight: 500; letter-spacing: .01em; color: #bdbdbb; }
.done__time { font-size: clamp(48px, 8vw, 68px); font-weight: 500; line-height: 1; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.done__day { margin-top: 14px !important; font-size: 16px; line-height: 1.4; color: #bdbdbb; }
.done__meta { margin: 20px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.done__meta:empty { display: none; }
.done__foot { margin-top: 28px; }

/* the rings that fly (booking.js copies each step ring from the left and moves the copy to the tile) */
.fly { position: fixed; z-index: 20; margin: 0; pointer-events: none; will-change: transform, opacity; }
.fly .ring { width: 100%; height: 100%; }
.is-booked .rail { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mark { opacity: 1; transform: none; transition: none; }
  .mark svg { animation: none !important; }
  .done__rise { opacity: 1; animation: none !important; }
}

@media (max-width: 1000px) { .is-booked .rail { display: none; } }   /* the rings row on phones: gone once they have flown, so no empty gap is left */
