/* Booking pages (https://limelighthouse.com/book/...), rendered by the app inside the site's own shell
   (.app/book.html from .src/build.py) on top of site.css: same tokens, type and buttons. Hand-written,
   like site.css. Behaviour in book.js. */

.bk-hero { position: relative; padding: calc(var(--header-h) + clamp(40px, 6vw, 96px)) 0 clamp(32px, 4vw, 56px); isolation: isolate; overflow: hidden; }
.bk-hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -30%; width: min(1100px, 140vw); aspect-ratio: 1.6;
  transform: translateX(-60%);
  background: radial-gradient(closest-side, rgba(228, 194, 122, 0.13), rgba(228, 194, 122, 0.04) 55%, transparent 75%);
  pointer-events: none;
}
.bk-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); max-width: 13em; }
.bk-hero .lede { margin-top: clamp(20px, 2.6vw, 32px); }
.bk-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 26px; font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivory); }
.bk-facts li { display: inline-flex; align-items: center; gap: 14px; }
.bk-facts li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); }
.bk-when { color: var(--brass-hi); font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; }

.bk-section { padding: 0 0 var(--section); }
.bk-app, .bk-type {
  border: 1px solid rgba(228, 194, 122, 0.35);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
}
.bk-app { padding: clamp(20px, 3.5vw, 48px); }
.bk-noscript { margin: 0; color: var(--ivory); }
.bk-step { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 18px; }

/* time zone */
.bk-tz { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 18px; margin-bottom: clamp(18px, 2.4vw, 28px); border-bottom: 1px solid var(--line); }
.bk-tz label { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }
.bk-tz select {
  font: 400 0.95rem/1.4 var(--sans); color: var(--ivory); background: transparent; border: 0;
  border-bottom: 1px solid var(--line-strong); padding: 6px 26px 6px 0; border-radius: 0; max-width: 100%;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
  background-position: calc(100% - 9px) 52%, calc(100% - 4px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.bk-tz select:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }
.bk-tz option { background: var(--ink-2); color: var(--ivory); }

/* calendar and times */
.bk-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.bk-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bk-month h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.bk-nav {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ivory); cursor: pointer; transition: border-color 0.3s var(--ease), color 0.3s;
}
.bk-nav span { width: 8px; height: 8px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateX(2px) rotate(45deg); }
.bk-next span { transform: translateX(-2px) rotate(-135deg); }
.bk-nav:hover:not(:disabled) { border-color: var(--brass); color: var(--brass-hi); }
.bk-nav:disabled { opacity: 0.3; cursor: default; }

.bk-days { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bk-days th { padding: 0 0 10px; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); text-align: center; }
.bk-days td { padding: 3px; text-align: center; }
.bk-day {
  width: 100%; aspect-ratio: 1; max-height: 64px; display: grid; place-items: center; position: relative;
  font: 400 1rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--mute); background: transparent;
  border: 1px solid transparent; padding: 0;
}
.bk-day.is-open { color: var(--ivory); border-color: var(--line); cursor: pointer; transition: border-color 0.3s var(--ease), background 0.3s; }
.bk-day.is-open::after { content: ""; position: absolute; bottom: 18%; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brass); }
.bk-day.is-open:hover { border-color: var(--brass); }
.bk-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.bk-day[aria-pressed="true"] { background: var(--brass); color: var(--ink); border-color: var(--brass); font-weight: 500; }
.bk-day[aria-pressed="true"]::after { background: var(--ink); }
.bk-day:disabled { cursor: default; opacity: 0.45; }

.bk-times h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-bottom: 6px; }
.bk-times > .muted { margin: 0 0 16px; }
.bk-slots { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.bk-slot {
  width: 100%; padding: 13px 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory);
  font: 400 0.98rem/1.2 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s, background 0.3s;
}
.bk-slot:hover { border-color: var(--brass); color: var(--brass-hi); }
.bk-slot[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: var(--ink); font-weight: 500; }
.bk-confirm { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 14px; justify-items: start; }
.bk-confirm p { margin: 0; color: var(--ivory); }

/* details form (dark version of the Contact form) */
.bk-form { display: grid; gap: 18px; max-width: 640px; }
.bk-form[hidden], .bk-done[hidden], .bk-pick[hidden], .bk-cancel[hidden] { display: none; }
.bk-chosen { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; color: var(--brass-hi); }
.bk-form label, .bk-cancel label { display: grid; gap: 6px; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.bk-form input, .bk-form textarea, .bk-cancel textarea {
  font: 400 1rem/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ivory); background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong); padding: 8px 0; border-radius: 0; resize: vertical;
}
.bk-form input:focus, .bk-form textarea:focus, .bk-cancel textarea:focus { outline: 0; border-bottom-color: var(--brass); box-shadow: 0 1px 0 var(--brass); }
.bk-form .optional, .bk-cancel .optional { letter-spacing: 0.04em; text-transform: none; font-weight: 400; }
.bk-form [aria-invalid="true"] { border-bottom-color: var(--proof); }
.bk-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 6px; }
.bk-form .btn[disabled], .bk-cancel .btn[disabled], .bk-confirm .btn[disabled] { opacity: 0.6; cursor: progress; }
.bk-back {
  background: none; border: 0; padding: 0 0 4px; color: var(--ivory); cursor: pointer;
  font: 500 0.74rem/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid var(--line-strong);
}
.bk-back:hover { border-bottom-color: var(--brass); color: var(--brass-hi); }
.bk-app .form-status, .bk-cancel .form-status { color: var(--mute); }
.bk-app .form-status.is-error, .bk-cancel .form-status.is-error { color: var(--proof); }

/* done */
.bk-done { max-width: 720px; }
.bk-done h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 18px; }
.bk-done-when { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; color: var(--brass-hi); margin-bottom: 14px; }
.bk-done:focus { outline: none; }

/* meeting type list */
.bk-types { list-style: none; display: grid; gap: 14px; }
.bk-type { display: grid; gap: 6px; padding: clamp(22px, 3vw, 36px); position: relative; transition: border-color 0.3s var(--ease); }
.bk-type:hover, .bk-type:focus-visible { border-color: var(--brass); }
.bk-type-title { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.3rem); color: var(--ivory); line-height: 1.1; }
.bk-type-desc { color: var(--ivory-2); max-width: 40em; }
.bk-type .arrow { position: absolute; right: clamp(22px, 3vw, 36px); top: 50%; width: 22px; height: 1px; background: var(--brass); }
.bk-type .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--brass); border-right: 1px solid var(--brass); transform: rotate(45deg); }

/* manage */
.bk-manage { margin-top: 30px; display: grid; gap: 22px; }
.bk-manage-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.bk-cancel { display: grid; gap: 16px; max-width: 560px; }

@media (max-width: 880px) {
  .bk-grid { grid-template-columns: 1fr; }
  .bk-slots { max-height: none; }
}
@media (max-width: 480px) {
  .bk-app { padding: 18px 14px; border-left: 0; border-right: 0; }
  .bk-section .wrap { padding: 0; }
  .bk-tz, .bk-cal, .bk-times, .bk-form, .bk-done { padding-left: 4px; padding-right: 4px; }
  .bk-days td { padding: 2px; }
  .bk-day { font-size: 0.95rem; }
  .bk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .bk-slot { padding: 12px 4px; font-size: 0.92rem; }
  .bk-facts { font-size: 0.72rem; gap: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-day, .bk-slot, .bk-nav, .bk-type { transition: none; }
}
