/* A Touch of Blessings, Book a Tour page (tour.html).
   Every color, shadow, radius, font and easing comes from tour-tokens.css.
   Do not add hex values here; add a token to the brand kit first.
   Served with a 1-year immutable cache (vercel.json): bump ?v= in tour.html on any change. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--atob-cream);
  color: var(--atob-charcoal);
  font: 400 1rem/1.75 var(--atob-font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--atob-purple); }
button, input, select, textarea { font: inherit; color: inherit; }

/* One focus ring everywhere (brief 3.6.5). Headings that only receive
   programmatic focus are not controls, so they skip it. */
:focus-visible {
  outline: 2px solid var(--atob-purple);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--atob-purple-wash);
}
/* Component box-shadows (button shadow, hover, selected day) would otherwise replace the halo. */
.btn:focus-visible, .nav-btn:focus-visible, .link-btn:focus-visible, .back-btn:focus-visible,
.day:focus-visible, .slot-btn:focus-visible { box-shadow: 0 0 0 5px var(--atob-purple-wash) !important; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus, p[tabindex="-1"]:focus,
main:focus, .error-summary:focus, .form-error:focus { outline: none; box-shadow: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 10;
  background: var(--atob-white); color: var(--atob-purple); font-weight: 700;
  padding: 10px 16px; border-radius: var(--atob-radius-btn); box-shadow: var(--atob-shadow-btn);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--atob-content-max) + 2 * var(--atob-gutter));
  margin: 0 auto;
  padding: 0 var(--atob-gutter);
}

/* ---------- chrome ---------- */
.topbar { background: var(--atob-white); border-bottom: 1px solid var(--atob-purple-mist); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 700 1.05rem/1.2 var(--atob-font-display); color: var(--atob-purple); text-decoration: none;
}
.brand img { width: 44px; height: 44px; object-fit: contain; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 700; font-size: 0.9rem; color: var(--atob-purple); text-decoration: none;
}
.topbar-link:hover, .info-call:hover, .text-link:hover { text-decoration: underline; }

/* The heading sits on the CTA gradient so the eyebrow can be Gold Bright on
   purple (AA) instead of gold text on cream (2.56:1, fails). */
.page-head { background: var(--atob-grad-cta); color: var(--atob-white); padding: 48px 0 104px; }
.page-head .atob-eyebrow { color: var(--atob-gold-bright); }
.page-head h1 {
  margin-top: 12px; max-width: 22ch;
  font: 700 clamp(2rem, 5vw, 3.2rem)/1.15 var(--atob-font-display); letter-spacing: -0.015em;
}
.page-head .lead { margin-top: 12px; max-width: 56ch; font-size: 1.15rem; line-height: 1.75; color: var(--atob-purple-wash); }
body:not([data-view="home"]) .page-head .lead { display: none; }
.stage { margin-top: -64px; padding-bottom: var(--atob-section-y); }

/* ---------- card ---------- */
.card {
  background: var(--atob-white);
  border: 1px solid var(--atob-purple-mist);
  border-radius: var(--atob-radius-card);
  box-shadow: var(--atob-shadow-card);
  overflow: hidden;
}
.pane { padding: 24px; min-width: 0; }
.info {
  background: var(--atob-cream);
  border-bottom: 1px solid var(--atob-purple-mist);
  padding: 24px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.back-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--atob-radius-pill); background: var(--atob-purple-wash); color: var(--atob-purple);
  transition: background-color var(--atob-dur) var(--atob-ease);
}
.back-btn:hover { background: var(--atob-purple-mist); }
.info-caption { font-size: 0.8rem; line-height: 1.5; color: var(--atob-slate); font-weight: 600; }
.info-title, .step-title, .center-name {
  font: 700 clamp(1.2rem, 2.5vw, 1.5rem)/1.15 var(--atob-font-display); color: var(--atob-charcoal);
}
.info-addr { font-size: 0.95rem; line-height: 1.6; color: var(--atob-slate); }
.info-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; line-height: 1.5; font-weight: 500; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; }
.info-when { font-weight: 700; }
.icon { flex: none; width: 20px; height: 20px; color: var(--atob-purple); }
.info-expect {
  background: var(--atob-gold-wash); border-left: 3px solid var(--atob-gold);
  border-radius: 0 var(--atob-radius-btn) var(--atob-radius-btn) 0;
  padding: 12px 14px; font-size: 0.95rem; line-height: 1.6; color: var(--atob-slate);
}
.info-call {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; color: var(--atob-purple); text-decoration: none;
}
.notice {
  background: var(--atob-gold-wash); border-left: 3px solid var(--atob-gold);
  border-radius: 0 var(--atob-radius-btn) var(--atob-radius-btn) 0;
  padding: 10px 14px; margin-bottom: 16px; font-size: 0.95rem; line-height: 1.6; color: var(--atob-charcoal);
}
.step-title { margin-bottom: 16px; }
.body-text { color: var(--atob-slate); }
.body-text a, .empty-call a, .manage-line a { font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 13px 28px; border: 0; border-radius: var(--atob-radius-btn);
  font: 700 0.9rem/1.2 var(--atob-font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--atob-dur) var(--atob-ease), color var(--atob-dur) var(--atob-ease),
    transform var(--atob-dur) var(--atob-ease), box-shadow var(--atob-dur) var(--atob-ease);
}
.btn .icon { width: 18px; height: 18px; color: currentColor; }
.btn-primary { background: var(--atob-purple); color: var(--atob-white); box-shadow: var(--atob-shadow-btn); }
.btn-primary:hover:not(:disabled) { background: var(--atob-purple-deep); transform: translateY(-1px); box-shadow: var(--atob-shadow-btn-hover); }
.btn-primary:disabled { cursor: progress; }
.btn-outline { background: transparent; color: var(--atob-purple); border: 2px solid var(--atob-purple); padding: 11px 26px; }
.btn-outline:hover { background: var(--atob-purple); color: var(--atob-white); }
.btn-lg { padding: 16px 34px; font-size: 0.98rem; }
.btn-block { width: 100%; }
.link-btn {
  border: 0; background: none; padding: 6px 4px; min-height: 44px; cursor: pointer;
  font-weight: 700; color: var(--atob-purple); text-decoration: underline; text-underline-offset: 3px;
}
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--atob-purple); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* ---------- S0 centers ---------- */
.centers { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--atob-grid-gap); }
.center {
  background: var(--atob-cream); border: 1px solid var(--atob-purple-mist); border-radius: var(--atob-radius-card);
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.center-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--atob-radius-photo); box-shadow: var(--atob-shadow-card); }
.center-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.center-line { display: flex; gap: 8px; align-items: flex-start; font-size: 0.95rem; line-height: 1.6; color: var(--atob-slate); }
.center-line a { color: var(--atob-purple); font-weight: 700; text-decoration: none; }
.center-meta { font-size: 0.85rem; line-height: 1.6; color: var(--atob-slate); }
.center-actions { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* ---------- S1 calendar ---------- */
.month { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 460px; margin: 0 auto 8px; }
.month-label { font: 700 1.2rem/1.2 var(--atob-font-display); color: var(--atob-charcoal); }
.nav-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; cursor: pointer;
  border: 0; border-radius: var(--atob-radius-pill); background: transparent; color: var(--atob-purple);
  transition: background-color var(--atob-dur) var(--atob-ease);
}
.nav-btn:hover:not(:disabled) { background: var(--atob-purple-wash); }
.nav-btn:disabled { cursor: default; }
.nav-btn:disabled .icon { color: var(--atob-muted); }
.grid-wrap { position: relative; max-width: 460px; margin: 0 auto; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: 6px 0; text-align: center; font: 700 0.8rem/1.5 var(--atob-font-body); color: var(--atob-slate); }
.cal abbr { text-decoration: none; }
.cal td { padding: 4px 0; text-align: center; }
.day {
  position: relative; width: 44px; height: 44px; padding: 0;
  border: 1px solid transparent; border-radius: var(--atob-radius-pill);
  background: transparent; color: var(--atob-muted); font: 400 1rem/1 var(--atob-font-body); cursor: default;
}
.day.is-avail {
  background: var(--atob-purple-wash); color: var(--atob-purple); font-weight: 700; cursor: pointer;
  transition: background-color var(--atob-dur) var(--atob-ease), transform var(--atob-dur) var(--atob-ease), box-shadow var(--atob-dur) var(--atob-ease);
}
.day.is-avail:hover { background: var(--atob-purple-mist); transform: translateY(-1px); box-shadow: var(--atob-shadow-btn); }
.day.is-selected, .day.is-selected:hover { background: var(--atob-purple); color: var(--atob-white); transform: none; box-shadow: none; }
.day[aria-current="date"]::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 3px; background: var(--atob-gold-muted);
}
.day.is-selected[aria-current="date"]::after { background: var(--atob-gold-bright); }
.empty-month {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  width: max-content; max-width: 92%; padding: 14px 22px; text-align: center;
  background: var(--atob-white); border-radius: var(--atob-radius-pill); box-shadow: var(--atob-shadow-btn);
  color: var(--atob-charcoal); font-weight: 600; line-height: 1.5;
}
.empty-call { font-weight: 400; font-size: 0.95rem; color: var(--atob-slate); }
.tz-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 0.95rem; color: var(--atob-slate); }

/* ---------- S2 times ---------- */
.times-head { font: 700 1rem/1.5 var(--atob-font-body); color: var(--atob-charcoal); margin-bottom: 10px; }
.slots {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  /* padding + negative margin keep focus rings from being clipped by the scroller */
  padding: 6px; margin: 0 -6px;
  max-height: min(480px, 60vh); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--atob-purple) var(--atob-purple-mist);
}
.slot { display: flex; gap: 8px; }
.slot-btn {
  flex: 1 1 100%; min-width: 0; height: 52px; cursor: pointer;
  border: 1px solid var(--atob-purple); border-radius: var(--atob-radius-btn);
  background: var(--atob-white); color: var(--atob-purple); font: 700 0.95rem/1 var(--atob-font-body);
  transition: flex-basis var(--atob-dur) var(--atob-ease), background-color var(--atob-dur) var(--atob-ease),
    box-shadow var(--atob-dur) var(--atob-ease), transform var(--atob-dur) var(--atob-ease);
}
.slot-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--atob-purple), var(--atob-shadow-btn); transform: translateY(-1px); }
.slot.is-selected .slot-btn { flex-basis: 48%; background: var(--atob-purple-mist); border-color: var(--atob-purple-mist); cursor: default; }
.slot-next { flex: 1 1 48%; min-width: 0; height: 52px; padding: 0 12px; font-size: 0.95rem; animation: slot-in var(--atob-dur) var(--atob-ease); }
@keyframes slot-in { from { opacity: 0; transform: translateX(8px); } }

/* ---------- S3 form (field values mirror website/enroll.html .form-group) ---------- */
.form-intro { font-size: 0.95rem; color: var(--atob-slate); margin: -6px 0 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; min-width: 0; }
.field label { display: block; margin-bottom: 5px; font: 600 0.85rem/1.4 var(--atob-font-body); color: var(--atob-charcoal); }
.req { color: var(--atob-purple); margin-left: 2px; }
.opt { font-weight: 400; color: var(--atob-slate); }
/* Border is Muted (4.35:1 on white) so the field edge meets WCAG 1.4.11.
   enroll.html uses a lighter border; see README "flags". */
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--atob-muted); border-radius: var(--atob-radius-btn);
  background: var(--atob-white); color: var(--atob-charcoal); font: 400 0.9rem/1.5 var(--atob-font-body);
  transition: border-color var(--atob-dur) var(--atob-ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--atob-purple); }
.field textarea { resize: vertical; min-height: 80px; }
.field ::placeholder { color: var(--atob-slate); opacity: 1; } /* 9.3:1 on white; Muted is 4.35:1 */
.field [aria-invalid="true"] { border-color: var(--atob-red); }
.age-input { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8px; }
.hint { margin-top: 6px; font-size: 0.85rem; line-height: 1.5; color: var(--atob-slate); }
.field-error, .form-error { display: flex; gap: 8px; align-items: flex-start; font: 500 0.85rem/1.45 var(--atob-font-body); color: var(--atob-charcoal); }
.field-error { margin-top: 6px; }
.field-error .icon, .form-error .icon, .error-summary .icon { width: 18px; height: 18px; color: var(--atob-red); }
.form-error { border: 1.5px solid var(--atob-red); border-radius: var(--atob-radius-btn); padding: 12px 14px; margin-bottom: 14px; font-size: 0.95rem; }
.error-summary { border: 1.5px solid var(--atob-red); border-radius: var(--atob-radius-btn); padding: 14px 16px; margin-bottom: 18px; }
.error-summary-title { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--atob-charcoal); }
.error-summary ul { margin: 6px 0 0; padding-left: 26px; }
.error-summary a { font-weight: 600; }
.consent { margin: 4px 0 14px; font-size: 0.85rem; line-height: 1.55; color: var(--atob-slate); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- S4 / S5 ---------- */
.done-badge {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: var(--atob-radius-pill); background: var(--atob-purple-wash);
}
.done-badge .icon { width: 26px; height: 26px; }
.manage-line { font-size: 0.95rem; color: var(--atob-slate); }
.confirm-cancel { padding: 18px; border: 1px solid var(--atob-purple-mist); border-radius: var(--atob-radius-card); background: var(--atob-cream); }
.confirm-cancel .actions { margin: 14px 0 0; }
.confirm-cancel .form-error { margin: 14px 0 0; }

/* ---------- layout: desktop 3-pane / 2-pane ---------- */
@media (min-width: 960px) {
  .card--cal, .card--split { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
  .card--cal { grid-template-columns: 300px minmax(0, 1fr) 0px; transition: grid-template-columns var(--atob-dur) var(--atob-ease); }
  .card--cal.has-times { grid-template-columns: 300px minmax(0, 1fr) 240px; }
  .info { border-bottom: 0; border-right: 1px solid var(--atob-purple-mist); min-height: 540px; }
  .pane { padding: 32px; }
  .pane--times { padding: 0; overflow: hidden; }
  .card--cal.has-times .pane--times { padding: 32px 20px 24px 0; }
  .times-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .pane--centers { padding: 32px; }
}
/* Below 960 the steps become separate screens: day, then time, then details. */
@media (max-width: 959px) {
  .card--cal.has-times .pane--cal { display: none; }
  .pane--cal:empty, .pane--times:empty { display: none; }
  .pane--cal .step-title, .times-title, .times-head { text-align: center; }
  .slots { max-height: none; max-width: 420px; margin: 0 auto; }
  body[data-view="time"] .info-expect { display: none; } /* keeps the times near the top of the stacked screen */
  .times-head { margin-bottom: 14px; }
}
@media (max-width: 639px) {
  .container { padding: 0 16px; }
  .brand-word { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .page-head { padding: 28px 0 80px; }
  .stage { margin-top: -56px; padding-bottom: 40px; }
  .pane, .info, .center { padding: 16px; }
  .pane--cal { padding-left: 6px; padding-right: 6px; } /* 44 px days keep a gap between them at 375 */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .field input, .field select, .field textarea { font-size: 1rem; } /* stops iOS zooming into the field */
  .actions .btn, .center-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .day.is-avail:hover, .slot-btn:hover:not(:disabled), .btn-primary:hover:not(:disabled) { transform: none; }
}
