/* Search Box Optimization: the page's own layout (plan.md "Search Box Optimization"). Components and tokens from
   design\components.css and design\system.css; the scenes lay out their own panels and cards. */

/* #top: the mirrored laptop photo full bleed, the search on its screen (scene sbosearch), the words and the form box
   over the quiet wall on the right */
.sbo-top { position: relative; display: flex; align-items: center; min-height: min(100svh, 960px); padding: calc(var(--header-h) + clamp(16px, 3.4svh, 48px)) 0 clamp(32px, 5svh, 64px); background: var(--c-ink); overflow: hidden; }
.sbo-top__media { position: absolute; inset: 0; z-index: 0; }
/* the photo drawn a little larger, reaching past the left edge, so the laptop stands clear of the words */
.sbo-top__zoom { position: absolute; inset: -5% 0 -5% -10%; }
/* the photo is shown mirrored, so the laptop stands on the left and the wall's quiet side on the right; the search
   on its screen is turned back, so it reads */
.sbo-top__photo { position: absolute; inset: 0; margin: 0; transform: scaleX(-1); }
.sbo-top__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 40%; filter: brightness(.6) saturate(.8) contrast(1.05); }
.sbo-top__photo .screen > [data-scene] { position: absolute; inset: 0; transform: scaleX(-1); }
/* the screen's white ground (seen only in the loop's fade) stops 2 px inside the screen's soft edge: the glass is blank */
.sbo-top__photo .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; }
/* one still grade: the wall darkens toward the words on the right and toward the next part at the foot */
.sbo-top__media::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0) 54%, rgba(0, 0, 0, .55) 62%, rgba(0, 0, 0, .78) 100%), linear-gradient(180deg, rgba(0, 0, 0, 0) 78%, var(--c-ink) 100%); }
.sbo-top__stop { position: absolute; left: 9%; top: calc(20% - 10px); z-index: 4; } /* on the wall just above the screen's top left corner */
.sbo-top__grid { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); width: 100%; }
.sbo-top__words { grid-column: 2; }
.sbo-top__title { margin: 0; font-size: min(clamp(2.2rem, 1.25rem + 2.5vw, 3.5rem), 7.2svh); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.sbo-top__lead { max-width: 520px; margin: clamp(10px, 1.8svh, 18px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .86); text-wrap: pretty; }
.sbo-top__form { margin-top: clamp(14px, 2.6svh, 30px); }
@media (max-width: 1100px) {
  .sbo-top__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 450px); }
}
@media (min-width: 901px) and (max-height: 820px) {
  .sbo-top__form.formbox { padding: 18px 20px; }
  .sbo-top__form .tile { min-height: 62px; padding-block: 6px; }
  .sbo-top__form .tile__pic { height: 46px; }
  .sbo-top__form .formbox__q { margin-bottom: 10px; }
  .sbo-top__form .formbox__note { margin-top: 10px; }
}
/* a tablet and a phone: the laptop's screen drawn large in its own box under the site's header, the words under it */
@media (max-width: 900px) {
  .sbo-top { display: block; min-height: 0; padding-top: calc(var(--header-h) + 12px); }
  .sbo-top__media { position: relative; inset: auto; height: auto; aspect-ratio: 358 / 290; margin: 0 var(--gutter) 22px; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--glow-soft), var(--shadow-l); }
  .sbo-top__media::after { background: none; }
  .sbo-top__zoom { inset: auto; left: -43.9%; top: -45.7%; width: 267.6%; height: 220.2%; }
  .sbo-top__photo > img { object-position: 50% 50%; }
  .sbo-top__stop { left: 10px; top: 10px; }
  .sbo-top__grid { grid-template-columns: 1fr; }
  .sbo-top__words { grid-column: 1; }
  .sbo-top__title { font-size: clamp(2.05rem, 1.2rem + 4.2vw, 2.7rem); }
  .sbo-top__lead { margin-top: 12px; font-size: 1.02rem; }
}

/* #ba: the same search before and after, over the roofers photo split down the middle (scene sboba) */
.sbo-ba__head { margin-bottom: var(--space-5); }
.sbo-ba__stage { position: relative; aspect-ratio: 1240 / 720; overflow: hidden; }
.sbo-ba__zoom { position: absolute; left: -0.4%; top: -5%; width: 114.5%; height: 110.1%; }
.sbo-ba__photo { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.sbo-ba__scene { position: absolute; inset: 0; z-index: 2; }
.sbo-ba__stop { position: absolute; right: 14px; top: 14px; z-index: 5; }
@media (max-width: 1100px) {
  .sbo-ba__stage { aspect-ratio: 1240 / 760; }
  .sbo-ba__zoom { left: -5%; top: -4%; width: 125%; height: 108.1%; }
}
@media (max-width: 760px) {
  .sbo-ba__stage { aspect-ratio: 358 / 620; }
  .sbo-ba__zoom { left: -182.4%; top: -0.65%; width: 304%; height: 101.3%; }
  .sbo-ba__stop { right: 10px; top: 10px; }
}

/* #towns: the Folsom area's streets as a map card over the aerial clip, the search card beside it (scene sbotowns) */
.sbo-towns__head { margin-bottom: var(--space-5); }
.sbo-towns__stage { position: relative; aspect-ratio: 1240 / 700; overflow: hidden; }
.sbo-towns__stage .stage__media video { object-position: 50% 50%; }
.sbo-towns__stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .08) 42%, rgba(0, 0, 0, .22)); }
.sbo-towns__scene { position: absolute; inset: 0; z-index: 2; }
.sbo-towns__stop { position: absolute; left: 14px; bottom: 14px; z-index: 5; }
.sbo-towns__credit { margin: 10px 0 0; font-size: var(--fs-micro); color: var(--c-quiet); text-align: right; }
@media (max-width: 1100px) {
  .sbo-towns__stage { aspect-ratio: 1240 / 760; }
}
@media (max-width: 760px) {
  .sbo-towns__stage { aspect-ratio: 358 / 600; }
  .sbo-towns__stage::after { background: rgba(0, 0, 0, .28); }
  .sbo-towns__stop { left: calc(3% + 10px); top: 22px; bottom: auto; }
}
