/* =========================================================
   Book a Visit page (page-templates/book.php)
   1. Hero: "Come in. Breathe." (full photo, the three steps to a first visit)
   2. Booking form: one question at a time, sent as a WhatsApp message
   3. Visit us: a postcard per branch
   ========================================================= */

.bk { background: var(--cream); }

/* =========================================================
   1. HERO
   ========================================================= */
.bk-hero em { font-style: italic; }
.bk-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 40px) var(--gutter) clamp(28px, 5vh, 48px); color: var(--cream); background: var(--ink);
}
.bk-hero__bg { position: absolute; inset: 0; z-index: -1; margin: 0; }
.bk-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.bk-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 11, 7, .88) 0%, rgba(14, 11, 7, .6) 45%, rgba(14, 11, 7, .15) 80%), linear-gradient(0deg, rgba(14, 11, 7, .85) 0%, rgba(14, 11, 7, 0) 45%); }
.bk-hero__inner { width: 100%; max-width: 1360px; margin-inline: auto; }
.bk-hero .eyebrow { width: fit-content; color: var(--gold-l); } /* box hugs the words, so it never reaches the bright side of the photo */
.bk-hero__title { margin: 18px 0 24px; font-size: clamp(76px, 11vw, 184px); line-height: .84; }
.bk-hero__title em { color: var(--gold-l); }
.bk-hero__lead { max-width: 34ch; margin-bottom: 32px; font-size: clamp(19px, 1.5vw, 22px); line-height: 1.45; color: var(--text-dark-2); }
.bk-hero__actions { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.bk-hero__steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(48px, 9vh, 96px) 0 0; padding: 0;
  border-radius: 22px; background: rgba(20, 16, 11, .62); box-shadow: inset 0 0 0 1px rgba(250, 244, 232, .18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bk-hero__steps li { display: flex; gap: 18px; padding: 24px clamp(20px, 2.4vw, 34px); }
.bk-hero__steps li + li { border-left: 1px solid var(--line-dark); }
.bk-hero__n { font-family: var(--serif); font-style: italic; font-weight: var(--fw-display); font-size: 34px; line-height: 1; color: var(--gold-l); }
.bk-hero__steps h2 { margin-bottom: 4px; font-size: 24px; font-weight: var(--fw-display); line-height: 1.1; }
.bk-hero__steps p { font-size: 14px; color: var(--text-dark-2); }

@media (max-width: 899px) {
  /* the copy spans the full width on phones, so the shade is even rather than a fade from the left */
  .bk-hero__bg::after { background: linear-gradient(0deg, rgba(14, 11, 7, .92) 0%, rgba(14, 11, 7, .76) 55%, rgba(14, 11, 7, .72) 100%); }
  .bk-hero__title { font-size: clamp(72px, 22vw, 110px); }
  .bk-hero__steps { grid-template-columns: minmax(0, 1fr); }
  .bk-hero__steps li + li { border-left: 0; border-top: 1px solid var(--line-dark); }
  .bk-hero__steps li { padding: 18px 20px; }
}

/* =========================================================
   2. BOOKING FORM (template-parts/book/form.php, builder in js/book.js)
   ========================================================= */
.bk-form em { font-style: italic; }
[data-booking] input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* the option radios stay in the tab order but out of sight; the card shows the state */
.bk-step__opts input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.bk-form { padding: var(--space-6) var(--gutter); background: var(--cream); scroll-margin-top: var(--header-h); }
.bk-form__inner { max-width: 1240px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.bk-form__title { margin: 14px 0 20px; font-size: clamp(48px, 5.4vw, 88px); line-height: .95; }
.bk-form__title em { color: var(--gold-d); }
.bk-form__lead { max-width: 40ch; margin-bottom: 26px; font-size: var(--fs-lead); }
.bk-form__note { display: flex; align-items: baseline; gap: 12px; max-width: 40ch; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.bk-form__note strong { font-family: var(--serif); font-weight: 700; font-size: 34px; color: var(--ink); }
.bk-form__card {
  display: flex; flex-direction: column; gap: 30px; min-height: 560px; padding: clamp(26px, 3.4vw, 46px); /* gap skips hidden steps; without JavaScript every step shows, stacked */
  border-radius: 32px; background: var(--ink); color: var(--cream); box-shadow: 0 60px 100px -50px rgba(20, 16, 11, .7);
}
.bk-form__top { display: flex; align-items: center; gap: 18px; }
.bk-form__count { flex: none; font-size: 12px; font-weight: var(--fw-label); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-l); }
.bk-form__bar { flex: 1; height: 3px; border-radius: 3px; background: var(--line-dark); overflow: hidden; }
.bk-form__bar i { display: block; height: 100%; width: 20%; background: var(--gold-grad); transition: width .6s var(--ease); }
.bk-step { display: flex; flex-direction: column; gap: 14px; }
.bk-step__q { float: left; width: 100%; margin-bottom: 10px; font-family: var(--serif); font-weight: var(--fw-display); font-size: clamp(32px, 3vw, 46px); line-height: 1.05; outline: none; }
.bk-step__q + * { clear: both; }
.bk-step__opts { display: grid; gap: 10px; }
.bk-step__opts--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-step__opts--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-step__opts label { position: relative; cursor: pointer; }
.bk-step__opts span {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 20px; border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line-dark-2); transition: background-color var(--dur-1), color var(--dur-1), box-shadow var(--dur-1);
}
.bk-step__opts strong { font-weight: var(--fw-label); }
.bk-step__opts small { font-size: 13px; color: var(--text-dark-3); }
.bk-step__opts label:hover span { box-shadow: inset 0 0 0 1px var(--gold-l); }
.bk-step__opts input:checked + span { background: var(--gold-grad); color: var(--ink); box-shadow: none; }
.bk-step__opts input:checked + span small { color: var(--ink); }
.bk-step__opts input:focus-visible + span { outline: 2px solid var(--gold-l); outline-offset: 3px; }
.bk-step__field { display: flex; flex-direction: column; gap: 8px; }
.bk-step__field span { font-size: 11px; font-weight: var(--fw-label); letter-spacing: .2em; text-transform: uppercase; color: var(--text-dark-3); }
.bk-step__field input { min-height: 54px; padding: 10px 16px; border: 1px solid var(--line-dark-2); border-radius: 14px; background: rgba(250, 244, 232, .05); color-scheme: dark; }
.bk-step__sum { margin: 0 0 8px; }
.bk-step__sum div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
.bk-step__sum dt { font-size: 12px; font-weight: var(--fw-label); letter-spacing: .16em; text-transform: uppercase; color: var(--text-dark-3); }
.bk-step__sum dd { margin: 0; font-family: var(--serif); font-weight: var(--fw-display); font-size: 22px; line-height: 1.15; text-align: right; }
.bk-form__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; }
.bk-form__nav .pill { margin-left: auto; }
.bk-form__back { font-size: var(--fs-eyebrow); font-weight: var(--fw-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--gold-l); padding: 10px 0; }

@media (max-width: 899px) {
  .bk-form__inner { grid-template-columns: minmax(0, 1fr); }
  .bk-form__card { min-height: 0; border-radius: 26px; }
  .bk-step__opts--list { grid-template-columns: minmax(0, 1fr); }
  .bk-step__opts--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bk-step__opts--row span { padding: 14px 10px; text-align: center; }
}

/* A branch's Book here, Directions and Call (template-parts/book/branch-actions.php); links take the text colour around them */
.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }

/* =========================================================
   3. VISIT US (template-parts/book/visit.php): a postcard per branch
   ========================================================= */
.bk-visit em { font-style: italic; }
.bk-visit { overflow-x: clip;  /* postcards start tilted further; never widen the page */
  padding: var(--space-6) var(--gutter); background: var(--cream); scroll-margin-top: var(--header-h); }
.bk-visit__head { max-width: 1240px; margin: 0 auto clamp(40px, 6vh, 64px); }
.bk-visit__title { margin-top: 14px; }
.bk-visit__title em { color: var(--gold-d); }
.bk-visit__cards { max-width: 1240px; margin-inline: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 60px); }
.bk-postcard {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); min-height: 380px;
  border-radius: 6px; background: var(--paper); box-shadow: 0 0 0 1px rgba(20, 16, 11, .08), 0 50px 80px -40px rgba(20, 16, 11, .55);
  transform: rotate(-1.6deg);
}
.bk-postcard:nth-child(2) { transform: rotate(1.4deg); margin-top: 40px; }
.bk-postcard__photo { margin: 12px 0 12px 12px; overflow: hidden; border-radius: 3px; }
.bk-postcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.bk-postcard__back { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 26px clamp(20px, 2.4vw, 32px) 24px; }
.bk-postcard__marks { display: flex; align-items: flex-start; justify-content: flex-end; width: 100%; margin-bottom: 10px; }
.bk-postcard__postmark { width: 84px; margin-right: 8px; margin-top: 4px; fill: none; stroke: #6B4403; stroke-width: 1.2; opacity: .85; rotate: -14deg; position: relative; z-index: 1; }
.bk-postcard__postmark text { fill: #6B4403; stroke: none; font-family: var(--sans); font-size: 8.4px; font-weight: 600; letter-spacing: .14em; }
.bk-postcard__postmark .bk-postcard__pm-mid { font-family: var(--serif); font-size: 13px; letter-spacing: .2em; }
.bk-postcard__stamp {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 10px 8px; background: var(--sand);
  outline: 3px dotted var(--paper); outline-offset: -2px; box-shadow: 0 0 0 1px rgba(140, 90, 5, .5);
}
.bk-postcard__stamp span { font-size: 9px; font-weight: var(--fw-label); letter-spacing: .18em; text-transform: uppercase; color: #4A4034; }
.bk-postcard__name { font-size: clamp(44px, 4vw, 64px); line-height: 1; }
.bk-postcard__lines { width: 100%; margin: 10px 0 22px; display: flex; flex-direction: column; }
.bk-postcard__lines span { padding: 6px 0 4px; border-bottom: 1px dotted rgba(140, 90, 5, .6); font-family: var(--serif); font-style: italic; font-weight: var(--fw-quote); font-size: 21px; line-height: 1.2; }
.bk-postcard .bk-actions { margin-top: auto; }

@media (max-width: 1080px) {
  .bk-visit__cards { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
  .bk-postcard:nth-child(2) { margin-top: 0; }
}
@media (max-width: 599px) {
  .bk-postcard { grid-template-columns: minmax(0, 1fr); transform: rotate(-1deg); }
  .bk-postcard:nth-child(2) { transform: rotate(1deg); }
  .bk-postcard__photo { aspect-ratio: 16 / 9; margin: 10px 10px 0; }
}
