:root {
  --ease-settle: cubic-bezier(.22,.78,.22,1);
  --respond: 240ms;
}

/* Let the printed field travel across the word while both layers stay registered. */
.headline-line:first-child > span {
  animation: headline-in 700ms var(--ease-settle) backwards;
}
.hero h1 .highlight { background: transparent; color: var(--blue); isolation: isolate; }
.highlight-plate {
  position: absolute; inset: 0; display: grid; align-items: center; padding: inherit;
  background: var(--blue); color: var(--cream);
  animation: ink-across 840ms cubic-bezier(.6,.03,.18,1) 140ms backwards;
}
@keyframes headline-in {
  from { opacity: .4; transform: translateY(.19em); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ink-across { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

/* Each editorial group settles once. Body copy remains readable through the entrance. */
@keyframes settle {
  from { opacity: .55; transform: translateY(var(--rise, 9px)); }
  to { opacity: 1; transform: translateY(0); }
}
.company .section-heading h2 { margin: 0; }
.section-heading.is-arriving h2,
.company-copy.is-arriving > p,
.focus-intro.is-arriving h2,
.contact-top.is-arriving h2,
.contact-top.is-arriving .contact-copy {
  animation: settle 640ms var(--ease-settle) backwards;
}
.company-copy.is-arriving > p:nth-child(2), .contact-top.is-arriving .contact-copy { animation-delay: 80ms; }
.company-copy.is-arriving > p:nth-child(3) { animation-delay: 150ms; }
.company-line.is-arriving { animation: draw-rule 800ms var(--ease-settle) backwards; }
@keyframes draw-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.about-period { display: inline-block; }
.section-heading.is-arriving .about-period { animation: period-seat 680ms var(--ease-settle) 130ms backwards; }
@keyframes period-seat {
  from { transform: translateX(.22em); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* The track follows the active card in both the horizontal and stacked layouts. */
.category-grid { position: relative; --selected: 0; }
.category-grid::after {
  content: ""; position: absolute; z-index: 2; pointer-events: none; left: 0; bottom: 0;
  width: calc(100% / 3); height: 3px; background: var(--blue);
  transform: translateX(calc(var(--selected) * 100%));
  transition: transform 340ms var(--ease-settle);
}
.category { transition: background-color var(--respond) var(--ease-settle); }
.panel-arrow { transition: color var(--respond), background-color var(--respond), border-color var(--respond); }
.art-wrap { transition: transform 420ms var(--ease-settle); transform-origin: center 60%; }
@media (hover:hover) and (pointer:fine) {
  .category:hover .art-wrap { transform: scale(1.045); }
}
.category:focus-visible .art-wrap { transform: scale(1.045); }
.art-float {
  display: block;
  --lift: -8px; --drift: 2px; --tilt: -1.5deg;
  transform-origin: 50% 65%;
  animation: product-lift 5.8s ease-in-out infinite;
}
.category[data-category="ingredients"] .art-float {
  --lift: -7px; --drift: -3px; --tilt: 1.2deg;
  animation-delay: -1.7s;
}
.category[data-category="benefit"] .art-float {
  --lift: -8px; --drift: 1px; --tilt: -.65deg;
  animation-delay: -3.5s;
}
@keyframes product-lift {
  0%, 100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(var(--drift),var(--lift)) rotate(var(--tilt)); }
}

/* Two identical strips make a seamless loop. Hover never changes its speed. */
.marquee-track { animation: band-travel 48s linear infinite; }
@keyframes band-travel { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* A soft pool of blue settles into the contact field as the invitation appears. */
.contact::before {
  content: ""; position: absolute; inset: -15% 38% -15% -10%; pointer-events: none;
  background: radial-gradient(ellipse at 40% 45%, rgb(88 111 192 / .4), transparent 70%);
}
.contact.is-arriving::before { animation: light-settle 1800ms var(--ease-settle) backwards; }
@keyframes light-settle {
  from { opacity: .18; transform: translateX(-9%); }
  to { opacity: 1; transform: translateX(0); }
}
.email { position: relative; }
.email-direction {
  display: inline-grid; place-items: center; flex: none; width: 1.65em; height: 1.65em;
  overflow: hidden; border: 1px solid #ffffff53; border-radius: 50%;
  transition: color var(--respond), background-color var(--respond), border-color var(--respond);
}
.email-direction .arrow { line-height: 1; }
.email:is(:hover,:focus-visible) .email-direction {
  background: var(--cream); border-color: var(--cream); color: var(--blue);
}
.email:is(:hover,:focus-visible) .arrow { animation: send-arrow 430ms var(--ease-settle); }
@keyframes send-arrow {
  0%, 100% { transform: translate(0); opacity: 1; }
  44% { transform: translate(90%,-90%); opacity: 0; }
  45% { transform: translate(-90%,90%); opacity: 0; }
}
:is(.motion-resting,.tab-away) :is(.art-float,.marquee-track) { animation-play-state: paused; }
@media (max-width:760px) {
  .js .nav.open { animation: menu-open 180ms var(--ease-settle); transform-origin: top; }
  @keyframes menu-open {
    from { opacity: .5; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (max-width:600px) {
  .marquee-track { animation-duration: 38s; }
  .category .art-float { --lift: -5px; }
}
@media (max-width:480px) {
  .category-grid { grid-auto-rows: 1fr; }
  .category-grid::after {
    top: 0; bottom: auto; width: 3px; height: calc(100% / 3);
    transform: translateY(calc(var(--selected) * 100%));
  }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .art-wrap, .box-link span, .plain-link span { transform: none !important; }
  .marquee-track { width: 100%; transform: none; }
  .marquee-group {
    width: 100%; white-space: normal; justify-content: center; text-align: center;
    padding-inline: 21px; font-size: clamp(22px,3.4vw,44px);
  }
  .marquee-group + .marquee-group, .marquee-group span ~ span, .marquee-group b { display: none; }
}
