.motion-home {
  --entry-ease: cubic-bezier(.32, .72, 0, 1);
  --motion-ink: #175c82;
}

.motion-home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
  align-items: center;
  gap: 0 clamp(8px, 2vw, 30px);
  height: auto;
}
.motion-home .hero-copy { width: auto; padding-top: 0; }
.motion-home .hero h1 { white-space: normal; }
.motion-home .hero-intro { width: auto; white-space: normal; }
.motion-home .hero .button-row { display: flex; width: auto; flex-wrap: wrap; }
.motion-home .hero .btn { min-height: 44px; }
@media (min-width: 761px) {
  .motion-home .hero h1 { font-size: clamp(1.8rem, 4.25vw, 3.75rem); }
  .motion-home .hero .btn { font-size: clamp(.77rem, 1.24vw, 1.12rem); padding-inline: clamp(9px, 1.65vw, 22px); }
  .motion-home .hero .hand-note { margin-top: clamp(14px, 3vw, 26px); }
}
.motion-home .hero-visual {
  position: relative;
  inset: auto;
  width: min(100%, 490px);
  height: auto;
  aspect-ratio: 720 / 926;
  justify-self: end;
  overflow: clip;
}
.motion-home .hero-visual::before {
  inset: 8.5% 0 auto;
  aspect-ratio: 1.38 / .94;
  transform: translateY(var(--motion-drift, 0px));
}
.motion-home .hero-visual .visual-note {
  top: 1%;
  right: auto;
  left: 3%;
  max-width: 39%;
}
@media (min-width: 761px) {
  .motion-home .hero {
    grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
    min-block-size: 80svh;
    padding-block: clamp(10px, 2svh, 24px) clamp(32px, 6svh, 72px);
  }
  .motion-home .hero-intro { text-wrap: balance; }
  .motion-home .hero-visual {
    width: calc(100% + clamp(10px, 2.1vw, 30px));
    aspect-ratio: 16 / 9;
    justify-self: start;
  }
  .motion-home .hero-visual::before { inset: 8% 2% 0 -3%; aspect-ratio: auto; }
  .motion-home .hero-visual .visual-note {
    top: clamp(9px, .7vw, 12px);
    right: 25%;
    left: auto;
    font-size: clamp(12px, 1.2vw, 19px);
  }
}
.motion-home .motion-hero-frame,
.motion-home .motion-hero-frame img,
.motion-home .motion-hero-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.motion-home .motion-hero-frame img,
.motion-home .motion-hero-frame video { object-fit: contain; }
.motion-hero-frame { isolation: isolate; }
.motion-hero-frame img { z-index: 1; }
.motion-hero-frame:not([data-state="loading"]):not([data-state="playing"]) .motion-hero-video { visibility: hidden; }
.motion-hero-frame[data-state="playing"] img { visibility: hidden; }
.motion-home .hero-visual[data-hero-video="composited"]::before { visibility: hidden; }
.motion-home .hero-visual .motion-hero-logo { display: none; }
.motion-home .hero > .quick-info { display: none; }

.motion-running .motion-home .reveal {
  transition: opacity 760ms var(--entry-ease), translate 760ms var(--entry-ease),
    transform 240ms var(--entry-ease), box-shadow 240ms var(--entry-ease);
}
.motion-running .motion-home .reveal:not(.is-visible):not(:focus-within) {
  opacity: 0;
  translate: 0 13px;
}
.motion-home .service-card:focus-visible { outline: 3px solid var(--motion-ink); outline-offset: 3px; }
.motion-home .service-card .card-arrow,
.motion-home .btn .btn-icon { transition: translate 240ms var(--entry-ease); }
.motion-running .motion-home :is(.service-card, .exotic .btn):is(:hover, :focus-visible) :is(.card-arrow, .btn-icon) {
  translate: 3px 0;
}
@media (hover: hover) and (pointer: fine) {
  .motion-running .motion-home .service-card:hover { transform: translateY(-3px); }
}

.motion-dog {
  position: relative;
  width: clamp(91px, 12vw, 150px);
  height: clamp(49px, 7vw, 80px);
  margin-inline: auto 5%;
  margin-block: -8px 3px;
  overflow: clip;
  pointer-events: none;
}
.motion-dog::after,
.motion-cat-peek::after {
  content: "";
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 94%;
  height: 2px;
  background: #b9d9ed;
  border-radius: 50%;
}
.motion-dog img,
.motion-cat-peek img {
  position: absolute;
  display: block;
  width: 100%;
  bottom: -4px;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
}
.motion-running .motion-dog img,
.motion-running .motion-cat-peek img { transition: translate 960ms var(--entry-ease); }
.motion-running :is(.motion-dog, .motion-cat-peek):not(.has-entered) img { translate: 0 104%; }
.motion-running .motion-dog.is-in-view img { animation: motion-rest-breath 5.1s ease-in-out infinite; }
.motion-running .motion-cat-peek.is-in-view img { animation: motion-rest-breath 4.3s ease-in-out infinite; }

.motion-home .motion-exotic > img { translate: 0 var(--motion-drift, 0px); }
.motion-cat-lane {
  position: relative;
  width: min(92%, 344px);
  aspect-ratio: 1280 / 328;
  margin-inline-start: auto;
  margin-inline-end: max(4%, calc((100% - 1280px) / 2));
  margin-block: 3px -10px;
  overflow: clip;
  pointer-events: none;
}
.motion-cat-video,
.motion-cat-animation {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  visibility: hidden;
}
.motion-cat-still {
  position: absolute;
  inset: auto 8% 3% auto;
  width: 39%;
  height: auto;
}
.motion-running .motion-cat-lane[data-state="playing"] video { visibility: visible; }
.motion-running .motion-cat-lane[data-state="animated"] .motion-cat-animation { visibility: visible; }
.motion-running .motion-cat-lane:not([data-state="unavailable"]) .motion-cat-still { visibility: hidden; }

@media (min-width: 761px) {
  .motion-cat-lane {
    width: 100%;
    margin-inline: 0;
    aspect-ratio: 1920 / 290;
  }
  .motion-cat-lane[data-state="loading"] video {
    visibility: visible;
    opacity: 0;
  }
  .motion-cat-video {
    mask-image: linear-gradient(to bottom, transparent, black 8%, black 92%, transparent);
  }
  .motion-cat-still {
    width: min(23%, 250px);
    inset-inline-end: max(8%, calc(50% - 269px));
  }
}

.motion-running .journey-steps .reveal.is-visible .step-no { animation: motion-step 550ms var(--entry-ease) both; }
@keyframes motion-step {
  from { opacity: .55; scale: .86; }
  to { opacity: 1; scale: 1; }
}
.motion-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(117px, 24vw, 280px);
  align-items: end;
  gap: clamp(8px, 3vw, 40px);
  margin-block: 14px 0;
  padding: clamp(16px, 3vw, 32px);
  padding-bottom: 0;
  border-radius: clamp(18px, 3vw, 32px);
  background: linear-gradient(117deg, #edf7fb, #d3eaf7);
}
.motion-contact .contact-copy { padding: 2px 0 clamp(20px, 3vw, 33px); }
.motion-contact .contact-copy h2 { margin-bottom: 4px; }
.motion-contact .contact-copy :is(h2, p) { white-space: normal; }
.motion-contact .btn { display: inline-flex; min-height: 44px; margin-top: 9px; }
.motion-cat-peek {
  position: relative;
  width: 100%;
  aspect-ratio: 1.65;
  overflow: clip;
  pointer-events: none;
}
.motion-cat-peek img { bottom: -4px; }
.motion-rest {
  display: flex;
  justify-content: center;
  align-items: end;
  min-height: clamp(68px, 10vw, 132px);
  padding-top: 12px;
  pointer-events: none;
}
.motion-rest img {
  display: block;
  width: clamp(146px, 23vw, 290px);
  height: auto;
  transform-origin: center bottom;
}
.motion-running .motion-rest.is-in-view img { animation: motion-rest-breath 5.6s ease-in-out infinite; }
@keyframes motion-rest-breath { 0%, 100% { scale: 1; } 50% { scale: 1 1.018; } }

.motion-tab-hidden.motion-running .motion-watch.is-in-view img {
  animation-play-state: paused;
}

@keyframes motion-hero-logo-float {
  0%, 100% { translate: -50% -25%; }
  50% { translate: -50% calc(-25% - 5px); }
}

@media (width < 761px) {
  .motion-home .hero { grid-template-columns: minmax(0, 1fr); row-gap: 13px; }
  .motion-home .hero-copy { text-align: center; }
  .motion-home .hero h1 { font-size: clamp(25px, 7.1vw, 40px); line-height: 1.12; }
  .motion-home .hero .mobile-break,
  .motion-home .hero .hand-note .desktop-break { display: none; }
  .motion-home .hero-intro {
    margin: 12px auto 15px;
    font-size: clamp(13px, 3.4vw, 17px);
    text-wrap: balance;
  }
  .motion-home .hero-intro-second { display: block; }
  .motion-home .hero .button-row { justify-content: center; }
  .motion-home .hero .hand-note {
    position: static;
    width: fit-content;
    max-width: 100%;
    margin: 16px auto 0;
    text-align: center;
    white-space: normal;
  }
  .motion-home .hero-visual {
    aspect-ratio: 720 / 912;
    justify-self: center;
  }
  /* Keep the original media scale while clipping the unused bottom 14 px. */
  .motion-home .motion-hero-frame :is(img, video) { height: calc(100% * 926 / 912); }
  .motion-home .hero-visual .motion-hero-logo {
    display: block;
    inset: 73% auto auto 50%;
    width: clamp(168px, 66%, 288px);
    height: auto;
    translate: -50% -25%;
    pointer-events: none;
  }
  .motion-running .motion-home .motion-hero-logo { transition: opacity 220ms ease-in-out; }
  .motion-running:not(.motion-tab-hidden) .motion-home .hero-visual.is-in-view .motion-hero-logo {
    animation: motion-hero-logo-float 3.8s ease-in-out infinite;
  }
  .motion-home .hero-visual[data-hide-motion-logo] .motion-hero-logo { opacity: 0; }
  .motion-home .hero-visual::before { top: 7.5%; aspect-ratio: 1.28 / .89; }
  .motion-home .hero-visual .visual-note {
    inset-inline: 0;
    width: fit-content;
    max-width: 65%;
    margin-inline: auto;
  }
  .motion-home .motion-contact {
    --contact-inset: clamp(14px, 4vw, 22px);
    --contact-cat-width: clamp(100px, 31vw, 164px);
    grid-template-columns: minmax(0, 1fr);
    padding: var(--contact-inset) var(--contact-inset) 0;
    isolation: isolate;
    overflow: clip;
  }
  .motion-home .motion-contact :is(.contact-copy, .motion-cat-peek) { grid-area: 1 / 1; }
  .motion-home .motion-contact .contact-copy {
    z-index: 1;
    align-self: start;
    padding: 0 0 var(--contact-inset);
  }
  .motion-home .motion-contact h2 { font-size: clamp(17px, 5vw, 24px); }
  .motion-home .motion-contact .contact-copy > p:not(.eyebrow) {
    max-inline-size: calc(100% - var(--contact-cat-width) + var(--contact-inset) - 12px);
    font-size: clamp(11px, 3.1vw, 14px);
    line-height: 1.4;
    text-wrap: balance;
  }
  .motion-home .motion-contact .contact-phrase { white-space: nowrap; }
  .motion-home .motion-contact .btn { font-size: 12px; padding-inline: 10px; }
  .motion-home .motion-contact .motion-cat-peek {
    justify-self: end;
    width: var(--contact-cat-width);
    aspect-ratio: 420 / 397;
    margin-inline-end: calc(var(--contact-inset) / -2);
  }
}
@media (max-width: 700px) {
  .motion-home .motion-rest {
    position: relative;
    z-index: 1;
    min-height: 0;
    margin-block-end: -12px;
    padding-top: 16px;
  }
  .motion-home .motion-rest img { width: clamp(150px, 42vw, 184px); }
  .motion-running #mobile-menu.is-open nav a {
    animation: motion-menu-in 340ms var(--entry-ease) both;
    animation-delay: calc(var(--nav-order, 0) * 35ms);
  }
  .motion-home #site-header .menu-toggle span {
    transition: transform 300ms var(--entry-ease), opacity 200ms ease;
  }
}
@keyframes motion-menu-in { from { opacity: 0; translate: 0 7px; } to { opacity: 1; translate: 0; } }

@media (prefers-reduced-motion: reduce) {
  .motion-home *, .motion-home *::before, .motion-home *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.motion-home .hero h1.brand-slogan { font-size: clamp(27px, 7.1vw, 40px); line-height: 1.22; }
.motion-home .hero h1.brand-slogan span { white-space: nowrap; }
.motion-home .brand-slogan + .hero-intro .hero-intro-second { display: block; }
@media (min-width: 761px) {
  .motion-home .hero h1.brand-slogan { font-size: clamp(29px, 4.05vw, 60px); }
}
