/* =========================================================
   book.css — booking page only (book.php)
   Loads after base.css. Nav, grain, shell, font-face all come
   from base.css; this file styles the booking flow exclusively.
   ========================================================= */

.book {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
  padding-bottom: 80px;
}

/* oversized L-symbol bleeding off the right — identical treatment to 404.css */
.page-emblem {
  position: absolute;
  top: 50%;
  right: -28vh;
  transform: translateY(-50%);
  height: 80vh;
  width: auto;
  max-width: none;
  opacity: 0.08;
  filter: invert(1);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.book-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 55%;
}

/* ---------- step indicator (section-label style, dimmed) ---------- */
.book-step {
  font-size: 1.2vh;
  letter-spacing: 0.1em;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.5;
  margin-bottom: 20px;
}

/* ---------- stages ---------- */
.book-stage {
  display: none;
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: auto; /* reset fieldset intrinsic min-width */
  opacity: 1;
  transform: translateY(0);
}
.book-stage.is-active { display: block; }

/* sequenced fade-and-slide between panels (driven by js/book.js). Gated on
   no-preference so reduced-motion users get an instant swap. Applies to both
   the stage fieldsets and the #book-verify interstitial. */
@media (prefers-reduced-motion: no-preference) {
  .book-stage,
  .book-verify {
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .book-stage.is-entering,
  .book-verify.is-entering {
    opacity: 0;
    transform: translateY(14px);
  }
  .book-stage.is-leaving,
  .book-verify.is-leaving {
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
}

.book-stage-title {
  font-size: 4vh;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 36px;
}

.book-fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* question prompt above a textarea / select / option group */
.book-q {
  display: block;
  font-size: 1.6vh;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 12px;
}

/* ---------- text inputs / textareas / selects — underline only ---------- */
.book-form input,
.book-form textarea,
.book-form select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-text);
  padding: 12px 0;
  font-size: 1.8vh;
  font-weight: 400;
  resize: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.book-form input:focus,
.book-form textarea:focus,
.book-form select:focus {
  border-bottom-color: var(--color-text);
}

.book-form select {
  padding-right: 24px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23FCF7F1' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.book-form select option {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ---------- selectable option groups (budget, prior experience) ---------- */
.book-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.book-option {
  background: transparent;
  border: 1px solid var(--color-rule);
  color: var(--color-text);
  font-size: 1.5vh;
  font-weight: 400;
  padding: 12px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.book-option:hover {
  border-color: rgba(252, 247, 241, 0.4);
}
.book-option.is-selected {
  border-color: var(--color-text);
  background: rgba(252, 247, 241, 0.06);
}

/* ---------- turnstile interstitial ---------- */
.book-verify {
  opacity: 1;
  transform: translateY(0);
}
.book-verify[hidden] { display: none; }
/* reserve the widget's footprint so the box isn't blank while it loads */
#book-turnstile { min-height: 70px; }
.book-verify-note {
  font-size: 1.6vh;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.6;
  margin-bottom: 28px;
}

/* ---------- inline error ---------- */
.book-error {
  font-size: 1.5vh;
  color: var(--color-text);
  min-height: 1em;
  margin-top: 18px;
}

/* ---------- back / next ---------- */
.book-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
}
.book-back {
  background: transparent;
  border: 0;
  color: var(--color-text);
  font-size: 1.5vh;
  font-weight: 400;
  opacity: 0.6;
  padding: 14px 0;
  transition: opacity 0.2s ease;
}
.book-back:hover { opacity: 1; }
.book-back[hidden] { display: none; }

.book-next {
  margin-left: auto;
  background: var(--color-accent);
  color: var(--color-bg);
  border: 0;
  font-size: 1.5vh;
  font-weight: 500;
  padding: 16px 40px;
  transition: filter 0.2s ease;
}
.book-next:hover { filter: brightness(1.12); }
.book-next:disabled { opacity: 0.6; cursor: default; }

/* ---------- cal.com embed ---------- */
.book-cal {
  width: 100%;
  min-height: 600px;
}
.book-cal[hidden] { display: none; }

/* ---------- custom confirmation ---------- */
.book-confirm[hidden] { display: none; }
.book-confirm-title {
  font-size: 8vh;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-text);
  margin-bottom: 22px;
}
.book-confirm-sub {
  font-size: 2vh;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.7;
  margin-bottom: 34px;
}
.book-confirm-cta {
  display: inline-block;
  font-size: 1.5vh;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
}
.book-confirm-cta::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background-color: var(--color-accent);
  transition: width 0.25s ease;
}
.book-confirm-cta:hover::after { width: 100%; }

/* =========================================================
   mobile — vw sizing, no vh (page itself may keep 100vh)
   ========================================================= */
@media (max-width: 767px) {
  .book { padding-top: 56px; padding-bottom: 60px; }

  .book-step { font-size: 2.8vw; margin-bottom: 5vw; }
  .book-stage-title { font-size: 8vw; margin-bottom: 7vw; }
  .book-fields { gap: 6vw; }
  .book-q { font-size: 3.8vw; margin-bottom: 3vw; }

  .book-form input,
  .book-form textarea,
  .book-form select { font-size: 4.2vw; }

  .book-option { font-size: 3.6vw; padding: 12px 14px; }
  .book-verify-note { font-size: 3.8vw; margin-bottom: 6vw; }
  .book-error { font-size: 3.6vw; margin-top: 4vw; }

  .book-nav { margin-top: 9vw; }
  .book-back { font-size: 3.8vw; min-height: 48px; }
  .book-next { font-size: 3.8vw; padding: 14px 28px; min-height: 48px; }

  .book-confirm-title { font-size: 13vw; }
  .book-confirm-sub { font-size: 4.4vw; }
  .book-confirm-cta { font-size: 3.8vw; }

  .book-content { max-width: none; }
  .page-emblem { display: none; }
}
