/* Home page. Scenes are driven by js/home.js, which sets --p (0..1) on each [data-scene] and adds .is-pinned when the
   screen is big enough to pin. Without JS (or with reduced motion) everything shows as a normal page. */

/* ---------- 1. hero: the inspection ---------- */
.hero { position: relative; background: radial-gradient(120% 90% at 78% 62%, #183470 0%, #0B1B3F 42%, #060E24 78%); }
.hero__pin { position: relative; padding: clamp(36px, 6vw, 72px) 0 56px; overflow: clip; }
.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fff; transform: scale(var(--s, 1)); opacity: .7; animation: twinkle 3.2s ease-in-out infinite; animation-delay: calc(var(--y) * 0.1s); }
@keyframes twinkle { 50% { opacity: .15; } }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__title { font-size: clamp(44px, 4.7vw, 74px); margin: 0 0 22px; }
.hero__title .slant { display: block; width: fit-content; }
.hero__lead { color: #D6DEF0; margin-bottom: 30px; }
.hero__facts { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: #C9D3EA; font-size: 15px; }
.hero__facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero__facts b { color: #fff; }
.hero__facts .stars svg { width: 17px; height: 17px; }

.stage { position: relative; margin: 0; }
.stage__svg { width: 100%; height: auto; overflow: visible; }
.stage .rays { opacity: 0; transform-origin: 320px 330px; }
.stage .rays__bg { fill: #F6B70C; }
.stage .rays__spin path { fill: #FFE27A; }
.stage .glow { opacity: .55; }
.stage .shield, .stage .shield2 { opacity: 0; }
.js .stage .shield, .js .stage .shield2 { opacity: 1; }
.stage .wins rect[fill^="url"], .stage .gable-win rect[fill^="url"] { animation: win-flicker 7s infinite; }
@keyframes win-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: .82; } 50% { opacity: 1; } }
.stage .porch { filter: drop-shadow(0 0 8px #FFE08A); }
.lens { pointer-events: none; }
.lens__body { transition: none; }
.stage__caps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.cap {
  grid-area: 1 / 1; align-self: start; padding: 14px 18px 14px 20px; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0;
  background: rgba(6, 14, 36, .72); color: #DDE4F5; font-size: 16px; line-height: 1.45;
  opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.cap b { color: var(--gold); font-family: var(--f-display); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.cap.is-on { opacity: 1; transform: none; }
.no-js-caps .cap, html:not(.js) .cap { position: static; opacity: 1; transform: none; grid-area: auto; margin-bottom: 8px; }

.hero__cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #AEB9D6; text-decoration: none; font: 800 11px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase;
}
.hero__cue i { width: 2px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* pinned (big screens): the copy and the house stay put while the inspection plays */
.hero.is-pinned { height: 330vh; }
.hero.is-pinned .hero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--head-h) + 10px) 0 40px; display: flex; align-items: center; }
.hero.is-pinned .hero__grid { width: min(var(--max), 100% - var(--gut) * 2); }
.hero.is-pinned .stage__svg { max-height: calc(100svh - var(--head-h) - 150px); width: auto; margin-inline: auto; }
.hero.is-pinned .hero__cue { opacity: calc(1 - var(--p, 0) * 12); }

@media (max-width: 999px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__pin { padding-bottom: 32px; }
  .stage { max-width: 560px; margin: 8px auto 0; width: 100%; }
  .hero__cue { display: none; }
}
.stage-spacer { display: none; }
/* phones and tablets: the house holds still under the header while the inspection plays */
.hero.is-phonepin .stage { position: sticky; top: calc(var(--head-h) + 8px); align-self: start; }
.hero.is-phonepin .stage-spacer { display: block; height: 115vh; height: 115svh; }
@media (max-width: 560px) {
  .hero__title { font-size: clamp(36px, 10.2vw, 56px); }
  .hero .btns .btn { flex: 1 1 100%; }
  .hero__facts { gap: 8px 18px; font-size: 14px; }
  .cap { font-size: 15px; }
}

/* ---------- 2. marquee ---------- */
.marquee { overflow: hidden; border-block: 3px solid var(--navy); position: relative; z-index: 2; }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee span {
  display: inline-flex; align-items: center; gap: 22px; padding: 16px 0 16px 22px; white-space: nowrap;
  font: 900 clamp(18px, 2vw, 24px)/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; transform: skewX(-8deg);
}
.marquee span::after {
  content: ""; width: 18px; height: 20px; background: var(--navy);
  clip-path: polygon(50% 0, 100% 18%, 100% 55%, 50% 100%, 0 55%, 0 18%);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 3. services ---------- */
.services { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.services__head { margin-bottom: clamp(26px, 4vw, 44px); }
.services__head .lead { max-width: 62ch; }
.track { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 26px 0 30px; }
.track::-webkit-scrollbar { display: none; }
.track__rail { display: flex; gap: clamp(16px, 2vw, 28px); padding-inline: max(var(--gut), (100vw - var(--max)) / 2); width: max-content; }
.svc {
  position: relative; flex: 0 0 min(360px, 82vw); scroll-snap-align: center; display: flex; flex-direction: column;
  background: #fff; border-radius: 24px; padding: 128px 28px 28px; box-shadow: 0 1px 0 var(--line), var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.svc:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 1px 0 var(--line), 0 30px 50px -24px rgba(6, 14, 36, .55); }
.svc__bug { position: absolute; left: 20px; top: 14px; width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(circle, #FFF4D2 0 55%, transparent 56%), var(--gold); transition: transform .5s var(--ease); }
.svc:hover .svc__bug { transform: rotate(-18deg) scale(1.06); }
.svc__num { position: absolute; right: 24px; top: 22px; margin: 0; font: 900 64px/1 var(--f-display); color: transparent; -webkit-text-stroke: 2px rgba(11, 27, 63, .16); transform: skewX(-8deg); }
.svc h3 { font-size: 26px; text-transform: uppercase; transform: skewX(-6deg); margin-bottom: 12px; }
.svc h3 a { text-decoration: none; }
.svc h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.svc p { color: var(--muted); }
.svc .checks { margin: 6px 0 20px; font-size: 15px; }
.svc__more { margin-top: auto; position: relative; z-index: 1; font: 900 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; color: var(--navy); text-decoration: none; }
.svc__more span { display: inline-block; transition: transform .3s var(--ease); }
.svc:hover .svc__more span { transform: translateX(6px); }
.svc__price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.svc__price b { font: 900 54px/1 var(--f-display); color: var(--navy); transform: skewX(-8deg); display: inline-block; }
.svc__price span { font-weight: 700; color: var(--muted); }
.svc--end { padding-top: 34px; justify-content: center; }
.svc--end p { color: var(--muted-on-navy); }
.svc__endtitle { font-size: 36px !important; color: #fff; margin-bottom: 14px !important; }
.svc--end .btns { margin-top: 12px; position: relative; z-index: 1; }

.services.is-pinned { padding: 0; }
.services.is-pinned .services__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: var(--head-h); }
.services.is-pinned .track { overflow: visible; scroll-snap-type: none; }
.services.is-pinned .track__rail { transform: translate3d(var(--tx, 0px), 0, 0); will-change: transform; }
.services.is-pinned .svc { flex-basis: 380px; }
.track-hint { display: none; }
@media (max-width: 999px) {
  .services__head::after { content: "Swipe to see more \2192"; display: block; margin-top: 14px; font: 800 12px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-edge); }
}

/* ---------- 4. field guide ---------- */
.guide__hint { color: var(--navy); font-weight: 700; }
.board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(16px, 2vw, 26px); }
@media (max-width: 600px) { .board { grid-template-columns: 1fr 1fr; gap: 14px; } .pin { padding: 14px 12px 16px; } .pin h3 { font-size: 15px; } .pin p { font-size: 13px; } }
.pin {
  position: relative; background: #fffdf7; border-radius: 6px; padding: 18px 20px 22px; text-align: center;
  box-shadow: 0 1px 0 rgba(11, 27, 63, .1), 0 16px 30px -22px rgba(6, 14, 36, .55);
  transform: rotate(var(--tilt, 0deg)); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pin:nth-child(3n+1) { --tilt: -1.2deg; } .pin:nth-child(3n+2) { --tilt: .8deg; } .pin:nth-child(4n) { --tilt: -.4deg; }
.pin::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE08A, #F6B70C 45%, #B98500); box-shadow: 0 4px 6px -2px rgba(0, 0, 0, .45); z-index: 2; }
.pin:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 1px 0 rgba(11, 27, 63, .1), 0 26px 40px -24px rgba(6, 14, 36, .6); }
.pin__btn { display: block; width: min(150px, 70%); margin: 4px auto 10px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; position: relative; }
.pin__btn::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 1.5px dashed rgba(11, 27, 63, .22); transition: border-color .3s, transform .6s var(--ease); }
.pin:hover .pin__btn::before { border-color: var(--gold-edge); transform: rotate(45deg); }
.pin__btn .spec { transition: transform .4s var(--ease), opacity .4s; }
.pin:hover .pin__btn .spec { animation: wiggle .5s ease-in-out infinite alternate; }
.pin__btn.is-out .spec { opacity: 0; transform: scale(.6); }
@keyframes wiggle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.pin h3 { font-size: 19px; text-transform: uppercase; margin-bottom: 6px; }
.pin p { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin: 0; }
.guide__note { text-align: center; margin: 40px auto 0; max-width: 60ch; color: var(--muted); }
.guide__note b { color: var(--navy); }

/* ---------- 5. how it works ---------- */
.how__steps { position: relative; }
.how__steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 3vw, 40px); position: relative; z-index: 1; }
.step { position: relative; }
.step__dot {
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; margin-bottom: 22px;
  background: var(--navy); border: 3px solid var(--gold); color: var(--gold); font: 900 30px/1 var(--f-display);
  box-shadow: 0 0 0 8px var(--navy); transition: background .4s, color .4s, transform .4s var(--ease);
}
.step.is-hit .step__dot { background: var(--gold); color: var(--navy); transform: scale(1.08); }
.step__dot--shield { background: transparent; border: 0; box-shadow: none; }
.step__dot--shield svg { width: 64px; height: 70px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.step.is-hit .step__dot--shield { background: transparent; animation: shield-pop .6s var(--ease); }
@keyframes shield-pop { 40% { transform: scale(1.25) rotate(-8deg); } }
.step h3 { font-size: 22px; text-transform: uppercase; margin-bottom: 8px; }
.step p { color: var(--muted-on-navy); margin: 0; }
.how__trail, .how__antcv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.how__antcv { z-index: 2; }
.how__path { stroke: rgba(246, 183, 12, .35); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.how__done { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
@media (max-width: 860px) {
  .how__steps ol { grid-template-columns: 1fr; gap: 34px; }
  .step { padding-left: 96px; min-height: 74px; }
  .step__dot { position: absolute; left: 0; top: 0; margin: 0; }
}

/* ---------- 6. family ---------- */
.family { padding: clamp(80px, 10vw, 150px) 0; overflow: hidden; }
.family__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.family__photos { position: relative; min-height: 560px; }
.photo { position: absolute; margin: 0; background: #fff; padding: 12px 12px 44px; box-shadow: 0 30px 50px -24px rgba(6, 14, 36, .55); }
.photo img { width: 100%; height: auto; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font: 800 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.photo--a { width: 64%; left: 0; top: 0; transform: translateY(calc(var(--py, 0) * -30px)) rotate(-4deg); }
.photo--b { width: 50%; right: 2%; top: 30%; transform: translateY(calc(var(--py, 0) * 40px)) rotate(5deg); }
.family__stamp {
  position: absolute; left: 52%; top: 4%; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: var(--gold); color: var(--navy); border: 4px solid var(--navy); box-shadow: 0 0 0 6px var(--gold), 0 14px 24px -8px rgba(0, 0, 0, .5);
  font-family: var(--f-display); line-height: .95; transform: rotate(calc(-14deg + var(--py, 0) * 30deg)); z-index: 2;
}
.family__stamp b:first-child { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.family__stamp b:last-child { font-size: 34px; }
.family__copy p { max-width: 58ch; }
.family__sign { font: 900 clamp(20px, 2.2vw, 26px)/1.2 var(--f-display); text-transform: uppercase; color: var(--navy); margin: 26px 0 28px; }
@media (max-width: 899px) {
  .family__grid { grid-template-columns: 1fr; }
  .family__photos { min-height: 0; aspect-ratio: 1 / 1.02; max-width: 520px; width: 100%; margin: 0 auto; }
}

/* ---------- 7. reviews ---------- */
.reviews { background: radial-gradient(90% 80% at 15% 10%, #13295C 0%, #060E24 60%); overflow: hidden; }
.reviews__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 26px; margin-bottom: clamp(36px, 5vw, 60px); }
.score { display: grid; justify-items: end; gap: 6px; }
.score__num { font: 900 clamp(64px, 8vw, 110px)/.85 var(--f-display); color: var(--gold); transform: skewX(-8deg); }
.stars--big svg { width: 28px; height: 28px; }
.score__src { color: var(--muted-on-navy); font-weight: 700; }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.quote { position: relative; margin: 0; padding: 34px 30px 26px; border-radius: 20px; background: #fff; color: var(--ink); transform: rotate(var(--r, 0deg)); transition: transform .4s var(--ease); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .8); }
.js .quote.rv { transform: translateY(40px) rotate(calc(var(--r, 0deg) * 3)); }
.js .quote.rv.in { transform: rotate(var(--r, 0deg)); }
.quote:hover, .js .quote.rv.in:hover { transform: rotate(0) scale(1.02); }
.quote::before { content: "\201C"; position: absolute; top: -26px; left: 22px; font: 900 96px/1 var(--f-display); color: var(--gold); }
.quote blockquote { margin: 0; font-size: 17.5px; line-height: 1.55; }
.quote figcaption { display: grid; margin-top: 16px; font-size: 14px; color: var(--muted); }
.quote figcaption b { color: var(--navy); font-family: var(--f-display); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.reviews__more { margin: 40px 0 0; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } .score { justify-items: start; } }

/* ---------- 9. FAQ ---------- */
.faqs .faq { margin-inline: 0; }

/* ---------- 10. the end ---------- */
.final { position: relative; overflow: hidden; padding: clamp(90px, 11vw, 160px) 0 0; background: linear-gradient(#060E24, #0B1B3F 70%, #081530); }
.final__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: end; }
.final__copy { padding-bottom: clamp(70px, 9vw, 130px); position: relative; z-index: 2; }
.final__title { font-size: clamp(44px, 6vw, 88px); margin-bottom: 30px; }
.final__title .slant { display: block; width: fit-content; }
.final__info { margin: 34px 0 0; display: grid; gap: 14px; }
.final__info div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.final__info dt { font: 900 13px/1.6 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.final__info dd { margin: 0; color: #DCE3F3; }
.final__house svg { width: 100%; height: auto; }
.final__porch { animation: porch 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes porch { 50% { opacity: .75; transform: scale(.94); } }
.final__flies { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fly { position: absolute; left: var(--x); top: var(--y); width: 6px; height: 6px; border-radius: 50%; background: #FFF3B0; box-shadow: 0 0 10px 3px rgba(255, 214, 80, .75); opacity: 0; animation: fly-move var(--t, 9s) ease-in-out infinite alternate, fly-blink var(--b, 2.6s) ease-in-out infinite; animation-delay: var(--dl, 0s), var(--dl, 0s); }
@keyframes fly-move { to { transform: translate(var(--dx, 40px), var(--dy, -30px)); } }
@keyframes fly-blink { 0%, 100% { opacity: 0; } 45%, 60% { opacity: 1; } }
.final:not(.is-live) .fly { animation-play-state: paused; }
@media (max-width: 899px) {
  .final__grid { grid-template-columns: 1fr; }
  .final__copy { padding-bottom: 10px; }
  .final__house { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* small extras */
.stage .rays__spin { transform-origin: 320px 300px; animation: rays-spin 60s linear infinite; }
@keyframes rays-spin { to { transform: rotate(360deg); } }
.js .svc.rv.in:hover { transform: translateY(-6px) rotate(-.6deg); }
.pin__btn.is-shake .spec { animation: wiggle .1s linear 5 alternate; }
.svc.svc--end { background: var(--navy); color: #fff; }
.area__map { position: relative; padding: clamp(10px, 2vw, 24px); border-radius: 26px; background: radial-gradient(circle at 76% 56%, rgba(246, 183, 12, .12), transparent 55%), radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0 / 22px 22px, #0A1838; box-shadow: inset 0 0 0 1px var(--line-on-navy); }
.hero:not(.is-pinned) .hero__cue { display: none; }
