/* ===========================================================================
   horotron.therapy — booking.html
   Extends styles.css. Same palette, same radius system (surfaces 6px,
   buttons 999px), same two typefaces. Nothing new is introduced here except
   the wizard itself: rail, service cards, calendar, slots, form, confirmation.
   =========================================================================== */

.bk {
  padding-top: calc(76px + clamp(52px, 8vh, 92px));
  padding-bottom: clamp(72px, 10vh, 128px);
  min-height: 100svh;
  /* the same held-breath gradient the reserved block uses on the landing page,
     so the booking page reads as the same room rather than a separate site */
  background: linear-gradient(to bottom, var(--ink), var(--forest-d) 52%, var(--ink));
}

.bk__title {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(36px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.bk__lede {
  margin-top: clamp(14px, 2vh, 22px);
  max-width: 48ch;
  color: var(--bone-dim);
  font-size: clamp(15px, 1.1vw, 17px);
}

/* --- step rail ------------------------------------------------------------ */

.rail {
  margin-top: clamp(40px, 6vh, 74px);
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  scroll-margin-top: 96px;
}

.rail__step {
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bone-fade);
  opacity: 0.55;
  transition: color 0.5s var(--ease), opacity 0.5s var(--ease);
}
.rail__step.is-active { color: var(--bone); opacity: 1; }
.rail__step.is-done   { color: var(--gold); opacity: 1; cursor: pointer; }

.rail__line { height: 1px; background: var(--hair); }

/* --- wizard shell --------------------------------------------------------- */

/* --- wizard + contents rail ----------------------------------------------
   The rail belongs to step 1 only — steps 2 and 3 have no list to navigate —
   so the grid drops back to a single column once step 1 is behind you, and
   the rail goes with it. */

.bk__grid {
  margin-top: clamp(38px, 5.5vh, 66px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.bk__grid:has(.panel[data-panel="1"].is-active) {
  grid-template-columns: clamp(178px, 17vw, 240px) minmax(0, 1fr);
}

.bk__toc { display: none; }
.bk__grid:has(.panel[data-panel="1"].is-active) .bk__toc { display: block; }

.panel { display: none; }
.panel.is-active { display: block; }

.back { margin-bottom: clamp(24px, 3.5vh, 38px); gap: 10px; }

/* running summary of what is chosen so far */
.recap {
  max-width: 660px;
  margin-bottom: clamp(26px, 4vh, 40px);
  padding: 16px 22px;
  border: 1px solid var(--hair);
  border-left: 1px solid var(--gold-soft);
  border-radius: 6px;
  background: rgba(13, 42, 30, 0.28);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--bone-dim);
}
.recap:empty { display: none; }
.recap b { font-weight: 500; color: var(--bone); }

/* --- step 1: search + service cards --------------------------------------- */

.find {
  position: relative;
  max-width: 420px;
}
.find__i {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--bone-fade);
  pointer-events: none;
}
.find input {
  width: 100%;
  font: inherit;
  color: var(--bone);
  background: rgba(13, 42, 30, 0.24);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 13px 20px 13px 48px;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
  -webkit-appearance: none;
          appearance: none;
}
.find input::placeholder { color: var(--bone-fade); }
.find input:focus { outline: none; border-color: var(--gold-soft); background: rgba(13, 42, 30, 0.4); }
.find input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.4; }

.hint {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--bone-fade);
}

.cards {
  margin-top: clamp(26px, 4vh, 38px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  min-height: 152px;
  padding: 24px 26px 22px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: linear-gradient(168deg, rgba(13, 42, 30, 0.36), rgba(6, 8, 7, 0.24));
  transition: border-color 0.45s var(--ease), transform 0.5s var(--ease),
              background-color 0.45s var(--ease), box-shadow 0.5s var(--ease);
}
/* same sheen as the landing tiles, so a card in the wizard behaves like a card
   on the landing page and the two pages read as one build */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(112deg, transparent 36%, rgba(237, 234, 225, 0.055) 50%, transparent 64%);
  transform: translateX(-125%);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(237, 234, 225, 0.2);
  box-shadow: 0 18px 40px rgba(6, 8, 7, 0.45);
}
.card:hover::before { transform: translateX(125%); transition: transform 1.05s var(--ease-soft); }
.card:active { transform: translateY(0) scale(0.994); transition-duration: 0.12s; }

.card.is-on {
  border-color: var(--gold-soft);
  background: linear-gradient(168deg, rgba(22, 65, 46, 0.55), rgba(13, 42, 30, 0.32));
}

/* name, then the undertitle and the length on one dotted rule, then the price:
   the same three lines a window on services.html opens with, minus the photo
   and the description */
.card__n {
  padding-right: 34px;             /* clears the tick in the corner */
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.22;
  letter-spacing: -0.026em;
  color: var(--bone);
}

.card__row {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 6px;
  border-bottom: 1px dotted rgba(237, 234, 225, 0.13);
}
.card__d {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--bone-dim);
}
.card__t {
  flex: none;
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--bone-fade);
  font-variant-numeric: tabular-nums;
  transition: color 0.45s var(--ease);
}
.card.is-on .card__t { color: var(--gold); }

.card__p {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(16px, 1.3vw, 19px);
  letter-spacing: -0.02em;
  color: var(--bone);
}

/* the tick is the only selected-state colour move; everything else is weight */
.card__x {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              transform 0.4s var(--ease);
}
.card__x i { opacity: 0; transition: opacity 0.3s var(--ease); }
.card.is-on .card__x { background: var(--gold); border-color: var(--gold); }
.card.is-on .card__x i { opacity: 1; }

.cards__empty {
  margin-top: 28px;
  color: var(--bone-fade);
  font-size: 0.92rem;
}

.bk__go, .form__go { margin-top: clamp(30px, 4.5vh, 48px); gap: 12px; }
.bk__go[disabled], .form__go[disabled] {
  background: transparent;
  color: var(--bone-fade);
  border: 1px solid var(--hair);
  pointer-events: none;
}

/* --- step 2: calendar + slots --------------------------------------------- */

.when {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(24px, 3.4vw, 52px);
  align-items: start;
}

.cal {
  max-width: 460px;   /* past this the day cells turn into empty slabs */
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: rgba(13, 42, 30, 0.22);
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(16px, 2vh, 24px);
}
.cal__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: -0.01em;
}
.cal__nav {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--bone-dim);
  font-size: 17px;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease),
              transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.cal__nav:hover { color: var(--gold); border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(6, 8, 7, 0.45); }
.cal__nav:active { transform: scale(0.92); transition-duration: 0.12s; }
.cal__nav[disabled] { opacity: 0.25; pointer-events: none; }

.cal__viewport { overflow: hidden; }

.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

.cal__wd {
  padding: 4px 0 10px;
  text-align: center;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-fade);
}

.cal__day {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  color: var(--bone-dim);
  border: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.cal__day:hover:not(.is-off):not(.is-on) { border-color: var(--gold-soft); color: var(--bone); }
.cal__day.is-off { color: var(--bone-fade); opacity: 0.3; pointer-events: none; }
.cal__day--pad { visibility: hidden; pointer-events: none; }
.cal__day.is-on { background: var(--bone); color: var(--ink); font-weight: 500; }

.slots__k {
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bone-fade);
  margin-bottom: clamp(16px, 2vh, 22px);
}

.slots__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.slots__grid:empty { display: none; }

.slot {
  position: relative;
  padding: 13px 6px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--hair);
  border-radius: 999px;
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
  transition: border-color 0.45s var(--ease), color 0.45s var(--ease),
              background-color 0.45s var(--ease), transform 0.45s var(--ease);
}
/* gold wipes in from the left rather than fading: 30 pills fading at once is
   noise, one wiping under the cursor is a response */
.slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(185, 149, 85, 0.16), rgba(185, 149, 85, 0.05));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.slot:hover { border-color: var(--gold-soft); color: var(--bone); transform: translateY(-2px); }
.slot:hover::before { transform: scaleX(1); }
.slot:active { transform: scale(0.96); transition-duration: 0.12s; }
.slot.is-on { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.slot.is-on::before { opacity: 0; }   /* the gold wipe would sit on top of the bone fill */

.slots__note { font-size: 0.9rem; color: var(--bone-fade); }

/* --- step 3: form --------------------------------------------------------- */

.form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 28px);
}

.field { display: flex; flex-direction: column; gap: 10px; }

.field label {
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bone-fade);
}
.field__opt { letter-spacing: 0.1em; opacity: 0.7; }

.field input,
.field textarea {
  font: inherit;
  color: var(--bone);
  background: rgba(13, 42, 30, 0.24);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 14px 18px;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-soft);
  background: rgba(13, 42, 30, 0.4);
}
.field textarea { min-height: 124px; resize: vertical; }

/* per-field confirmation line, revealed by GSAP */
.field__ok {
  display: none;
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--gold);
}

.form__fine {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--bone-fade);
  max-width: 56ch;
}

/* --- consent -------------------------------------------------------------
   The one box that has to be ticked knowingly: health notes are a special
   category of personal data, so the checkbox is native, never pre-ticked and
   never styled into something that reads as decoration. */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: clamp(22px, 3vh, 30px);
  max-width: 56ch;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--bone-dim);
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--gold);
  cursor: pointer;
}

.consent a {
  color: var(--bone);
  border-bottom: 1px solid var(--gold-soft);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.consent a:hover { color: var(--gold); border-color: var(--gold); }

/* --- confirmation --------------------------------------------------------- */

.done {
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(36px, 8vh, 96px) 0;
  text-align: center;
}

.done__mark {
  width: 58px;
  height: 58px;
  margin: 0 auto clamp(26px, 3.6vh, 38px);
  color: var(--gold);
  overflow: visible;   /* the halo ring scales past the 64-unit box */
}

/* Three tiers, each smaller and quieter than the one above it. The whole
   message used to be one block of display type at headline size: with a long
   name or two services picked it broke into six ragged lines. Only the thank-you
   is display now; the details are body copy, which is the narrower face and
   takes a long service name without falling apart. */

.done__lead {
  max-width: 24ch;
  margin-inline: auto;
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(18px, 1.9vw, 25px);
  line-height: 1.34;
  letter-spacing: -0.028em;
  color: var(--bone);
  text-wrap: balance;
  /* a visitor can type anything into the name field, including one long
     unbroken string — it wraps rather than pushing the layout out */
  overflow-wrap: anywhere;
}

/* the site's hairline motif, at reading scale */
.done__rule {
  display: block;
  width: 44px;
  height: 1px;
  margin: clamp(20px, 2.8vh, 28px) auto;
  background: var(--gold-soft);
}

.done__when {
  max-width: 52ch;
  margin-inline: auto;
  font-size: clamp(14px, 1.05vw, 15.5px);
  line-height: 1.75;
  color: var(--bone-fade);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.done__when b { font-weight: 500; color: var(--bone-dim); }

.done__note {
  max-width: 46ch;
  margin: clamp(14px, 2vh, 20px) auto 0;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--bone-fade);
  opacity: 0.72;
  text-wrap: pretty;
}

.done__home { display: inline-block; margin-top: clamp(34px, 5vh, 54px); }

/* reviews.html keeps the older confirmation shape — a slip to copy and two
   actions — because a review really does have to be sent by hand. The booking
   confirmation above does not: that request is already recorded. */
.done__sum {
  margin-top: clamp(24px, 3.4vh, 34px);
  padding: 22px 26px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: rgba(13, 42, 30, 0.28);
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--bone-dim);
  white-space: pre-line;
}

.done__sub {
  margin-top: clamp(16px, 2.4vh, 22px);
  font-size: 0.92rem;
  color: var(--bone-fade);
}

.done__acts {
  margin-top: clamp(28px, 4vh, 40px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.done__acts .btn { gap: 10px; }
.done__acts + .done__home { margin-top: clamp(28px, 4vh, 38px); }

/* --- responsive ----------------------------------------------------------- */

/* Narrow enough that the rail cannot stand beside the list, and unlike
   services.html this page already has a search field doing the same job — 26
   chips stacked above it would push the field itself off a phone screen. So
   the rail is dropped here rather than flattened. */
@media (max-width: 1080px) {
  .bk__grid:has(.panel[data-panel="1"].is-active) {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
  }
  .bk__grid:has(.panel[data-panel="1"].is-active) .bk__toc { display: none; }
}

@media (max-width: 940px) {
  .when { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .bk { padding-top: calc(66px + clamp(44px, 7vh, 72px)); }

  /* the rail turns into three stacked marks: the hairlines carry no meaning
     once they are 12px long, so they are dropped instead of shrunk */
  .rail { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 10px; }
  .rail__line { display: none; }
  .rail__step { font-size: 0.66rem; letter-spacing: 0.14em; }

  /* 30 services in one column is a long scroll, so the cards tighten up */
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card { min-height: 0; padding: 18px 20px 16px; gap: 8px; }
  .card__p { padding-top: 8px; }
  .card__x { top: 18px; right: 18px; }

  .bk__go, .form__go { width: 100%; }
}

@media (max-width: 520px) {
  .slots__grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .done__msg { max-width: 18ch; }
  .done__acts .btn { width: 100%; }
}
