/* ==========================================================================
   Lima Photography — booking.css (builder C): /book and /book/confirmation.
   Builds on site.css tokens (paper/ink, display type, underline fields). Calm page: no parallax,
   only soft fades. No inline styles anywhere (CSP).
   ========================================================================== */

.book [hidden], .book-done [hidden] { display: none !important; }

/* ---------- hero (smaller than the other page heroes) ---------- */
.book-hero.hero--photo.panel--hero { --panel-h: 54svh; min-height: 54vh; min-height: var(--panel-h); }
@media (max-width: 767px) {
  .book-hero.hero--photo.panel--hero { --panel-h: 46svh; min-height: 46vh; min-height: var(--panel-h); }
}
.book-hero__title { max-width: 100%; }

/* ---------- page frame ---------- */
.book { padding-block: clamp(40px, 6vw, 96px) clamp(56px, 8vw, 128px); }
.book--plain { padding-top: clamp(32px, 5vw, 72px); }
.book__intro { max-width: 52rem; margin-bottom: clamp(32px, 4.5vw, 64px); }
.book__intro > * + * { margin-top: 1rem; }
.book__heading.display-xl { margin-top: .5rem; }
.book__lead { max-width: 40rem; }
.book__empty { max-width: 40rem; }
.book__empty > * + * { margin-top: .75rem; }
.book__noscript { margin-top: 2rem; }
.book__noscript > * + * { margin-top: .5rem; }
.book__noscript a { text-decoration: underline; }

/* ---------- progress ---------- */
.book-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: 0 0 clamp(28px, 4vw, 56px);
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.book-progress__item { min-width: 0; border-top: 1px solid var(--line); }
.book-progress__item.is-done, .book-progress__item.is-current { border-top: 2px solid var(--ink); }
.book-progress__btn {
  display: grid;
  gap: .15rem;
  width: 100%;
  padding: .7rem 0 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
}
.book-progress__btn[disabled] { cursor: default; }
.book-progress__item.is-current .book-progress__btn,
.book-progress__item.is-done .book-progress__btn { color: var(--ink); }
.book-progress__btn:not([disabled]):hover .book-progress__label { text-decoration: underline; text-decoration-color: var(--accent); }
.book-progress__btn:focus-visible { outline: none; box-shadow: var(--focus); }
.book-progress__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .8125rem;
  letter-spacing: .02em;
}
.book-progress__label { font-size: .9375rem; font-weight: 500; line-height: 1.3; }
@media (max-width: 699px) {
  .book-progress__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .book-progress__item.is-current .book-progress__label {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  }
  .book-progress { grid-template-columns: auto auto auto auto; justify-content: stretch; }
  .book-progress__item.is-current { grid-column: span 1; }
}

/* ---------- layout: steps + running summary ---------- */
.book__layout { display: grid; gap: clamp(40px, 5vw, 72px); align-items: start; }
.book__main { min-width: 0; }
@media (min-width: 1024px) {
  .book__layout { grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); }
  .book__layout .book-summary { position: sticky; top: calc(var(--nav-h) + 24px); }
}

/* ---------- steps ---------- */
.book-step { display: block; min-width: 0; }
.js .book-step.is-entering { animation: book-fade .45s var(--ease) both; }
.reduced-motion .book-step.is-entering { animation: none; }
@keyframes book-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.book-step__head { margin-bottom: clamp(20px, 3vw, 36px); }
.book-step__count {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.book-step__title {
  margin-top: .35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: .92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.book-step__title:focus { outline: none; }
.book-step__title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.book-step__hint { margin-top: .75rem; font-size: var(--fs-small); color: var(--ink-2); }
.book-step__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: clamp(28px, 3.5vw, 44px);
}
.book-step__actions [data-next], .book-step__actions [data-submit] { margin-left: auto; }
.book-step__actions .btn { min-height: 52px; }
.book-error { margin-top: 1rem; color: var(--error); }
.book-form-error { margin-top: 1.25rem; }

/* ---------- step 1: package cards ---------- */
.package-list { margin: 0; padding: 0; border: 0; min-width: 0; border-bottom: 1px solid var(--ink); }
.package-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .5rem 1.25rem;
  padding: 1.15rem clamp(.75rem, 1.6vw, 1.5rem);
  border-top: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.package-option:hover { background: var(--paper-2); }
.package-option__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.package-option:has(.package-option__input:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent); }
.package-option:has(.package-option__input:checked) { background: var(--ink); color: var(--paper); }
.package-option__body { display: grid; gap: .25rem; min-width: 0; }
.package-option__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.package-option__summary { font-size: .9375rem; line-height: 1.5; opacity: .85; }
.package-option__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .75;
}
.package-option__price { font-weight: 500; white-space: nowrap; }
.package-option__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.package-option__mark .icon { width: 16px; height: 16px; opacity: 0; transition: opacity .2s var(--ease); }
.package-option:has(.package-option__input:checked) .package-option__mark .icon { opacity: 1; }
@media (max-width: 599px) {
  .package-option { grid-template-columns: minmax(0, 1fr) auto; }
  .package-option__price { grid-column: 1; grid-row: 2; }
  .package-option__mark { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- step 2: calendar + times ---------- */
.book-date { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) {
  .book-date { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
.cal { min-width: 0; }
.cal__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.cal__title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.cal__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cal__nav .icon { width: 18px; height: 18px; }
.cal__nav:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.cal__nav:focus-visible { outline: none; box-shadow: var(--focus); }
.cal__nav[disabled] { opacity: .3; cursor: not-allowed; }
.cal__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal__grid th {
  padding: .4rem 0;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
}
.cal__grid abbr { text-decoration: none; }
.cal__grid td { padding: 2px; text-align: center; }
.cal__cell { cursor: pointer; }
.cal__cell:focus { outline: none; }
.cal__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 40px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.cal__cell.is-available .cal__day { border-color: rgba(var(--ink-rgb), .35); }
.cal__cell.is-available .cal__day::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}
.cal__cell.is-available:hover .cal__day { border-color: var(--ink); background: var(--paper-2); }
.cal__cell[aria-disabled="true"] { cursor: default; }
.cal__cell[aria-disabled="true"] .cal__day { color: var(--ink-3); }
.cal__cell[aria-selected="true"] .cal__day,
.cal__cell[aria-selected="true"]:hover .cal__day { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cal__cell[aria-current="date"] .cal__day { text-decoration: underline; text-underline-offset: 3px; }
.cal__cell:focus-visible .cal__day { box-shadow: var(--focus); }
.cal__status { min-height: 1.5em; margin-top: .75rem; font-size: var(--fs-small); color: var(--ink-2); }
.cal.is-loading .cal__grid { opacity: .45; transition: opacity .2s var(--ease); }
.cal__retry {
  margin-left: .5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.times { min-width: 0; }
.times__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-caption-title);
  line-height: 1.25;
}
.times__hint { margin-top: .4rem; font-size: var(--fs-small); color: var(--ink-2); }
.times__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.time-btn {
  min-height: 48px;
  padding: .5rem .25rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.time-btn:hover { background: var(--paper-2); }
.time-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.time-btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- steps 3/4 ---------- */
.book-details { display: block; }
.book-review__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-caption-title);
  margin-bottom: .75rem;
}
.book-review, .book-summary__list { margin: 0; }
.book-review > div, .book-summary__list > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
  gap: .25rem 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.book-review { border-top: 1px solid var(--ink); margin-bottom: 1.75rem; }
.book-review dt, .book-summary__list dt {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: .2rem;
}
.book-review dd, .book-summary__list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.book-review__change {
  margin-left: .5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: .8125rem;
  text-decoration: underline;
  cursor: pointer;
}
.book-review__change:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.book-agree { margin-top: .5rem; }
.btn.is-loading { opacity: .6; cursor: progress; pointer-events: none; }

/* ---------- summary card ---------- */
.book-summary {
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--paper-2);
  border-top: 2px solid var(--ink);
}
.book-summary__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-label);
  letter-spacing: -0.04em;
  line-height: .95;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.book-summary__list > div:last-child { border-bottom: 0; }
.book-summary__list dd.is-empty { color: var(--ink-2); }
.book-summary__note { margin-top: 1rem; font-size: .8125rem; color: var(--ink-2); }

/* ---------- confirmation page ---------- */
.book-done { padding-block: clamp(40px, 6vw, 96px) clamp(56px, 8vw, 128px); }
.book-done__head { max-width: 56rem; }
.book-done__head > * + * { margin-top: 1rem; }
.book-done__title { margin-top: .5rem; }
.book-done__ref { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.book-done__grid {
  display: grid;
  gap: clamp(40px, 5vw, 80px);
  margin-top: clamp(36px, 5vw, 72px);
  align-items: start;
}
@media (min-width: 900px) {
  .book-done__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.book-done__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.book-done__actions .icon { width: 1.05em; height: 1.05em; }
.book-done__next > * + * { margin-top: 1.5rem; }
.book-done__next a { text-decoration: none; }
.book-status {
  display: inline-block;
  padding: .1rem .55rem;
  border: 1px solid var(--ink);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.book-status--confirmed { background: var(--ink); color: var(--paper); }

@media print {
  .book-progress, .book-step__actions, .book-done__actions { display: none !important; }
}

.book-step .form__note { margin-top: 1rem; }

/* without JavaScript only step 1 + the contact note are useful */
.no-js .book-progress, .no-js .book__layout .book-summary { display: none; }
@media (max-width: 480px) {
  .book-step__actions { gap: .75rem; }
  .book-step__actions .btn { padding-inline: 1.1rem; }
}
