/* ==========================================================================
   Speed demos page only (speed-demos.html, v4.3, 25 Nov 2026, asked by Tommy).
   Copy: docs/speed-demos-page-v4.md. Layout reference: docs/design/speed-demos-v4.dc.html.
   Shared: page background, hero copy, fields, .text-more and the close
   (styles/flow.css, as pricing.html); step rows (styles/sections.css, as
   assistcv.html); motion (styles/motion.css).
   This file: the hero pebble, the video rows, the video and the form pop-up.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero: the pricing hero's copy on the left; Odro's blue pebble file on
   the right with nothing in front of it, turned 12deg with the pricing
   page's shadow, running off the right edge. Hidden at 900px and below.
   -------------------------------------------------------------------------- */
/* Clip the pebble only where it runs off the right edge, so its soft shadow fades out under the hero
   instead of stopping at a hard line */
.sd-page .p-hero { overflow: visible; overflow-x: clip; }
/* No navy wave follows this hero (pricing's 90px allowance isn't needed) */
.sd-page .p-hero .wrap { padding-bottom: clamp(32px, 4vw, 56px); }
/* Sized so the pebble and its shadow fit the hero's height (the hero clips at its edges), and centred far
   enough right that it runs off the page's right edge */
.sd-hero-art { position: relative; flex: 1 1 340px; min-width: 0; min-height: 400px; }
.sd-hero-pebble { position: absolute; left: 82%; top: 50%; width: min(100%, 520px); height: auto; max-width: none; transform: translate(-50%, -50%) rotate(-12deg); filter: drop-shadow(0 30px 60px rgba(14, 32, 80, .18)); pointer-events: none; }
@media (max-width: 900px) { .sd-hero-art { display: none; } }

/* --------------------------------------------------------------------------
   2. Demo rows: the shared step rows (.step-rows, .step-row, sections.css)
   with the video in place of the white card. Video 7/12, words 5/12.
   Desktop: video left on rows 1 and 3, right on row 2 (.flip).
   Phones: logo, category, H2 and line, then the video, then the buttons.
   -------------------------------------------------------------------------- */
.sd-demos .wrap { padding-top: clamp(24px, 3vw, 40px); padding-bottom: calc(clamp(56px, 6vw, 88px) + 90px); }  /* + 90px for the close's wave, which overlaps by 90px */
.sd-rows { gap: clamp(64px, 7vw, 100px); }
.sd-row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "media head" "media foot"; grid-template-rows: auto auto; row-gap: var(--space-9); scroll-margin-top: 100px; }
.sd-row.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head media" "foot media"; }
.sd-row .sd-head { grid-area: head; align-self: end; align-items: flex-start; gap: var(--space-5); }
.sd-media { grid-area: media; min-width: 0; }
.sd-foot { grid-area: foot; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) var(--space-9); }
/* Product logo at its own proportions: height set, width follows, never stretched or squashed.
   If the column is too narrow the whole logo shrinks inside its box (object-fit). */
.sd-logo { display: block; height: 48px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; align-self: flex-start; flex: none; margin-bottom: var(--space-1); }
.sd-cat { margin: 0; font-size: var(--text-eyebrow); font-weight: var(--weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-ink); }
.sd-row h2 { font-size: var(--text-h2-sm); line-height: var(--leading-heading); letter-spacing: -0.02em; }
.sd-row .step-line { margin: 0; max-width: 440px; }
@media (max-width: 900px) {
  .sd-row, .sd-row.flip { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "foot"; row-gap: var(--space-8); }
  .sd-row .sd-head, .sd-foot { align-self: auto; }
}

/* --------------------------------------------------------------------------
   3. The video: the demo's own thumbnail straight on the page. No card,
   border, padding, shadow or pebble. Rounded corners clipped on the video
   itself (isolation keeps the clip on the Vimeo player in Safari too).
   -------------------------------------------------------------------------- */
.sd-video { position: relative; isolation: isolate; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-video); overflow: hidden; background: var(--odro-navy); }
.sd-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; display: block; border-radius: var(--radius-video); }
.sd-play[hidden] { display: none; }
.sd-play picture, .sd-play img { display: block; width: 100%; height: 100%; }
.sd-play img { object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.sd-play:hover img { transform: scale(1.02); filter: brightness(1.05); }
/* Focus: a gold ring inside a navy edge, so it shows on any frame of the thumbnail */
.sd-play:focus-visible { outline: 3px solid var(--odro-gold); outline-offset: -7px; box-shadow: inset 0 0 0 4px var(--odro-navy); }
/* Length chip: small Deep Navy pill, gold play triangle, length in white */
.sd-len { position: absolute; right: var(--space-6); bottom: var(--space-6); display: inline-flex; align-items: center; gap: var(--space-2); background: color-mix(in srgb, var(--odro-navy) 86%, transparent); color: var(--odro-white); border-radius: var(--radius-pill); padding: 3px var(--space-5); font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--weight-bold); line-height: 1.5; pointer-events: none; }
.sd-len svg { flex: none; }
.sd-len path { fill: var(--odro-gold); }
.sd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (prefers-reduced-motion: reduce) { .sd-play img { transition: none; } .sd-play:hover img { transform: none; } }

/* --------------------------------------------------------------------------
   4. The form pop-up (native <dialog>): white card, 22px corners, soft
   shadow, about 460px wide, centred over a navy tint. One container per
   product (#form-capture, #form-vision, #form-assistcv) for the HubSpot
   embeds; until then scripts/speed-demos.js puts the stand-in form in the
   open product's container.
   -------------------------------------------------------------------------- */
.sd-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0; border-radius: var(--radius-card); background: var(--surface-card); color: var(--color-ink); box-shadow: var(--shadow-xl); overflow: auto; }
.sd-dialog::backdrop { background: color-mix(in srgb, var(--odro-navy) 62%, transparent); }
html:has(.sd-dialog[open]) { overflow: hidden; }   /* the page behind doesn't scroll */
.sd-dialog-card { position: relative; display: flex; flex-direction: column; gap: var(--space-6); padding: clamp(20px, 3vw, 28px); }
.sd-close { position: absolute; top: var(--space-5); right: var(--space-5); width: 44px; height: 44px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--color-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sd-close:hover { background: var(--surface-soft); }
.sd-close:focus-visible { outline: 3px solid var(--odro-deep-blue); outline-offset: 2px; }
.sd-dialog-logo { display: block; height: 28px; width: auto; max-width: calc(100% - 56px); object-fit: contain; object-position: left center; align-self: flex-start; }
.sd-dialog h2 { font-size: var(--text-h3); line-height: 1.15; letter-spacing: -0.02em; padding-right: var(--space-13); }
.sd-dialog-sub { margin: calc(var(--space-1) * -1) 0 0; }
.sd-note { margin: 0; font-size: var(--text-caption); font-weight: var(--weight-semibold); background: var(--surface-soft); border-radius: 10px; padding: var(--space-2) var(--space-4); }
.sd-note[hidden], .sd-form-slot[hidden] { display: none; }
.sd-form { display: flex; flex-direction: column; gap: var(--space-6); margin: 0; }
.sd-form .btn-gold { justify-content: center; font-size: 18px; min-height: 52px; border: 0; cursor: pointer; font-family: var(--font-body); }
.sd-form .field input[aria-invalid="true"] { border-color: var(--color-ink); }
.sd-privacy { margin: calc(var(--space-1) * -1) 0 0; font-size: 13px; line-height: 1.45; }
.sd-dialog .placeholder { white-space: normal; }
.sd-dialog a:focus-visible, .sd-form .btn-gold:focus-visible { outline: 3px solid var(--odro-deep-blue); outline-offset: 3px; }
.sd-dialog[open] { animation: odro-rise .3s ease-out both; }
.sd-dialog[open]::backdrop { animation: sd-fade .3s ease-out both; }
@keyframes sd-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sd-dialog[open], .sd-dialog[open]::backdrop { animation: none; } }
