/* ==========================================================================
   Booking page (book.html). Builds on the tokens in style.css.
   ========================================================================== */

.bk { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Background ---------- */
.bk-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bk-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(236,234,228,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236,234,228,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 65% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 65% 40%, #000 20%, transparent 75%);
}
.bk-glow {
  position: absolute; right: -8%; top: -10%; width: 70vw; height: 70vw; max-width: 1100px; max-height: 1100px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242,169,59,.13), rgba(127,212,230,.035) 55%, transparent);
  filter: blur(30px);
  animation: bk-breathe 14s ease-in-out infinite alternate;
}
@keyframes bk-breathe { to { transform: translate(-4%, 6%) scale(1.06); opacity: .8; } }

/* ---------- Top bar ---------- */
.bk-top {
  max-width: 1380px; width: 100%; margin: 0 auto; padding: 22px var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.bk-back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--text-2); transition: color .25s, border-color .25s, background .25s; }
.bk-back:hover { color: var(--text); border-color: var(--text); background: rgba(236,234,228,.04); }
.bk-back-arrow { transition: transform .35s var(--ease); }
.bk-back:hover .bk-back-arrow { transform: translateX(-3px); }
.bk-brand { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.bk-top-link { justify-self: end; color: var(--muted); font-size: 11px; transition: color .25s; }
.bk-top-link:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.bk-main {
  flex: 1; max-width: 1380px; width: 100%; margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) var(--gutter) clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 820px;
  grid-template-areas: "intro cal" "details cal";
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 4.5vw, 80px); row-gap: clamp(36px, 4vw, 52px);
  align-items: start;
}
.bk-intro { grid-area: intro; }
.bk-cal { grid-area: cal; position: sticky; top: 24px; }
.bk-details { grid-area: details; }

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  /* not on the calendar: an animated ancestor makes Chrome clip the Cal iframe */
  .bk-in { animation: bk-in 1s var(--ease) backwards; animation-delay: var(--d, 0s); }
  @keyframes bk-in { from { opacity: 0; transform: translateY(18px); } }
}

/* ---------- Intro ---------- */
.bk-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(21,23,27,.6); color: var(--text-2); font-size: 11px; }
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: #5BD69A; flex: none; box-shadow: 0 0 0 0 rgba(91,214,154,.55); animation: bk-pulse 2.2s ease-out infinite; }
@keyframes bk-pulse { to { box-shadow: 0 0 0 9px rgba(91,214,154,0); } }
.bk-title { margin-top: 26px; font-size: clamp(2.7rem, 4.4vw, 4.6rem); max-width: 11ch; }
.bk-title .serif { color: var(--accent); }
.bk-sub { margin-top: 22px; max-width: 46ch; color: var(--text-2); font-size: clamp(17px, .5vw + 13px, 19px); }
.bk-host { margin-top: 30px; display: flex; align-items: center; gap: 16px; }
.bk-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 1px solid var(--line-2); box-shadow: 0 0 0 4px rgba(242,169,59,.08); flex: none; }
.bk-host-name { font-weight: 600; font-size: 1.08em; letter-spacing: -.01em; margin-bottom: 2px; }
.bk-host .mono { font-size: 11px; }

/* ---------- Calendar frame ---------- */
.bk-frame {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(#0F1114, #0F1114) padding-box,
    linear-gradient(140deg, rgba(242,169,59,.65), rgba(236,234,228,.08) 35%, rgba(236,234,228,.05) 65%, rgba(127,212,230,.4)) border-box;
  box-shadow: 0 60px 140px -60px rgba(242,169,59,.4), 0 40px 80px -40px rgba(0,0,0,.85);
}
.bk-bar { display: flex; align-items: center; gap: 10px; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.bk-sep { color: var(--accent); }
.bk-tz { margin-left: auto; color: var(--muted); text-align: right; }
.bk-frame.is-booked .bk-bar { color: #5BD69A; }

.bk-body { position: relative; min-height: 560px; }
.bk-embed { padding: 6px 8px 0; opacity: 0; transition: opacity .6s var(--ease); }
.bk-frame.is-ready .bk-embed { opacity: 1; }

/* skeleton shown while Cal loads */
.bk-skeleton { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 200px; gap: 22px; padding: 28px 34px; background: #0F1114; transition: opacity .5s var(--ease), visibility .5s; }
.bk-frame.is-ready .bk-skeleton { opacity: 0; visibility: hidden; }
.bk-sk-head { display: flex; justify-content: space-between; margin-bottom: 26px; }
.bk-sk-head span, .bk-sk-days::before, .bk-sk-slots::before { display: block; }
.bk-sk-head span { height: 14px; width: 130px; border-radius: 6px; background: #1B1E23; }
.bk-sk-head span:last-child { width: 48px; }
.bk-sk-days {
  height: 380px; border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 7 - 8px), #0F1114 calc(100% / 7 - 8px) calc(100% / 7)),
    repeating-linear-gradient(0deg, transparent 0 66px, #0F1114 66px 76px),
    #181B20;
}
.bk-sk-slots { border-left: 1px solid var(--line); padding-left: 20px; background: repeating-linear-gradient(180deg, #181B20 0 36px, transparent 36px 46px) content-box; }
.bk-skeleton > * { position: relative; overflow: hidden; }
.bk-skeleton > *::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(236,234,228,.05) 50%, transparent 70%); transform: translateX(-100%); animation: bk-shimmer 1.6s ease-in-out infinite; }
@keyframes bk-shimmer { to { transform: translateX(100%); } }

.bk-fallback { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.bk-fallback a { color: var(--text-2); border-bottom: 1px solid var(--line-2); transition: color .25s, border-color .25s; }
.bk-fallback a:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Details ---------- */
.bk-details { display: grid; gap: 30px; }
.bk-block { padding-top: 20px; border-top: 1px solid var(--line); }
.bk-label { color: var(--accent); font-size: 11px; margin-bottom: 16px; }
.bk-list { display: grid; gap: 12px; }
.bk-list li { display: grid; grid-template-columns: 30px 1fr; align-items: baseline; color: var(--text-2); }
.bk-list .mono { color: var(--muted); font-size: 11px; }

.bk-steps { position: relative; display: grid; gap: 14px; }
.bk-steps::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.bk-steps li { display: grid; grid-template-columns: 30px 1fr; align-items: baseline; color: var(--text-2); }
.bk-steps strong { color: var(--text); font-weight: 600; }
.bk-step-dot { position: relative; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }

.bk-proof { display: grid; }
.bk-proof a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease), color .25s; }
.bk-proof li:last-child a { border-bottom: 0; }
.bk-proof a > span:first-child { font-weight: 500; }
.bk-proof .mono { font-size: 10.5px; }
.bk-proof a:hover { padding-left: 8px; color: var(--accent); }

.bk-email { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bk-contact a:not(.copy-btn) { border-bottom: 1px solid var(--line-2); transition: border-color .25s; word-break: break-all; }
.bk-contact a:hover { border-color: var(--accent); }

.bk-foot { max-width: 1380px; width: 100%; margin: 0 auto; padding: 24px var(--gutter) 34px; border-top: 1px solid var(--line); font-size: 11px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .bk-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "cal" "details"; grid-template-rows: auto; }
  .bk-cal { position: static; width: 100%; max-width: 860px; }
  .bk-title { max-width: 16ch; }
  .bk-details { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}
@media (max-width: 760px) {
  .bk-top { grid-template-columns: auto 1fr; }
  .bk-brand { display: none; }
  .bk-details { grid-template-columns: 1fr; }
  .bk-skeleton { grid-template-columns: 1fr; padding: 22px; }
  .bk-sk-slots { display: none; }
  .bk-body { min-height: 520px; }
}
@media (max-width: 600px) {
  .bk-tz { display: none; }
  .bk-embed { padding: 0; }
  .bk-bar { padding: 13px 16px; }
  .bk-frame { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-glow, .bk-dot, .bk-skeleton > *::after { animation: none; }
}
