/* /book-demo (src/pages/book-demo.astro). Builds on the contact form in preview.css (.pv-form, .pv-field
   with its labels inside, .pv-thanks); only what the demo request adds lives here: the page grid with the
   recordings, the three-select row, the choice tiles with their counter and the "Help us prepare"
   disclosure. Loaded before preview.css, so every rule here is scoped under .bd-page to win on specificity.
   FORMS-PREMIUM-1 (operator 2026-11-09): light grey ground, the form as one white card, tiles instead of
   chips, any number of goals, and real dashboard recordings beside the form. */
.pv-section.bd-page { background: #f5f5f7; padding-top: calc(var(--header-h) + clamp(28px, 3.4vw, 56px)); padding-bottom: clamp(56px, 7vw, 104px); }

/* Phone: title, form, then the recordings and the points. Desktop: title and recordings on the left (the
   recordings stay in view while the form scrolls), the form on the right across both rows. */
.bd-page .bd-grid { display: grid; gap: 28px; grid-template-areas: 'intro' 'form' 'aside'; }
@media (min-width: 1024px) {
  .bd-page .bd-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: 'intro form' 'aside form'; column-gap: clamp(40px, 4.4vw, 72px); row-gap: 32px; }
  .bd-page .bd-aside { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
}
.bd-page .bd-intro { grid-area: intro; display: grid; gap: 16px; align-content: start; }
.bd-page .bd-shell { grid-area: form; min-width: 0; }
.bd-page .bd-aside { grid-area: aside; display: grid; gap: 24px; align-content: start; min-width: 0; }
.bd-page h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem); line-height: 1.02; letter-spacing: -.04em; }
.bd-page .bd-intro .pv-lead { color: #6e6e73; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; max-width: 34em; }

/* The recordings: a dark screen with the clip, then the caption, the dots and Pause. */
.bd-page .bd-reel { margin: 0; border-radius: 22px; background: #0b0b0c; color: #f5f5f7; overflow: hidden; box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 34px 70px -36px rgb(0 0 0 / .55); }
.bd-page .bd-reel-screen { position: relative; aspect-ratio: 16 / 10; background: #000; }
.bd-page .bd-reel video { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease; }
.bd-page .bd-reel.is-switching video { opacity: 0; }
.bd-page .bd-reel-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 16px 18px 16px 20px; }
.bd-page .bd-reel-eyebrow { grid-column: 1 / -1; font-size: .75rem; letter-spacing: .01em; color: #a1a1a6; }
.bd-page .bd-reel-caption { grid-column: 1 / -1; min-height: 2.9em; font-size: .9375rem; line-height: 1.45; color: #f5f5f7; }
.bd-page .bd-reel-dots { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.bd-page .bd-reel-dot { display: grid; place-items: center; min-width: 24px; height: 32px; padding: 0 8px; border: 0; background: none; cursor: pointer; }
.bd-page .bd-reel-dot i { position: relative; display: block; width: 8px; height: 8px; border-radius: 999px; background: rgb(255 255 255 / .32); overflow: hidden; transition: width 320ms var(--ease-out), background-color 160ms ease; }
.bd-page .bd-reel-dot i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: #f5f5f7; transform: scaleX(var(--p, 0)); transform-origin: left center; }
.bd-page .bd-reel-dot[aria-current='true'] i { width: 40px; }
@media (hover: hover) and (pointer: fine) { .bd-page .bd-reel-dot:hover i { background: rgb(255 255 255 / .55); } }
.bd-page .bd-reel-dot:focus-visible, .bd-page .bd-reel-toggle:focus-visible { outline: 2px solid var(--record); outline-offset: 2px; border-radius: 8px; }
.bd-page .bd-reel-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #f5f5f7; cursor: pointer; transition: background-color 160ms ease, transform 100ms ease-out; }
.bd-page .bd-reel-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.bd-page .bd-reel-toggle[data-state='playing'] .bd-i-play, .bd-page .bd-reel-toggle[data-state='paused'] .bd-i-pause { display: none; }
@media (hover: hover) and (pointer: fine) { .bd-page .bd-reel-toggle:hover { background: rgb(255 255 255 / .2); } }
.bd-page .bd-reel-toggle:active { transform: scale(.94); }

.bd-page .bd-form { gap: 16px; }
.bd-page .bd-form .pv-fields { gap: 16px; }
@container (min-width: 760px) { .bd-page .bd-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bd-page .pv-field select[data-empty='true'] { color: #86868b; }

/* Choice tiles: a real checkbox inside each label, so keyboard, forms and screen readers work as usual.
   Chosen: a blue edge and a filled check, as on Apple's configurators. */
.bd-page .bd-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.bd-page .bd-choice legend { margin-bottom: 10px; font-size: .9375rem; line-height: 1.35; }
.bd-page .bd-count { font-weight: 600; color: var(--record-ink); font-variant-numeric: tabular-nums; margin-left: 4px; }
.bd-page .bd-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.bd-page .bd-chips--grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 540px) { .bd-page .bd-chips--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bd-page .bd-chip { position: relative; display: flex; cursor: pointer; }
.bd-page .bd-chip input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.bd-page .bd-chip span { position: relative; display: flex; align-items: center; width: 100%; min-height: 56px; padding: 12px 16px 12px 48px; border-radius: 12px; border: 1px solid #d2d2d7; background: #fff; color: var(--ink-text); font-size: .9375rem; font-weight: 500; line-height: 1.35; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 100ms ease-out; }
.bd-page .bd-chips:not(.bd-chips--grid) .bd-chip span { min-height: 46px; padding: 9px 16px 9px 42px; border-radius: 999px; }
.bd-page .bd-chip span::before { content: ''; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 1.5px solid #b4b4ba; background: #fff; transition: border-color 160ms ease, background-color 160ms ease; }
.bd-page .bd-chips:not(.bd-chips--grid) .bd-chip span::before { left: 14px; width: 18px; height: 18px; margin-top: -9px; }
.bd-page .bd-chip span::after { content: ''; position: absolute; left: 23px; top: 50%; width: 5px; height: 10px; margin-top: -7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(.6); opacity: 0; transition: opacity 160ms ease, transform 200ms var(--ease-out); }
.bd-page .bd-chips:not(.bd-chips--grid) .bd-chip span::after { left: 20.5px; width: 4.5px; height: 9px; margin-top: -6px; }
@media (hover: hover) and (pointer: fine) { .bd-page .bd-chip:hover span { border-color: #86868b; } }
.bd-page .bd-chip input:checked + span { border-color: var(--record-ink); box-shadow: inset 0 0 0 1px var(--record-ink); background: #f5f8ff; }
.bd-page .bd-chip input:checked + span::before { border-color: var(--record-ink); background: var(--record-ink); }
.bd-page .bd-chip input:checked + span::after { opacity: 1; transform: rotate(45deg) scale(1); }
.bd-page .bd-chip input:focus-visible + span { outline: 2px solid var(--record-ink); outline-offset: 2px; }
.bd-page .bd-chip:active span { transform: scale(.985); }
.bd-page .bd-choice[data-invalid='true'] .bd-chip span { border-color: var(--danger-ink); }

/* Help us prepare: closed by default so the required questions come first. */
.bd-page .bd-more { border: 0; border-radius: 16px; background: #f5f5f7; }
.bd-page .bd-more summary { list-style: none; cursor: pointer; display: grid; gap: 2px; padding: 16px 48px 16px 18px; position: relative; border-radius: 16px; }
.bd-page .bd-more summary::-webkit-details-marker { display: none; }
.bd-page .bd-more summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; border-right: 1.6px solid #6e6e73; border-bottom: 1.6px solid #6e6e73; transform: translateY(-70%) rotate(45deg); transition: transform var(--t-ui, 240ms) var(--ease-out); }
.bd-page .bd-more[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.bd-page .bd-more summary:focus-visible { outline: 2px solid var(--record-ink); outline-offset: 2px; }
.bd-page .bd-more-title { font-size: .9375rem; font-weight: 600; color: var(--ink-text); }
.bd-page .bd-more-title .opt { font-weight: 400; color: #6e6e73; }
.bd-page .bd-more-hint { font-size: .8125rem; line-height: 1.45; color: #6e6e73; }
.bd-page .bd-more-body { display: grid; gap: 16px; padding: 4px 18px 18px; }
.bd-page .bd-more-body textarea { min-height: 96px; }

.bd-page .bd-send { display: grid; gap: 14px; margin-top: 4px; }
@container (min-width: 540px) { .bd-page .bd-send { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; } .bd-page .bd-send .pv-form-msg { grid-column: 1 / -1; grid-row: 1; } .bd-page .bd-send .pv-form-actions { justify-content: flex-end; } }
.bd-page .pv-thanks h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; }
@media (prefers-reduced-motion: reduce) {
  .bd-page .bd-chip span, .bd-page .bd-chip span::before, .bd-page .bd-chip span::after, .bd-page .bd-more summary::after, .bd-page .bd-reel video, .bd-page .bd-reel-dot i { transition: none; }
}
