/* Hallmark · motion layer of the CIMA page, stamped in cima.css · the user asked in chat for animations and parallax as on the reference sites */

html { scroll-behavior: smooth; }

/* ---------- The curtain: the mark rises, then the page ---------- */
.loader { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; background: var(--color-band); pointer-events: none; animation: loader-out 0.9s var(--ease-in-out) 0.8s forwards; }
.loader img { width: 96px; height: auto; animation: loader-mark 0.8s var(--ease-out) both; }
html:not(.js) .loader { display: none; }
@keyframes loader-out { to { transform: translateY(-100%); } }
@keyframes loader-mark { from { opacity: 0; transform: translateY(28px) scale(0.84); } to { opacity: 1; transform: none; } }

/* ---------- Reveals on scroll ---------- */
.js [data-reveal] { opacity: 0; transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), clip-path 1.2s var(--ease-in-out); transition-delay: calc(var(--i, 0) * 110ms); }
.js [data-reveal=""], .js [data-reveal="rise"] { transform: translateY(56px); }
.js [data-reveal="left"] { transform: translateX(-80px); }
.js [data-reveal="right"] { transform: translateX(80px); }
.js [data-reveal="zoom"] { transform: scale(0.8); }
.js [data-reveal="wipe"] { opacity: 1; clip-path: inset(0 100% 0 0); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="wipe"].is-in { clip-path: inset(0 0 0 0); }
.js .hero [data-reveal] { transition-delay: calc(1.3s + var(--i, 0) * 140ms); }

/* A statement that lights up word by word as it is read */
.js [data-words] .w { opacity: 0.14; transition: opacity 0.5s var(--ease-out); }
.js [data-words] .w.on { opacity: 1; }

/* A rule that draws itself */
.js [data-line] { position: relative; border-top-color: transparent; }
.js [data-line]::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--color-ink); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-in-out); }
.js [data-line].is-in::after { transform: scaleX(1); }

/* ---------- Parallax: the photograph moves slower than its frame ---------- */
.plx > img { inset: -12% 0 auto 0; height: 124%; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.hero::before { transform: translate3d(0, var(--wm, 0px), 0); }
@keyframes settle { from { scale: 1.16; } to { scale: 1; } }

/* ---------- The turning seal on the hero's seam ---------- */
.badge { position: absolute; right: calc(var(--video-w) + var(--space-xl)); bottom: calc(var(--strip-h) * 0.5 + var(--space-xl)); z-index: 3; display: grid; place-items: center; width: 156px; height: 156px; border-radius: 50%; background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-lift); text-decoration: none; }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: turn 18s linear infinite; }
.badge text { font: 700 16.5px var(--font-body); fill: currentColor; }
.badge img { width: 46px; height: auto; transition: transform 0.5s var(--ease-out); }
.badge:hover img { transform: translateY(-4px); }
.badge:hover svg, .badge:focus-visible svg { animation-play-state: paused; }
.badge:focus-visible { outline: 2px solid var(--color-band-focus); outline-offset: 4px; }
.js .hero .badge[data-reveal] { transition-delay: 2.1s; }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---------- The running line ---------- */
.marquee { overflow: clip; padding-block: var(--space-xl); border-block: 1px solid var(--color-rule); }
.marquee__track { display: flex; align-items: center; width: max-content; animation: run 38s linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__track > * { margin-right: var(--space-2xl); flex-shrink: 0; }
.marquee span { font: 300 clamp(3.5rem, 8vw, 8.5rem)/1.05 var(--font-display); letter-spacing: -0.03em; white-space: nowrap; color: var(--color-ink); }
.marquee span.out { color: transparent; -webkit-text-stroke: 1px var(--color-ink); }
.marquee img { width: clamp(2rem, 3.6vw, 3.75rem); height: auto; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- Hover: things answer the hand ---------- */
.btn:hover { transform: translateY(-2px); }
.tcard { transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out); }
.tcard:hover { transform: translateY(-10px); box-shadow: var(--shadow-lift); }
.tcard [data-slot] > img { transition: scale 1.1s var(--ease-out); }
.tcard:hover [data-slot] > img { scale: 1.08; }
.strip .icon { transition: transform 0.5s var(--ease-out); }
.strip a:hover .icon { transform: translateY(-4px); }
.post { transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out); }
.post:hover { transform: translateY(-10px); box-shadow: var(--shadow-lift); }
.reel__play .icon { transition: transform 0.5s var(--ease-out); }
.reel__play:hover .icon { transform: scale(1.12); }
/* The team drifts: odd and even arches move against each other as the page scrolls. */
[data-drift] { transform: translate3d(0, var(--dy, 0px), 0); will-change: transform; }
.member__photo img { transition: scale 1.1s var(--ease-out); }
.member:hover .member__photo img { scale: 1.04; }
.member__name { transition: transform 0.5s var(--ease-out); }
.member:hover .member__name { transform: translateX(-8px); }
.vcard { transition: transform 0.6s var(--ease-out); }
.vcard:hover { transform: translateY(-8px); }

/* ---------- The bar: a reading line, and a shadow once the page moves ---------- */
.nav { transition: box-shadow 0.4s var(--ease-out); }
.nav.is-scrolled { box-shadow: var(--shadow-lift); }
.nav__progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--color-ink); transform: scaleX(var(--progress, 0)); transform-origin: left; pointer-events: none; }

@media (max-width: 72rem) {
  .badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js [data-reveal="wipe"] { clip-path: none; }
  .js [data-words] .w { opacity: 1; transition: none; }
  .js [data-line]::after { transform: scaleX(1); transition: none; }
  .marquee__track, .badge svg, .loader, .loader img { animation: none; }
  .plx > img { inset: 0; height: 100%; transform: none; }
  .hero::before { transform: none; }
  .btn:hover, .tcard:hover, .vcard:hover, .post:hover, .badge:hover img, .strip a:hover .icon, .reel__play:hover .icon { transform: none; }
  .post, .reel__play .icon, .member__photo img, .member__name { transition: none; }
  [data-drift] { transform: none; }
  .member:hover .member__name { transform: none; }
  .member:hover .member__photo img { scale: 1; }
  .tcard, .tcard [data-slot] > img, .vcard, .nav, .badge img, .strip .icon { transition: none; }
  .tcard:hover [data-slot] > img { scale: 1; }
}
