/* ==========================================================================
   KADE OIL — cinematic layer
   Loads AFTER styles.css. Additive only: uses the independent `translate`,
   `scale` and `rotate` properties so it never fights existing `transform`s.
   Everything is scoped to html.cin-js (set only when motion is allowed).
   ========================================================================== */

:root {
  --cin-out: cubic-bezier(.16, 1, .3, 1);
  --cin-wipe: cubic-bezier(.77, 0, .175, 1);
}

/* ---------- 1. Sonos: polished load sequence ---------- */
html.cin-loading { overflow: hidden; }

.cin-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  background: #10243d;
  color: rgba(255, 255, 255, .92);
  clip-path: inset(0);
  transition: clip-path 1.15s var(--cin-wipe);
  animation: cin-failsafe .01s linear 7s forwards;
}
html.cin-loading .cin-loader,
html.cin-leaving .cin-loader { display: grid; }
html.cin-leaving .cin-loader { clip-path: inset(0 0 100% 0); }

.cin-loader__inner { display: grid; justify-items: center; gap: 1.6rem; }
.cin-loader__mark { width: clamp(64px, 9vw, 96px); height: auto; filter: brightness(0) invert(1); opacity: 0; animation: cin-fade-up 1s var(--cin-out) .15s forwards; }
.cin-loader__count { font-variant-numeric: tabular-nums; font-size: .8rem; letter-spacing: .24em; opacity: .7; }
.cin-loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .14); }
.cin-loader__bar i { position: absolute; inset: 0; background: rgba(255, 255, 255, .9); transform: scaleX(0); transform-origin: left; }
html.cin-leaving .cin-loader__inner { opacity: 0; translate: 0 -18px; transition: opacity .5s ease, translate .6s var(--cin-out); }

@keyframes cin-failsafe { to { visibility: hidden; pointer-events: none; } }
@keyframes cin-fade-up { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ---------- 2. Hero: dolly-in on load, layered depth on scroll ---------- */
.cin-js:not(.cin-ready) .hero__image { transform: scale(1.22); }
.cin-js:not(.cin-ready) .hero__eyebrow,
.cin-js:not(.cin-ready) .hero__lower,
.cin-js:not(.cin-ready) .hero__index,
.cin-js:not(.cin-ready) .hero__scroll,
.cin-js:not(.cin-ready) .hero__caption { opacity: 0; }

.cin-js.cin-ready .hero__image.is-image-ready { animation: cin-hero-in 1.35s var(--cin-out) backwards; }
.cin-js.cin-ready .hero__eyebrow { animation: cin-rise 1.2s var(--cin-out) .2s backwards; }
.cin-js.cin-ready .hero__lower   { animation: cin-rise 1.4s var(--cin-out) .8s backwards; }
.cin-js.cin-ready .hero__index,
.cin-js.cin-ready .hero__scroll,
.cin-js.cin-ready .hero__caption { animation: cin-fade 1.6s ease 1.3s backwards; }

@keyframes cin-hero-in { from { transform: scale(1.22); } to { transform: scale(1.055); } }
@keyframes cin-rise { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
@keyframes cin-fade { from { opacity: 0; } to { opacity: 1; } }

.cin-js .hero__image, .cin-js .hero__content { will-change: translate, scale, opacity; }

/* ---------- 3. Jomor: masked word-by-word typography ---------- */
.cin-js .reveal.cin-split,
.cin-js .cin-split .heading-mask { opacity: 1; transform: none; }

.cin-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .06em .1em .18em;
  margin: -.06em -.1em -.18em;
}
.cin-w > span {
  display: inline-block;
  translate: 0 118%;
  rotate: 4deg;
  transform-origin: 0 100%;
  transition: translate 1.3s var(--cin-out), rotate 1.3s var(--cin-out);
  transition-delay: calc(var(--i, 0) * 62ms);
}
.cin-split.cin-in .cin-w > span,
.is-active .cin-split .cin-w > span { translate: 0 0; rotate: 0deg; }
.hero .cin-w > span { transition-delay: calc(.35s + var(--i, 0) * 85ms); }
.trade-story__chapter .cin-w > span { transition-delay: calc(.15s + var(--i, 0) * 70ms); }

/* Photo state is inert until decoding finishes; the first scene then appears immediately.
   Both decoded scenes stay opaque: the outgoing one remains under the incoming wipe
   instead of flashing the navy stage. */
.cin-js .trade-story__image { clip-path: none; scale: 1; transition: none; }
.cin-js .trade-story__image.is-image-ready { opacity: 1; scale: 1.08; clip-path: inset(100% 0 0 0); transition: clip-path .56s var(--cin-wipe), scale .9s var(--cin-out); }
.cin-js .trade-story__image.is-image-ready.is-active { clip-path: inset(0); scale: 1; }
.cin-js .trade-story__image:first-of-type.is-image-ready { clip-path: none; scale: 1; }

.cin-js .trade-story__chapter .trade-story__eyebrow,
.cin-js .trade-story__chapter .trade-story__copy {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 1s var(--cin-out) .55s, translate 1.3s var(--cin-out) .55s;
}
.cin-js .trade-story__chapter.is-active .trade-story__eyebrow,
.cin-js .trade-story__chapter.is-active .trade-story__copy { opacity: 1; translate: 0 0; }

/* ---------- 5. Depth layers use lightweight transforms only while in view ---------- */

/* ---------- 7. Sonos: refined interaction details ---------- */
.cin-js .value-row { position: relative; }
.cin-rule {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: currentColor;
  scale: 0 1;
  transform-origin: left;
  transition: scale 1.1s var(--cin-out);
  pointer-events: none;
}
.value-row:hover .cin-rule,
.value-row:focus-within .cin-rule { scale: 1 1; }

.cin-js .value-row h3,
.cin-js .value-row p { transition: filter .7s ease, translate .9s var(--cin-out); }
.cin-js .values-list:hover .value-row:not(:hover) h3,
.cin-js .values-list:hover .value-row:not(:hover) p { filter: opacity(.4); }
.cin-js .value-row:hover h3 { translate: .6rem 0; }
.cin-js .value-row__mark { transition: rotate .9s var(--cin-out); }
.cin-js .value-row:hover .value-row__mark { rotate: 90deg; }

/* ---------- 8. Sonos: header settles as the page moves ---------- */
.cin-js .header__inner { transition: min-height .6s var(--cin-out); }
.cin-js .site-header.is-scrolled .header__inner { min-height: 64px; }
.cin-js .brand__mark { transition: filter .35s ease, scale .6s var(--cin-out); }
.cin-js .site-header.is-scrolled .brand__mark { scale: .92; }

/* ---------- 9. Hoss / Basement: oversized kinetic ticker ---------- */
.cin-marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(34px, 4.6vw, 68px);
  border-block: 1px solid rgba(255, 255, 255, .09);
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .93);
}
.cin-js .cin-marquee {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.5s var(--cin-wipe);
}
.cin-js .cin-marquee.is-visible { clip-path: inset(0); }

.cin-marquee__track {
  display: flex;
  width: max-content;
  animation: cin-marquee-scroll 52s linear infinite;
}
.cin-marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(26px, 3.6vw, 58px);
  padding-right: clamp(26px, 3.6vw, 58px);
}
.cin-marquee__word {
  color: inherit;
  font-size: clamp(46px, 8.4vw, 136px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .94;
  white-space: nowrap;
}
.cin-marquee__word--gold { color: #e1bd71; font-weight: 420; }
.cin-marquee__word--outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .44);
}
.cin-marquee__dot {
  width: clamp(5px, .5vw, 9px);
  height: clamp(5px, .5vw, 9px);
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  opacity: .8;
}
@keyframes cin-marquee-scroll { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- 10. Wokine / Bruno Simon: trailing cursor ring ---------- */
.cin-cursor {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  display: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  translate: -50% -50%;
  mix-blend-mode: difference;
  transition: width .35s var(--cin-out), height .35s var(--cin-out), opacity .35s ease, border-color .35s ease;
}
html.cin-js .cin-cursor { display: block; }
.cin-cursor.is-live { opacity: .8; }
.cin-cursor.is-hover {
  width: 62px;
  height: 62px;
  border-color: rgba(255, 255, 255, .5);
  opacity: 1;
}

/* ---------- 11. Igloo: light that follows the pointer over photographs ---------- */
.cin-sheen {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(58% 58% at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 72%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: soft-light;
  transition: opacity .7s ease;
}
.cin-js .intro__image-wrap:hover .cin-sheen,
.cin-js .business__image-panel:hover .cin-sheen { opacity: 1; }
.cin-js .intro__image-note,
.cin-js .business__image-caption { z-index: 2; }

.cin-tilting {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- 12. Hero: pointer depth on top of the scroll dolly ---------- */
@media (max-width: 950px) {
  .cin-js .site-header.is-scrolled .header__inner { min-height: 62px; }
}

@media (max-width: 899px) {
  .cin-js .trade-story__stage,
  .cin-js .intro__image-wrap { clip-path: none !important; }
  .cin-cursor { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html.cin-loading { overflow: auto !important; }
  html.cin-js .cin-loader { display: none !important; }
  html.cin-js *,
  html.cin-js *::before,
  html.cin-js *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  html.cin-js .cin-w > span { translate: 0 0 !important; rotate: 0deg !important; }
  html.cin-js .hero__eyebrow,
  html.cin-js .hero__lower,
  html.cin-js .hero__index,
  html.cin-js .hero__scroll,
  html.cin-js .hero__caption { opacity: 1 !important; }
}
