/* All movement lives here, scoped to html.motion (added in <head> unless ?qa=1 or reduced motion).
   Entrances follow the Figma prototype (HopSafer file, page "Final", frame "Proto"): every section has a start and an end variant,
   joined by Smart Animate with the "Gentle" spring, 1.53s (the hero 1.02s). Start offsets below are those variants' differences,
   in Figma px. A section plays when it gets .is-in (main.js), the hero when the splash hands over. */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* Figma "Gentle": mass 1, stiffness 100, damping 15. */
  --spring: cubic-bezier(.3, 1.15, .45, 1);
  --t-in: 1.533s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, 0.0434, 0.1472, 0.28, 0.4201, 0.5535, 0.672, 0.7717, 0.8519, 0.9134, 0.9585, 0.9897, 1.0099, 1.0216, 1.0271, 1.0284, 1.0268, 1.0237, 1.0199, 1.0159, 1.0122, 1.0089, 1.0062, 1.0039, 1.0023, 1.001, 1.0002, 0.9997, 0.9994, 0.9992, 0.9992, 0.9992, 0.9993, 0.9994, 0.9996, 0.9997, 0.9998, 0.9998, 0.9999, 0.9999, 1); }
}

/* ---------- Splash: logo and name, the name folds away, the logo fills with the city, then opens onto it ---------- */
.motion .splash__word { transition: width .6s var(--spring); }
.motion .splash__logo { transition: translate .6s var(--spring); }
.motion .splash__teal { transition: opacity .5s var(--spring); }
.motion .splash__photo { transition: opacity .5s var(--spring), -webkit-mask-size .9s var(--spring), mask-size .9s var(--spring); }
.motion .splash { transition: opacity .6s ease, visibility 0s .6s, background-color .6s ease; }

/* ---------- Scroll entrances ---------- */
.motion [data-enter] :is(.in-x, .in-y, .in-xy, .in-fade, .in-pop) {
  transition: translate var(--t-in) var(--spring), scale var(--t-in) var(--spring), rotate var(--t-in) var(--spring), opacity var(--t-in) var(--spring);
}
.motion [data-enter]:not(.is-in) .in-x { translate: calc(var(--x) * var(--u)) 0; }
.motion [data-enter]:not(.is-in) .in-y { translate: 0 calc(var(--y) * var(--u)); }
.motion [data-enter]:not(.is-in) .in-xy { translate: calc(var(--x) * var(--u)) calc(var(--y) * var(--u)); }
.motion [data-enter]:not(.is-in) .in-fade { opacity: 0; }
.motion [data-enter]:not(.is-in) .in-pop { scale: var(--s, .04); rotate: var(--r, 0deg); }

/* Hero (1.02s): the card starts full screen and settles; the header drops in from above. */
.motion .site-header :is(.brand, .nav, .header-cta) { --t-in: 1.022s; }
.motion .hero__media::after { transition: opacity 1.022s var(--spring); }
.motion .hero:not(.is-in) .hero__media::after { opacity: 0; }
@media (min-width: 1180px) {
  .motion .hero, .motion .hero__media img, .motion .hero :is(.in-x, .in-y) { --t-in: 1.022s; transition: translate var(--t-in) var(--spring), margin var(--t-in) var(--spring), height var(--t-in) var(--spring), border-radius var(--t-in) var(--spring), width var(--t-in) var(--spring), left var(--t-in) var(--spring), top var(--t-in) var(--spring); }
  .motion .hero:not(.is-in) { margin: calc(-120 * var(--u)) 0 calc(-22 * var(--u)); height: calc(1081 * var(--u)); border-radius: 0; }
  .motion .hero:not(.is-in) .hero__media img { left: calc(-311 * var(--u)); top: calc(-203 * var(--u)); width: calc(2515 * var(--u)); height: calc(1507 * var(--u)); }
  .motion .hero h1, .motion .hero__copy p { overflow: clip; }
}

/* Overview: the thumbnail stacks open up as the title rises. */
.motion .stack img { transition: translate var(--t-in) var(--spring); }
.motion .overview:not(.is-in) .stack--a img:nth-child(2) { translate: calc(-114 * var(--u)) 0; }
.motion .overview:not(.is-in) .stack--a img:nth-child(3) { translate: calc(-58 * var(--u)) 0; }
.motion .overview:not(.is-in) .stack--b img:nth-child(2) { translate: calc(-51 * var(--u)) 0; }

/* Start offsets, Figma px (the start variant minus the end variant). */
.motion body { overflow-y: clip; }
@media (min-width: 1180px) {
  .site-header .in-y { --y: -160; }
  .hero h1 .line { --y: 340; }
  .hero__copy p > .in-y { display: block; --y: 230; }
  .hero .pill--read { --y: 470; }
  .hero-map { --x: 800; }
  .hero-card { --x: 930; }
  .overview__title, .hiw .overview__title, .hiw__lead { --y: 450; }
  :is(.stat, .hiw-step):nth-child(1) { --y: 410; }
  :is(.stat, .hiw-step):nth-child(2) { --y: 470; }
  :is(.stat, .hiw-step):nth-child(3) { --y: 620; }
  .gate__num, .gate__title { --y: 410; }
  .gate__copy h2 { --y: 340; }
  .gate__price { --y: 280; }
  .district .in-y { --y: 260; }
  .gate__cta { --y: 280; }
  .feature--guide .feature__text { --x: -1110; }
  .f-hand--guide, .f-hand--sos { --x: 1040; }
  .feature--alerts .feature__text { --x: 1180; }
  .f-hand--alerts { --x: -911; }
  .rings, .rings__glow { --s: .6; }
  .f-notice { --y: 200; }
  .feature--sos .feature__text { --x: -1050; }
  .f-glow--car { --s: .039; }
  .f-glow--family { --s: .003; }
  .f-sos { --s: .002 .001; }
  .f-tap { --s: .037; --r: 180deg; }
  .banner__stage .in-pop { --s: .05; }
  .banner__woman { --y: 420; }
  .banner__tag, .banner h2, .banner p { --x: -970; }
  .banner .pill, .banner small { --y: 340; }
}
@media (min-width: 1180px) {
  .motion .site-footer[data-enter] { transition: translate var(--t-in) var(--spring); }
  .motion .site-footer[data-enter]:not(.is-in) { translate: 0 calc(650 * var(--u)); }
}
/* Phones: the Figma mobile prototype (Components 10 to 20 on page "Final"). */
@media (max-width: 1179.98px) {
  .site-header .in-y { --y: -220; }
  .hero .in-y, .gate__cta, .banner .pill, .banner small { --y: 0; }
  .hero-map, .hero-card, .feature__text, .banner__tag, .banner h2, .banner p { --x: 0; }
  .overview__title { --y: 200; }
  .stat { --y: 240; }
  .district__num, .district .h-district { --y: 100; }
  .district__copy { --y: 460; }
  .gate__num, .gate__title { --y: 130; }
  .gate__copy h2 { --y: 140; }
  .gate__price { --y: 100; }
  .banner__woman { --y: 300; }
  .m-art--alerts { --y: 660; --s: 1.366; }
  .m-art--sos { --y: 652; --s: 1.158; }
  .f-glow { --s: 1.16; }
  .f-tap { --s: 1.16; --r: 0deg; }
  .motion .hero:not(.is-in) { width: calc(460 * var(--mu)); height: calc(924 * var(--mu)); margin: 0 calc(-29 * var(--mu)); border-radius: 0; }
  .motion .hero, .motion .hero :is(.in-x, .in-y) { transition: width var(--t-in) var(--spring), height var(--t-in) var(--spring), margin var(--t-in) var(--spring), border-radius var(--t-in) var(--spring), translate var(--t-in) var(--spring), opacity var(--t-in) var(--spring); }
  .motion .hero:not(.is-in) :is(.line, .hero__copy p > span, .pill--read) { opacity: 0; }
  .motion .hero.hero:not(.is-in) :is(.hero-map, .hero-card) { translate: 0 calc(560 * var(--mu)); }
  .motion .overview:not(.is-in) :is(.app-icon, .m-thumbs) { opacity: 0; }
  .motion .overview :is(.app-icon, .m-thumbs), .motion .district .montage, .motion .gate__cta { transition: opacity var(--t-in) var(--spring), translate var(--t-in) var(--spring); }
  .motion .district:not(.is-in) .montage, .motion .gate:not(.is-in) .gate__cta { opacity: 0; }
  .motion .feature--guide:not(.is-in) .feature__text { translate: 0 calc(110 * var(--mu)); }
  .motion .feature--alerts:not(.is-in) .feature__text { translate: 0 calc(180 * var(--mu)); }
  .motion .feature--sos:not(.is-in) .feature__text { translate: 0 calc(140 * var(--mu)); }
  .motion .f-hand--guide { transition: translate var(--t-in) var(--spring), scale var(--t-in) var(--spring); }
  .motion .feature--guide:not(.is-in) .f-hand--guide { translate: 0 calc(582 * var(--mu)); scale: 1.52; }
  .motion .feature--sos:not(.is-in) .f-glow { translate: 0 calc(602 * var(--mu)); }
  .motion .feature--sos:not(.is-in) .f-tap { translate: 0 calc(640 * var(--mu)); }
  .motion .banner:not(.is-in) .banner__tag { translate: 0 calc(-180 * var(--mu)); }
  .motion .banner:not(.is-in) :is(h2, p) { translate: 0 calc(180 * var(--mu)); }
  .motion .banner:not(.is-in) :is(.pill, small) { opacity: 0; }
}

/* ---------- Explorer (Figma 481:10104): a click opens a neighborhood and the strips slide to it ---------- */
.motion .strip { transition: translate var(--t-in) var(--spring); }
.acc__body { transition: grid-template-rows .55s var(--ease-out); }
.acc__body > div > p { transition: opacity .45s .1s ease; }
.acc button span { transition: color .3s ease; }
.acc i { transition: rotate .45s var(--ease-out), background .3s; }
.acc button:hover i { background: rgb(0 0 0 / .1); }

/* ---------- Hover states ---------- */

.pill, .header-cta { transition: translate .4s var(--ease-out), box-shadow .4s var(--ease-out), filter .3s; }
.pill:hover, .header-cta:hover { box-shadow: 0 calc(14 * var(--u)) calc(30 * var(--u)) rgb(0 0 0 / .14); }
.pill:active, .header-cta:active { filter: brightness(.96); }
.pill__dot, .header-cta__dot { overflow: hidden; }
.pill__dot svg, .header-cta__dot svg { transition: translate .45s var(--ease-out); }
a.pill:not(.pill--read):hover .pill__dot svg, .header-cta:hover .header-cta__dot svg { translate: calc(3 * var(--u)) 0; }
.pill--read:hover .pill__dot svg, button.pill:hover .pill__dot svg, .district__next:hover .pill__dot svg { translate: 0 calc(3 * var(--u)); }
.stat { transition: background .4s, box-shadow .5s var(--ease-out); }
.stat:hover { background: #fff; box-shadow: 0 calc(24 * var(--u)) calc(60 * var(--u)) rgb(0 0 0 / .07); }
.hiw-step { transition: box-shadow .5s var(--ease-out); }
.hiw-step:hover { box-shadow: 0 calc(24 * var(--u)) calc(60 * var(--u)) rgb(0 0 0 / .07); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* First-frame font hold and staggered, spring-based entrances. */
.motion.fonts-pending :is(.page-waitlist, .page-hiw, .page-legal) > :is(header, main, footer) { visibility: hidden; }
.motion.fonts-pending .waitlist :is(.waitlist__tag, h1, .waitlist__lead, .waitlist__form, .waitlist__phones, .waitlist__mobile-phones) { opacity: 0; }
.motion.fonts-ready .waitlist :is(.waitlist__tag, h1, .waitlist__lead, .waitlist__form, .waitlist__phones, .waitlist__mobile-phones) { animation: waitlist-in 1.022s var(--spring) both; }
.motion.fonts-ready .waitlist h1 { animation-delay: .07s; }
.motion.fonts-ready .waitlist__lead { animation-delay: .14s; }
.motion.fonts-ready .waitlist__form { animation-delay: .21s; }
.motion.fonts-ready :is(.waitlist__phones, .waitlist__mobile-phones) { animation-delay: .28s; }
.motion.fonts-ready .legal-panel { animation: waitlist-in 1.022s var(--spring) both; }
@keyframes waitlist-in { from { opacity: 0; translate: 0 24px; } }
