/* KayHomes: motion layer ("alive" feel). Everything here is calm when the visitor prefers reduced motion. */

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero touches ---------- */
.live-pill { display: inline-flex; align-items: center; gap: 10px; }
.live-pill .pulse { width: 9px; height: 9px; border-radius: 50%; background: #8DB600; box-shadow: 0 0 0 0 rgba(141,182,0,.6); animation: pulse 2s 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(141,182,0,.55); } 70% { box-shadow: 0 0 0 12px rgba(141,182,0,0); } 100% { box-shadow: 0 0 0 0 rgba(141,182,0,0); } }
.hero-glow { position: absolute; top: -20%; right: -10%; width: 60vw; max-width: 760px; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(245,169,184,.18), rgba(141,182,0,.06) 60%, transparent); filter: blur(10px); animation: drift 4s ease-out 1 forwards; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-6%, 8%) scale(1.08); } }

/* ---------- scroll story ---------- */
.story { position: relative; height: 340vh; border-top: 1.5px solid #2a2d2b; }
.story-pin { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; min-height: 620px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.story-inner > * { min-width: 0; }
.story-inner { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.story .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 1.2px; color: #F5A9B8; }
.story-title { margin: 12px 0 24px; font-size: 44px; line-height: 1.1; font-weight: 800; }
.story-title em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; color: #F5A9B8; }
.story-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.story-step { display: flex; gap: 16px; padding: 16px 18px; border: 1.5px solid #2a2d2b; border-radius: 18px; opacity: .72; transition: opacity .4s, border-color .4s, transform .4s; }
.story-step.active { opacity: 1; border-color: #8DB600; transform: translateX(6px); }
.story-step.done { opacity: .85; }
.story-step .num { font-size: 26px; font-weight: 800; color: #F5A9B8; min-width: 38px; }
.story-step.active .num { color: #8DB600; }
.story-step h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.story-step p { margin: 0; font-size: 15px; line-height: 1.5; color: #b9bfbb; }
.story-progress { margin-top: 22px; font-size: 13px; color: #b9bfbb; }
.story-progress .labels, .story-progress .meta { display: flex; justify-content: space-between; }
.story-progress .bar { height: 6px; border-radius: 6px; background: #2a2d2b; margin: 8px 0; overflow: hidden; }
.story-progress .fill { height: 100%; width: 0%; background: linear-gradient(90deg, #F5A9B8, #8DB600); border-radius: 6px; }
.story-progress strong { color: #ffffff; }
.story-media { position: relative; border-radius: 28px; overflow: hidden; border: 1.5px solid #2a2d2b; background: #0b0d0c; }
.story-media video { display: block; width: 100%; height: auto; }
.story-svg { display: block; width: 100%; height: auto; }
.story-caption { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 15px; font-weight: 600; color: #fff; }
.story-caption .dot { width: 8px; height: 8px; border-radius: 50%; background: #8DB600; }
.story-stats { max-width: 1120px; width: 100%; margin: 28px auto 0; padding: 0 24px; box-sizing: border-box; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.story-stats .stat { border-top: 1.5px solid #2a2d2b; padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.story-stats strong { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 34px; color: #ffffff; }
.story-stats span { font-size: 13px; color: #b9bfbb; }

@media (max-width: 860px) {
  .story { height: 300vh; }
  .story-inner { grid-template-columns: 1fr; gap: 16px; }
  .story-visual { order: -1; }
  .story-title { font-size: 30px; margin: 6px 0 12px; }
  .story-step { padding: 10px 12px; }
  .story-step:not(.active) p { display: none; }
  .story-step h3 { font-size: 16px; }
  .story-step.active { transform: none; }
  .story-stats { grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
  .story-stats strong { font-size: 24px; }
  .story-pin { justify-content: flex-start; padding-top: 16px; box-sizing: border-box; }
  .story-svg { width: 100%; height: 34vh; }
  .story-media { background: #0d1420; }
  .story-stats { display: none; }
  .story-progress { margin-top: 12px; }
}

/* Reduced motion: no pinning or scrubbing; show the finished story and all steps. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-pill .pulse, .hero-glow { animation: none; }
  .story { height: auto; padding: 72px 0; }
  .story-pin { position: static; height: auto; min-height: 0; }
  .story-step { opacity: 1; transform: none; }
  .story-step p { display: block !important; }
}

/* ---------- areas: nationwide tile map ---------- */
.areas-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 48px; align-items: center; }
.areas-copy { display: flex; flex-direction: column; gap: 18px; }
.accent50 { color: #8DB600; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; }
.areas-facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.areas-facts div { border-top: 1.5px solid #2a2d2b; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.areas-facts strong { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 30px; color: #fff; }
.areas-facts span { font-size: 13px; color: #b9bfbb; }
.areas-cta { align-self: flex-start; background: #8DB600; color: #000; font-size: 17px; font-weight: 700; padding: 14px 26px; border-radius: 12px; transition: transform .2s, box-shadow .2s; }
.areas-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(141,182,0,.35); }
.usmap { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); grid-template-rows: repeat(8, auto); gap: 5px; }
.usmap span { grid-column: calc(var(--c) + 1); grid-row: calc(var(--r) + 1); aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 8px; font-size: clamp(10px, 1.25vw, 14px); font-weight: 700; color: #000; background: #8DB600;
  transition: opacity .5s ease, transform .5s ease; transition-delay: calc((var(--c) + var(--r)) * 45ms); }
.usmap span:nth-child(3n) { background: #F5A9B8; }
.usmap span:hover { transform: scale(1.12); }
.usmap.wait span { opacity: 0; transform: scale(.6); }
@media (max-width: 860px) {
  .areas-inner { grid-template-columns: 1fr; gap: 28px; }
  .usmap { gap: 3px; } .usmap span { border-radius: 5px; }
}
@media (prefers-reduced-motion: reduce) { .usmap span { transition: none; } }
/* Older Safari (before 15) has no aspect-ratio: keep the state tiles square-ish. */
@supports not (aspect-ratio: 1) { .usmap span { height: 0; padding: 50% 0; line-height: 0; } }
