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

/* #top: centered words over the aerial clip; under them, side by side, the form box and the living map card */
.loc-top { position: relative; padding: calc(var(--header-h) + clamp(18px, 3.6svh, 52px)) 0 clamp(24px, 3.4svh, 44px); background: var(--c-ink); overflow: hidden; }
.loc-top__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.loc-top__media video { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
/* one still grade: darker behind the words, lighter where the cards stand, into the page's ink at the foot */
.loc-top__media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .42) 34%, rgba(0, 0, 0, .3) 62%, rgba(0, 0, 0, .72) 90%, var(--c-ink) 100%); }
.loc-top__in { position: relative; z-index: 2; }
.loc-top__head { max-width: 840px; margin: 0 auto; text-align: center; }
.loc-top__title { margin: 0; font-size: min(clamp(2.2rem, 1.25rem + 2.5vw, 3.5rem), 7svh); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.loc-top__lead { max-width: 640px; margin: clamp(10px, 1.6svh, 16px) auto 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .88); text-wrap: pretty; }
.loc-top__row { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 28px; margin-top: clamp(18px, 3svh, 36px); align-items: stretch; }
.loc-top__pic { position: relative; min-height: 440px; }
.loc-top__map { position: absolute; inset: 0; }
.loc-top__stop { position: absolute; right: 12px; bottom: 12px; z-index: 3; }
.loc-top__credit { margin: 10px 2px 0; text-align: right; font-size: var(--fs-micro); color: rgba(169, 180, 186, .85); }
@media (max-width: 1100px) {
  .loc-top__row { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; }
}
/* up to 1220 px the map card is under 620 px wide: its list stands under the map, which needs the height */
@media (min-width: 901px) and (max-width: 1220px) {
  .loc-top__pic { min-height: 560px; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .loc-top__form.formbox { padding: 18px 20px; }
  .loc-top__form .tile { min-height: 62px; padding-block: 6px; }
  .loc-top__form .tile__pic { height: 46px; }
  .loc-top__form .formbox__q { margin-bottom: 10px; }
  .loc-top__form .formbox__note { margin-top: 10px; }
}
@media (min-width: 1221px) and (max-height: 820px) {
  .loc-top__pic { min-height: 400px; }
}
@media (max-width: 900px) {
  .loc-top { padding-top: calc(var(--header-h) + 20px); }
  .loc-top__title { font-size: clamp(2.05rem, 1.2rem + 4.2vw, 2.7rem); }
  .loc-top__lead { font-size: 1.02rem; }
  .loc-top__row { grid-template-columns: 1fr; gap: 18px; }
  .loc-top__pic { min-height: 0; height: clamp(540px, 148vw, 640px); }
  .loc-top__stop { top: 12px; bottom: auto; }
}

/* a picture's own address lands it whole under the fixed header */
#how-pic, #grid-pic, #seo-pic { scroll-margin-top: var(--header-h); }

/* #how: the practice's listing coming together over its front desk (scene lochow) */
.loc-how__head { margin-bottom: var(--space-5); }
.loc-how__stage { position: relative; aspect-ratio: 1240 / 680; overflow: hidden; }
.loc-how__photo { position: absolute; inset: 0; overflow: hidden; }
.loc-how__photo img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 30%; }
.loc-how__scene { position: absolute; inset: 0; z-index: 2; }
.loc-how__stop { position: absolute; right: 14px; top: 14px; z-index: 5; }
@media (max-width: 1100px) {
  .loc-how__stage { aspect-ratio: 950 / 700; }
  .loc-how__photo img { object-position: 62% 30%; }
}
@media (max-width: 760px) {
  .loc-how__stage { aspect-ratio: 358 / 820; }
  .loc-how__photo img { object-position: 64% 30%; }
}

/* #grid: the map rank from 49 spots around the practice, before and with SBOWiz (the switch), over a neighbor on his
   porch searching from his own street */
.loc-grid__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; margin-bottom: var(--space-5); }
.loc-grid__top .part__head { margin: 0; }
.loc-grid__pic { position: relative; }
.loc-grid__stage { position: relative; aspect-ratio: 1240 / 700; overflow: hidden; }
.loc-grid__photo { position: absolute; inset: 0; overflow: hidden; }
.loc-grid__photo img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 40%; }
.gd { position: absolute; right: 2.5%; bottom: 4%; z-index: 2; display: grid; grid-template-columns: 300px 1fr; gap: 18px; width: 540px; box-sizing: border-box; padding: 18px; background: var(--glass-strong); }
.gd p { margin: 0; }
.gd__head { grid-column: 2; grid-row: 1; align-self: start; }
.gd__title { font: 700 .95rem/1.3 var(--font-ui); color: var(--c-paper); }
.gd__fig { display: grid; gap: 4px; margin-top: 16px !important; }
.gd__fig b { position: relative; display: block; height: 3.2rem; font: 800 3.2rem/1 var(--font-display); letter-spacing: -.03em; color: var(--c-paper); }
.gd__fig > span { font: 500 .875rem/1.35 var(--font-ui); color: var(--c-quiet); }
.gd__grid { grid-column: 1; grid-row: 1 / span 2; position: relative; width: 300px; height: 300px; border-radius: var(--radius-m); overflow: hidden; background: var(--c-navy); box-shadow: inset 0 0 0 1px rgba(59, 129, 181, .4); }
.gd__map { position: absolute; inset: 0; width: 100%; height: 100%; }
.gd__minor { fill: none; stroke: rgba(59, 129, 181, .3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gd__mid { fill: none; stroke: rgba(59, 129, 181, .55); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.gd__major { fill: none; stroke: var(--c-steel); stroke-width: 3.2; vector-effect: non-scaling-stroke; }
.gd__dots { position: absolute; inset: 10px; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr); gap: 4px; }
.gd__dot { position: relative; display: block; }
.gd__dot > span { position: absolute; inset: 1px; display: grid; place-items: center; border-radius: 50%; font: 700 .8125rem/1 var(--font-ui); font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.gd--top { background: var(--c-brand); color: var(--c-ink); }
.gd--mid { background: color-mix(in srgb, var(--c-steel) 78%, var(--c-ink)); color: var(--c-white); }
.gd--far { background: var(--c-navy-2); color: var(--c-paper); box-shadow: inset 0 0 0 1px rgba(169, 180, 186, .35), 0 2px 6px rgba(0, 0, 0, .45) !important; }
.gd__dot .gd--top { box-shadow: 0 0 10px rgba(2, 228, 255, .55); }
/* the switch: each spot turns from the middle out, ring by ring */
.gd__a, .gd__b { transition: opacity .32s var(--ease-out), transform .32s var(--ease-out); transition-delay: calc(var(--ring, 0) * 90ms); }
.gd__a { opacity: 0; transform: scale(.6); }
.gd__fig .gd__b, .gd__fig .gd__a { position: absolute; left: 0; top: 0; }
.loc-grid:has(.switch [value="after"]:checked) .gd__b { opacity: 0; transform: scale(.6); }
.loc-grid:has(.switch [value="after"]:checked) .gd__a { opacity: 1; transform: none; }
.gd__fig .gd__a { color: var(--c-brand); }
.gd__legend { grid-column: 2; grid-row: 2; align-self: end; display: flex; flex-wrap: wrap; gap: 8px; }
.gd__key { display: inline-grid; place-items: center; min-width: 54px; height: 26px; padding: 0 8px; border-radius: var(--radius-pill); font: 700 .8125rem/1 var(--font-ui); }
.gd__unit { flex-basis: 100%; font: 500 .8125rem/1.35 var(--font-ui); color: var(--c-quiet); }
@media (prefers-reduced-motion: reduce) { .gd__a, .gd__b { transition: none; } }
@media (max-width: 1100px) {
  .loc-grid__stage { aspect-ratio: 16 / 9; }
  .gd { position: relative; right: auto; bottom: auto; margin: -64px auto 0; }
}
@media (max-width: 760px) {
  .loc-grid__stage { aspect-ratio: 358 / 260; }
  .loc-grid__photo img { object-position: 30% 20%; }
  .gd { grid-template-columns: 1fr; width: 100%; max-width: 380px; gap: 14px; padding: 14px; }
  .gd__head, .gd__legend { grid-column: 1; grid-row: auto; }
  .gd__grid { grid-column: 1; grid-row: auto; width: 100%; height: auto; aspect-ratio: 1; }
  .gd__fig { margin-top: 10px !important; }
}

/* #seo: the practice's page comes together on the laptop (scene locpage); the searches and its climb (scene locseo)
   stand on the ink beside the laptop's photo from 1241 px, under it below that, never on the photo */
.loc-seo__head { margin-bottom: var(--space-5); }
.loc-seo__pic { position: relative; }
.loc-seo__stage { position: relative; overflow: hidden; }
/* the photo fills its stage (cover): the stage's own shape draws the laptop large, so the photo's box is never wider
   than what shows, and the cards beside or under it never stand on it; only the phone zooms past the stage */
.loc-seo__zoom { position: absolute; inset: 0; }
.loc-seo__photo { position: absolute; inset: 0; margin: 0; }
.loc-seo__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.loc-seo__photo .screen > [data-scene] { position: absolute; inset: 0; }
.loc-seo__photo .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; }
.loc-seo__scene { pointer-events: none; }
.loc-seo__stop { position: absolute; z-index: 5; }
/* the laptop in a stage of 560 to 640 px in the middle (its screen 67% across), a card at least 265 px wide either side */
@media (min-width: 1241px) {
  .loc-seo__pic { --side: calc((100% - clamp(560px, 100% - 600px, 640px)) / 2); padding: 0 var(--side); }
  .loc-seo__stage { aspect-ratio: 640 / 560; }
  .loc-seo__photo > img { object-position: 57.6% 50%; }
  .loc-seo__scene { position: absolute; inset: 0; z-index: 2; }
  .loc-seo__stop { right: calc(var(--side) + 14px); bottom: 14px; }
}
/* up to 1240 px the laptop fills a stage of the full width, 4:3 up to 560 px tall, and the searches and the climb
   stand under it */
@media (max-width: 1240px) {
  .loc-seo__pic { container-type: inline-size; }
  .loc-seo__stage { height: min(560px, 75cqw); }
  .loc-seo__photo > img { object-position: 60.8% 28.7%; }
  .loc-seo__scene { position: relative; height: 300px; margin-top: 16px; }
  .loc-seo__stop { right: 14px; top: 14px; }
}
@media (max-width: 760px) {
  .loc-seo__stage { height: auto; aspect-ratio: 358 / 300; }
  .loc-seo__zoom { inset: auto; left: -66.2%; top: -2.5%; width: 220.7%; height: 105.7%; }
  .loc-seo__photo > img { object-position: 50% 50%; }
  .loc-seo__scene { height: 450px; margin-top: 14px; }
  .loc-seo__stop { top: 10px; right: 10px; }
}
