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

/* Bluewater Pool Service's own marks inside its demo pages */
.bw-mark { display: block; flex: none; }
.bw-mark circle:first-child { fill: var(--c-steel); }
.bw-mark path { stroke: var(--c-white); }
.bw-mark__sun { fill: var(--c-white); }
.bw-stars { display: inline-flex; flex: none; color: var(--c-star); }
.bw-stars svg { display: block; }

/* #top: the words and the form box in the left column; on the right a collage of two framed photos, the phone in a hand
   in front (scene webphone on its screen, the photo turned 24° so the phone stands almost upright) and the laptop
   behind it with the same site at full width (the page's own HTML). Under 1220 px the phone's frame alone; under
   1024 px the words, the phone, then the form box. */
.web-top { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(calc(100svh - var(--header-h)), 900px); scroll-margin-top: var(--header-h); }
.web-top::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(44% 60% at 73% 50%, rgba(36, 91, 128, .5) 0%, rgba(36, 91, 128, 0) 72%), linear-gradient(180deg, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, .55) 100%); }
.web-top__in { display: grid; grid-template-columns: 460px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 56px; row-gap: clamp(18px, 3svh, 30px); padding-block: clamp(20px, 3.5svh, 48px); }
.web-top__words { grid-column: 1; grid-row: 1; align-self: end; }
.web-top__title { margin: 0; font-size: clamp(2.2rem, 1.2rem + 2.3vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.web-top__lead { margin: clamp(12px, 1.8svh, 18px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .88); text-wrap: pretty; }
.web-top__form { grid-column: 1; grid-row: 2; align-self: start; }
.web-top__pics { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; container-type: inline-size; aspect-ratio: 100 / 72; }
.web-top__laptop, .web-top__phone { position: absolute; overflow: hidden; container-type: inline-size; border-radius: var(--radius-l); background: var(--c-paper); isolation: isolate; }
.web-top__laptop { left: 38cqw; top: 14cqw; width: 62cqw; aspect-ratio: 3 / 2; box-shadow: 0 0 0 1px rgba(246, 251, 253, .1), var(--shadow-l); }
.web-top__phone { left: 0; top: 0; z-index: 2; width: 46cqw; aspect-ratio: 1 / 1.565; box-shadow: var(--glow-soft), var(--shadow-l); }
/* the laptop's photo, zoomed so its screen is as large as the frame allows */
.web-top__lz { position: absolute; left: -18.4cqw; top: -17.3cqw; width: 137.5cqw; aspect-ratio: 4699 / 3133; }
/* the phone's photo (square), the phone's centre at the frame's (50%, 47%), turned about it */
.web-top__pz { position: absolute; left: -69.8cqw; top: -19.5cqw; width: 212.8cqw; aspect-ratio: 1; transform-origin: 56.3% 43.9%; transform: rotate(-24deg); }
.web-top__lphoto, .web-top__pphoto { position: absolute; inset: 0; margin: 0; }
.web-top__lphoto > img, .web-top__pphoto > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.web-top__lphoto .screen, .web-top__pphoto .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; }
.web-top__pphoto .screen { border-radius: 20px; }
.web-top__pphoto .screen > [data-scene] { position: absolute; inset: 0; }
.web-top__stop { position: absolute; z-index: 6; left: calc(46cqw - 50px); top: 14px; }
@media (min-width: 1024px) and (max-height: 820px) {
  .web-top__form.formbox { padding: 18px 20px; }
  .web-top__form .tile { min-height: 62px; padding-block: 6px; }
  .web-top__form .tile__pic { height: 46px; }
  .web-top__form .formbox__q { margin-bottom: 10px; }
  .web-top__form .formbox__note { margin-top: 10px; }
  .web-top__title { font-size: clamp(2.1rem, 1rem + 2.1vw, 3rem); }
}
@media (max-width: 1279px) {
  .web-top__in { grid-template-columns: 440px minmax(0, 1fr); column-gap: 48px; }
}
@media (max-width: 1219px) {
  /* the phone's frame alone: the laptop's screen would be too small here to read */
  .web-top__laptop { display: none; }
  .web-top__pics { justify-self: center; width: min(100%, 344px); aspect-ratio: 1 / 1.565; }
  .web-top__phone { width: 100cqw; }
  .web-top__stop { left: auto; right: 14px; }
}
@media (max-width: 1023px) {
  .web-top { display: block; min-height: 0; }
  .web-top__in { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 22px; padding-block: 24px 32px; }
  .web-top__words, .web-top__form, .web-top__pics { grid-column: 1; grid-row: auto; align-self: auto; }
  .web-top__words { max-width: 760px; }
  .web-top__pics { width: min(100%, 320px); }
  .web-top__form { justify-self: center; width: 100%; max-width: 560px; }
}
@media (max-width: 760px) {
  .web-top__title { font-size: clamp(2rem, 1.2rem + 4vw, 2.6rem); }
  .web-top__lead { font-size: 1.04rem; }
  .web-top__pics { width: min(100%, 300px); }
}

/* #top, the laptop's page (design 280x176): Bluewater's new home page at full width, its "Call now" lit */
.lt { position: absolute; inset: 0; overflow: hidden; background: var(--c-white); color: var(--c-navy); font-family: var(--font-ui); }
.lt p { margin: 0; }
.lt__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 30px; padding: 0 9px 0 11px; box-shadow: inset 0 -1px 0 var(--c-paper-alt); }
.lt__logo { display: flex; align-items: center; gap: 5px; }
.lt__logo .bw-mark { width: 16px; height: 16px; }
.lt__logo b { font: 800 13px/1 var(--font-display); letter-spacing: -.02em; }
.lt__call { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 9px; border-radius: 10px; background: var(--c-accent); color: var(--c-ink); font: 700 13px/1 var(--font-ui); white-space: nowrap; box-shadow: 0 0 0 2px rgba(2, 228, 255, .45), 0 0 12px rgba(2, 228, 255, .6); }
.lt__call svg { width: 10px; height: 10px; }
.lt__hero { display: grid; grid-template-columns: 1fr 1fr; height: 146px; }
.lt__text { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 8px 0 12px; }
.lt .lt__count { margin-top: -3px; font: 500 13px/1 var(--font-ui); color: var(--c-text-on-paper); }
.lt__h { font: 800 16px/1.12 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.lt__rev { display: flex; align-items: center; gap: 4px; font: 600 13px/1 var(--font-ui); color: var(--c-text-on-paper); white-space: nowrap; }
.lt__rev .bw-stars svg { width: 9px; height: 9px; }
.lt__rev b { color: var(--c-navy); }
.lt__btns { display: flex; }
.lt__btn { display: inline-flex; align-items: center; height: 22px; padding: 0 11px; border-radius: 11px; background: var(--c-navy); color: var(--c-white); font: 700 13px/1 var(--font-ui); }
.lt__pic { position: relative; overflow: hidden; margin: 8px 8px 8px 0; border-radius: 8px; }
.lt__pic img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 38% 50%; }

/* #ba: Bluewater's home page on the tablet standing on the table; the switch turns the crowded page into the clear one,
   and the speed beside the tablet from 6.4 s to 1.3 s */
.web-ba__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; margin-bottom: var(--space-5); }
.web-ba__stage { height: 700px; overflow: clip; scroll-margin-top: calc(var(--header-h) + 16px); }
.web-ba__zoom { position: absolute; left: calc(50% - 702px); top: -74px; width: 1380px; aspect-ratio: 3 / 2; }
.web-ba__photo { position: absolute; inset: 0; margin: 0; }
.web-ba__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.web-ba__photo .screen { box-sizing: border-box; padding: 2px; background: var(--c-white) content-box; }
.web-ba__speed { position: absolute; z-index: 3; left: calc(50% + 236px); top: 30%; display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 18px 14px 14px; background: var(--glass-strong); }
.web-ba__gauge { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(246, 251, 253, .08); color: var(--c-alert-text); transition: color .5s var(--ease-out); }
.web-ba__gauge svg { width: 24px; height: 24px; }
.web-ba__sp { display: grid; grid-template-columns: auto; font-family: var(--font-ui); }
.web-ba__sp > span { font: 500 var(--fs-small)/1.2 var(--font-ui); color: var(--c-quiet); white-space: nowrap; }
.web-ba__sp > b { grid-row: 2; grid-column: 1; font: 800 1.6rem/1.1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; transition: opacity .5s var(--ease-out); }
.web-ba__slow { color: var(--c-alert-text); }
.web-ba__fast { color: var(--c-good); opacity: 0; }
.web-ba:has(.switch [value="after"]:checked) .web-ba__slow { opacity: 0; }
.web-ba:has(.switch [value="after"]:checked) .web-ba__fast { opacity: 1; }
.web-ba:has(.switch [value="after"]:checked) .web-ba__gauge { color: var(--c-good); }

/* the tablet's two pages (design 300x400) */
.tb-pair { position: absolute; inset: 0; overflow: hidden; background: var(--c-white); }
.tb { position: absolute; inset: 0; overflow: hidden; font-family: var(--font-ui); transition: opacity .55s var(--ease-out), transform .6s var(--ease-out); }
.tb p { margin: 0; }
.tb--after { opacity: 0; transform: scale(1.03); }
.web-ba:has(.switch [value="after"]:checked) .tb--before { opacity: 0; transform: scale(.98); }
.web-ba:has(.switch [value="after"]:checked) .tb--after { opacity: 1; transform: none; }
/* before: a crowded page from years ago */
.tb--before { background: var(--c-paper-alt); color: var(--c-text-on-paper); }
.tb__banner { display: grid; justify-items: center; gap: 3px; padding: 11px 8px 9px; background: var(--c-navy-2); color: var(--c-paper); text-align: center; }
.tb__banner b { font: 700 15px/1.1 var(--font-ui); letter-spacing: .09em; }
.tb__banner span { font: 400 12px/1.2 var(--font-ui); color: var(--c-paper-alt); }
.tb__links { padding: 7px 6px; background: var(--c-white); box-shadow: inset 0 -1px 0 var(--c-quiet); text-align: center; font: 400 12px/1.5 var(--font-ui); color: var(--c-quiet-on-paper); }
.tb__links u { color: var(--c-brand-text); text-underline-offset: 2px; }
.tb__welcome { padding: 13px 10px 7px; text-align: center; font: 700 17px/1.2 var(--font-ui); color: var(--c-navy-2); }
.tb__body { padding: 0 12px; font: 400 13px/1.45 var(--font-ui); }
.tb__body p { text-align: justify; }
.tb__thumb { position: relative; float: left; width: 92px; height: 64px; margin: 3px 9px 4px 0; overflow: hidden; border: 3px solid var(--c-white); box-shadow: 0 0 0 1px var(--c-quiet); }
.tb__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tb__more { padding: 9px 12px 0; font: 400 13px/1.3 var(--font-ui); color: var(--c-brand-text); text-decoration: underline; text-underline-offset: 2px; }
.tb__foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 8px; background: var(--c-navy-2); color: var(--c-paper-alt); text-align: center; font: 400 12px/1.2 var(--font-ui); }
/* after: the refreshed page, its two buttons on the first screen */
.tb--after { background: var(--c-white); color: var(--c-navy); }
.tb__nav { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 12px 0 14px; box-shadow: inset 0 -1px 0 var(--c-paper-alt); }
.tb__logo { display: flex; align-items: center; gap: 7px; }
.tb__logo .bw-mark { width: 22px; height: 22px; }
.tb__logo b { font: 800 17px/1 var(--font-display); letter-spacing: -.02em; }
.tb__call { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 15px; background: var(--c-accent); color: var(--c-ink); font: 700 14px/1 var(--font-ui); }
.tb__call svg { width: 13px; height: 13px; }
.tb__hero { position: relative; height: 166px; overflow: hidden; }
.tb__area { text-align: center; font: 500 13px/1.2 var(--font-ui); color: var(--c-quiet-on-paper); }
.tb__hero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; }
.tb__main { display: grid; gap: 11px; padding: 15px 16px 0; }
.tb__h { font: 800 23px/1.12 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.tb__rev { display: flex; align-items: center; gap: 6px; font: 600 14px/1 var(--font-ui); color: var(--c-text-on-paper); }
.tb__rev .bw-stars svg { width: 14px; height: 14px; }
.tb__rev b { color: var(--c-navy); }
.tb__btns { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; margin-top: 2px; }
.tb__btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 21px; font: 700 15px/1 var(--font-ui); white-space: nowrap; }
.tb__btn svg { width: 14px; height: 14px; }
.tb__btn--book { background: var(--c-navy); color: var(--c-white); }
.tb__btn--call { background: var(--c-accent); color: var(--c-ink); }
@media (min-width: 761px) and (max-width: 1023px) {
  .web-ba__speed { left: 16px; top: 16px; }
}
@media (max-width: 760px) {
  .web-ba__stage { height: 612px; }
  .web-ba__zoom { left: calc(50% - 542px); top: -64px; width: 1065px; }
  .web-ba__speed { left: 50%; top: auto; bottom: 14px; transform: translateX(-50%); padding: 10px 16px 10px 10px; }
  .web-ba__sp { grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; }
  .web-ba__sp > b { grid-row: 1; grid-column: 2; font-size: 1.3rem; }
}

/* #close: the technician at the pool (a photo, not footage: none shows the moment), the scene's card over its top left */
.web-close .close__clip img { object-position: 60% 50%; }
.web-close .close__scene { position: absolute; inset: 0; z-index: 2; }

/* #access: the older customer on his sofa reading his phone; beside him (under his face on narrow screens) the glass
   window of scene webaccess, his page enlarged with the accessibility toolbar across its top */
.web-acc__stage { height: 720px; margin-top: var(--space-5); scroll-margin-top: calc(var(--header-h) + 16px); }
.web-acc__photo { object-position: 50% 10%; }
.web-acc__stage .stage__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 10, 14, .42) 0%, rgba(4, 10, 14, .12) 38%, rgba(4, 10, 14, 0) 60%); }
.web-acc__scene { position: absolute; inset: 0; z-index: 2; }
.web-acc__stop { top: 14px; right: 14px; }
@media (max-width: 1239px) {
  .web-acc__stage { height: 760px; }
  .web-acc__photo { object-position: 0% 10%; }
}
@media (max-width: 899px) {
  .web-acc__stage { height: 960px; }
  .web-acc__photo { object-position: 64% 0%; }
  .web-acc__stage .stage__media::after { background: linear-gradient(180deg, rgba(4, 10, 14, 0) 30%, rgba(4, 10, 14, .38) 60%, rgba(4, 10, 14, .5) 100%); }
}
