/* Home page only: Charleston pinned behind the whole page, the words on frosted panels over it.
   Everything here is scoped to body.home-photo or to hp-* classes. The header, footer and colors it shares
   with the inner pages are in photo-chrome.css.
   Readability for a 55+ audience: nothing a customer reads is under 16px, and white text always sits on
   a dark shade or a dark panel, never on bare photo. */

/* ---------- the photo ---------- */
.hp-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; isolation: isolate; }
.hp-photo-dusk  { --hp-origin: 58% 92%; --hp-pos: 55% 45%; --hp-pos-phone: 64% 50%; --hp-sun-x: 22%; --hp-sun-y: 40%; --hp-sky-cut: 26%; }
.hp-pan { position: absolute; inset: 0; z-index: -2; }
/* the camera: scrolling zooms in toward the rooftops */
.hp-cam { position: absolute; inset: 0; transform-origin: var(--hp-origin); will-change: transform; }
.hp-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hp-pos); }
.hp-sky { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 var(--hp-sky-cut), transparent calc(var(--hp-sky-cut) + 5%));
  mask-image: linear-gradient(180deg, #000 0%, #000 var(--hp-sky-cut), transparent calc(var(--hp-sky-cut) + 5%));
  animation: hp-drift 26s ease-in-out infinite alternate; }
@keyframes hp-drift { from { transform: translateX(1.3%) scaleX(1.03); } to { transform: translateX(-1.3%) scaleX(1.03); } }
.hp-pan { animation: hp-breathe 30s ease-in-out infinite alternate; }
@keyframes hp-breathe { from { transform: scale(1); } to { transform: scale(1.035) translateY(-.6%); } }
.hp-rays { position: absolute; z-index: 1; left: var(--hp-sun-x); top: var(--hp-sun-y); width: 120vmax; height: 120vmax; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,150,.10) 0deg 3deg, rgba(255,214,150,0) 3deg 11deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 18%, transparent 46%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 18%, transparent 46%);
  mix-blend-mode: screen; pointer-events: none; animation: hp-turn 90s linear infinite, hp-shimmer 7s ease-in-out infinite alternate; }
@keyframes hp-turn { to { rotate: 360deg; } }
@keyframes hp-shimmer { from { filter: brightness(.7); } to { filter: brightness(1.25); } }
.hp-sun { position: absolute; z-index: 1; left: var(--hp-sun-x); top: var(--hp-sun-y); width: 60vmax; height: 60vmax; translate: -50% -50%;
  background: radial-gradient(circle, rgba(255,200,130,.35) 0%, rgba(255,170,90,.12) 30%, rgba(255,160,80,0) 60%);
  pointer-events: none; mix-blend-mode: screen; }
/* the shade that keeps white words readable over a bright photo */
.hp-scrim { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,18,32,.82) 0%, rgba(10,18,32,.58) 38%, rgba(10,18,32,0) 68%),
    linear-gradient(0deg, rgba(10,18,32,.62) 0%, rgba(10,18,32,0) 45%),
    linear-gradient(180deg, rgba(10,18,32,.55) 0%, rgba(10,18,32,0) 24%); }
/* darker as you scroll, under the panels */
.hp-dusk { position: absolute; inset: 0; z-index: -1; background: #0a1220; opacity: 0; pointer-events: none; }

/* the thin rounded frame around the first screen */
.hp-frame { position: absolute; z-index: 2; left: var(--hp-gutter); right: var(--hp-gutter); top: var(--hp-gutter);
  height: calc(100svh - 2 * var(--hp-gutter)); pointer-events: none; }
.hp-frame svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hp-frame rect { fill: none; stroke: rgba(255,255,255,.62); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* ---------- the first screen ---------- */
.home-photo section { padding-block: 0; }
.home-photo .hp-hero { position: relative; min-height: 100svh; display: grid; align-items: end;
  padding: calc(var(--hp-gutter) + var(--hp-pad) + 72px) calc(var(--hp-gutter) + var(--hp-pad)) calc(var(--hp-gutter) + clamp(20px, 3.4vh, 52px)); }
.hp-main { display: grid; grid-template-columns: minmax(0, 1fr) min(380px, 100%); align-items: end; gap: 40px; }   /* a fixed card column: an "auto" one sized itself from the card's unwrapped text */
.hp-copy { display: grid; gap: clamp(18px, 3.4vh, 48px); }
.hp-headline { max-width: 15ch; margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(44px, min(7.4vw, 10.4vh), 112px); line-height: .98; text-wrap: initial; }
.hp-headline span { display: block; }
.hp-headline .hp-soft { color: rgba(255,255,255,.82); font-weight: 300; }
.hp-sub { margin: clamp(10px, 1.6vh, 18px) 0 0; font-size: clamp(20px, 1.9vw, 26px); color: rgba(255,255,255,.94); }
.hp-blurb { max-width: 34ch; font-size: 18px; line-height: 1.5; color: rgba(255,255,255,.92); margin: 0; }

/* the frosted "Get an offer" card */
.hp-card { width: 100%; padding: 24px; border-radius: 20px; display: grid;
  background: rgba(16,28,46,.55); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 20px 60px rgba(5,10,20,.35); }
.hp-card h2 { margin: 0 0 4px; font: 400 24px/1.2 var(--f-display); }
.hp-card .hp-lead { margin: 0 0 18px; color: rgba(255,255,255,.88); font-size: 16px; }
.hp-card-text { margin: 0 0 20px; font-size: 17px; line-height: 1.5; color: rgba(255,255,255,.92); }
.hp-go { width: 100%; min-height: 52px; font-size: 18px; font-family: var(--f-body); font-weight: 600; }
.hp-call { margin: 14px 0 0; text-align: center; font-size: 16px; color: rgba(255,255,255,.9); }
.hp-call a, .hp-row a.tel { color: #fff; font-weight: 500; white-space: nowrap; }

/* the counter shown while the frame draws itself */
.hp-count { position: absolute; left: calc(var(--hp-gutter) + var(--hp-pad)); bottom: calc(var(--hp-gutter) + var(--hp-pad) - 8px);
  font-size: clamp(56px, 8vw, 104px); font-weight: 300; letter-spacing: -.03em; color: rgba(255,255,255,.7);
  font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none; }

/* ---------- the opening (only when the little script in the page head turned it on) ---------- */
.hp-intro .hp-reveal { opacity: 0; transform: translateY(18px); }
.hp-intro .hp-pan { filter: brightness(.42) saturate(.15) contrast(1.05); transform: scale(1.06); animation: none; }
.hp-intro .hp-rays, .hp-intro .hp-sun { opacity: 0; }
.hp-played .hp-reveal { transition: opacity .9s var(--hp-ease), transform .9s var(--hp-ease); transition-delay: var(--d, 0s); }
.hp-played .hp-pan { transition: filter 1.6s var(--hp-ease), transform 2.4s var(--hp-ease); }
.hp-intro.hp-sunrise .hp-pan { filter: none; transform: scale(1); }
.hp-intro.hp-sunrise .hp-rays { opacity: 1; transition: opacity 2.4s var(--hp-ease); }
.hp-intro.hp-sunrise .hp-sun { opacity: 1; transition: opacity 1.8s var(--hp-ease); }
.hp-intro.hp-done .hp-reveal { opacity: 1; transform: none; }
.hp-intro.hp-done .hp-pan { animation: hp-breathe 30s ease-in-out infinite alternate; }

/* ---------- the rest of the page, over the moving city ---------- */
.hp-wrap { width: min(1180px, 100% - 2 * var(--hp-gutter) - 2 * var(--hp-pad)); margin-inline: auto; }
.hp-sec { padding-block: clamp(64px, 12vh, 140px) !important; }
.hp-head { max-width: 46rem; margin-bottom: 32px; }
.hp-eyebrow { margin: 0 0 10px; font-size: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--hp-gold); }
.hp-sec h2 { margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -.015em; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.05; }
.hp-lede { font-size: 19px; line-height: 1.5; color: rgba(255,255,255,.9); margin: 16px 0 0; max-width: 40rem; }
.hp-grid4, .hp-grid3 { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.hp-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-grid5 { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hp-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-panel { padding: 22px; border-radius: 18px; background: rgba(12,22,38,.66); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); display: grid; gap: 8px; align-content: start; }
.hp-panel h3, .hp-panel strong { margin: 0; font: 400 20px/1.3 var(--f-display); }
.hp-panel p, .hp-panel span { margin: 0; color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.5; }
.hp-buy { text-decoration: none; color: #fff; transition: border-color .15s ease, background-color .15s ease; }
.hp-buy:hover { border-color: var(--hp-gold); background: rgba(12,22,38,.78); }
.hp-steps { counter-reset: hp-st; }
.hp-steps li { counter-increment: hp-st; }
/* the last step, getting paid, is the one people are here for: a gold edge */
.hp-steps li:last-child { border-color: rgba(242,181,107,.7); background: linear-gradient(180deg, rgba(242,181,107,.16), rgba(12,22,38,.7)); }
.hp-steps li::before { content: counter(hp-st); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(242,181,107,.22); color: var(--hp-gold); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.hp-more { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 24px 0 0; font-size: 18px; }
.hp-more a { color: #fff; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: underline; text-decoration-color: var(--hp-gold); text-underline-offset: 5px; }
.hp-big { padding: clamp(28px, 4vw, 56px); text-align: center; justify-items: center; gap: 16px; }
.hp-big h2 { max-width: 22ch; font-size: clamp(30px, 3.6vw, 48px) !important; }
.hp-big p { max-width: 46ch; font-size: 19px; }
.hp-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: center; margin-top: 8px; font-size: 18px; }
.hp-row .hp-go { width: auto; padding: 0 30px; }

/* panels rise into place as they scroll into view (home.js adds hp-js; without it they're simply there) */
@media (prefers-reduced-motion: no-preference) {
  .hp-js .hp-rise:not(.hp-seen) { opacity: 0; transform: translateY(26px); }
  .hp-js .hp-rise { transition: opacity .8s var(--hp-ease), transform .8s var(--hp-ease); }
}

/* ---------- phones and tablets ---------- */
@media (max-width: 1100px) { .hp-grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .hp-grid4, .hp-grid3, .hp-grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hp-main { grid-template-columns: 1fr; }
  .hp-card { width: 100%; padding: 20px; }
  .hp-cam img { object-position: var(--hp-pos-phone); }
  .hp-rays, .hp-sun { top: 33%; }
  /* the words run full width over the rooftops, so the whole picture is shaded more evenly */
  .hp-scrim { background: linear-gradient(180deg, rgba(10,18,32,.5) 0%, rgba(10,18,32,.72) 40%, rgba(10,18,32,.8) 100%); }
  .hp-hero .hp-copy { text-shadow: 0 1px 12px rgba(0,0,0,.55); }
  .hp-panel, .hp-card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
@media (max-width: 600px) { .hp-grid4, .hp-grid3, .hp-grid5 { grid-template-columns: 1fr; } }

/* "Reduce motion": the same photo, standing still */
@media (prefers-reduced-motion: reduce) {
  .hp-cam { transform: none !important; }
  .hp-sky, .hp-pan, .hp-rays { animation: none !important; }
}
