/* Book a call. The open door, then the form on a white sheet with the note beside it, then the step that
   follows: the calendar when one is connected, the email when it is not. contact.js runs the form and is not
   changed. This file lays the page out with the kit's form parts and adds the sheet, the progress line and the
   send bar. */

/* ---------- the door ---------- */
/* The scene fills the band. Without these two it keeps its own 16 by 9. */
.ct-door .k-scene { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; --fx: 0.8; --fy: 0.46; }
.ct-door .k-cam { transform-origin: 77% 50%; }
.ct-door .k-display { max-width: 9.6em; }
.ct-door .k-lede { max-width: 24em; }
/* The picture settles as the page arrives, and the camera walks in through the door as the page scrolls on. */
@keyframes ct-arrive { from { scale: 1.05; } }
@keyframes ct-walk { to { scale: 1.5; } }
.ct-door .k-cam > img { animation: ct-arrive 0.9s var(--out) both; }
@supports (animation-timeline: view()) {
  .ct-door .k-cam { animation: ct-walk linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
}
/* The figure holding the door says who you will talk to. */
.ct-door .k-mark > i { opacity: 0; transition: opacity 0.2s, scale 0.4s var(--bounce); }
.ct-door .k-mark { width: 64px; height: 200px; }
.ct-door .k-mark:is(:hover, :focus-visible) > i { opacity: 1; }
.ct-door .k-mark > b { top: calc(50% + 22px); }

/* ---------- progress ---------- */
.ct-steps { gap: 6px 28px; margin-bottom: clamp(18px, 2vw, 28px); list-style: none; }
.ct-steps > li { display: flex; align-items: baseline; gap: 10px; color: var(--dim); }
.ct-steps > [aria-current="step"] { color: var(--ink); }
.ct-steps:has([data-step-label="next"][aria-current]) > [data-step-label="form"]::after { content: '\2713'; content: '\2713' / 'Done.'; }

/* ---------- the form ---------- */
.ct-form { scroll-margin-top: 0; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.ct-grid[hidden], .ct-next[hidden] { display: none; }
/* The note is written before the form, so it is read first. On a wide screen it sits to the right and stays put. */
.ct-side { grid-column: 2; grid-row: 1; position: sticky; top: 96px; display: grid; gap: 14px; }
.ct-side-pic { margin-bottom: 10px; }
/* The same picture as the first screen, moved in on the doorway. */
.ct-side-pic > img { scale: 1.85; transform-origin: 79% 44%; }
.ct-side-more { max-width: 30em; margin-top: 10px; }
/* The sheet. Fields and chips inside it sit on the paper grey. */
.ct-sheet { --sq-r: 26px; --sq-fill: var(--white); --sq-shadow: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.05)) drop-shadow(0 14px 28px rgba(0, 0, 0, 0.09)); --raise: var(--paper); grid-column: 1; grid-row: 1; padding: clamp(18px, 2.2vw, 34px); }
.ct-sheet .k-label > span { font-weight: 400; }
.ct-other { display: none; gap: 6px; max-width: 22rem; margin-top: 6px; }
.k-field:has(#f-industry-other-choice:checked) .ct-other { display: grid; }
/* A long answer wraps inside its chip. */
.ct-long > label { white-space: normal; padding-block: 11px; line-height: 1.25; }
.ct-consent { max-width: 36em; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 15px; }
.ct-consent a, .ct-other-ways a { text-decoration-color: var(--faint); text-underline-offset: 0.2em; }
.ct-noscript { display: none; }
html:not(.js) .ct-noscript { display: block; }
.ct-send { display: grid; gap: 10px; }
.ct-saved[hidden] { display: none; }
.ct-saved::before { content: '\2713'; content: '\2713' / ''; margin-right: 6px; }
.ct-status:empty { display: none; }

/* ---------- the step after the form ---------- */
.ct-next { display: grid; gap: clamp(24px, 3vw, 44px); }
/* The heading takes focus so a screen reader starts there. It is not a control, so it draws no ring. */
.ct-next h2:focus { outline: none; }
.ct-next .k-display { max-width: 14em; }
.ct-next-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.ct-cal { display: grid; gap: 10px; }
.ct-cal-frame { display: block; width: 100%; height: 720px; border: 0; }
.ct-told, .ct-mail { --sq-fill: var(--white); }
.ct-told .k-doc-head button { font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 0.2em; min-height: 24px; }
.ct-mail { max-width: 46em; gap: 10px; padding: clamp(18px, 2vw, 28px); }
.ct-mail .k-actions { margin-top: 10px; font-family: var(--sans); }

/* ---------- other ways ---------- */
.ct-address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ct-address > a { overflow-wrap: anywhere; }

/* ---------- narrower ---------- */
@media (max-width: 899px) {
  .ct-grid, .ct-next-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-side, .ct-sheet { grid-column: auto; grid-row: auto; }
  .ct-side { position: static; }
  .ct-side-pic { --ar: 16 / 6; }
  .ct-side-more { display: none; }
  .ct-cal-frame { height: 640px; }
}
/* A phone. The sheet runs to the edges of the screen, each choice is a full 44px, and the send button stays at
   the bottom of the screen. page-contact.js lifts it above the keyboard through --kb. */
@media (max-width: 699px) {
  .ct-form { padding-top: clamp(28px, 6vw, 40px); }
  .ct-sheet { --sq-r: 22px; margin-inline: calc(var(--m) * -1 + 6px); padding: 20px calc(var(--m) - 6px); }
  .ct-sheet .k-chips { gap: 8px; }
  .ct-steps > li { min-height: 24px; }
  .ct-send { position: sticky; bottom: var(--kb, 0px); z-index: 4; margin: 0 calc(var(--m) * -1 + 6px) -20px; padding: 10px calc(var(--m) - 6px) max(12px, env(safe-area-inset-bottom)); background: var(--white); }
  .ct-send .k-actions { gap: 6px; }
  .ct-saved { flex: 1 1 100%; text-align: center; }
  .ct-door .k-mark { display: none; }
  .ct-told .k-doc-head button { min-height: 44px; margin-block: -12px; }
  .ct-address > .k-tag { margin-left: -2px; }
  .ct-address > a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-door .k-cam, .ct-door .k-cam > img { animation: none; }
}
