/* Extra Industry motion layer.
   Extends existing tokens/classes only: liquid glass, ambient background, reveal, project cards, and CTA. */

/* Section 1: ambient background + Home hero orchestration */
.ambient-background {
  display: block;
  mix-blend-mode: multiply;
}

.ambient-background:before {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  width: min(42vw, 38rem);
  border-radius: 50%;
  opacity: .22;
  filter: blur(76px);
  background: radial-gradient(circle, rgb(var(--color-brand-gold-rgb) / 72%), rgb(var(--color-brand-red-rgb) / 18%) 54%, transparent 72%);
  inset-block-start: 24%;
  inset-inline-start: 48%;
  animation: ambient-drift-three 26s var(--ease-standard) infinite alternate;
  will-change: transform;
}

.ambient-orb {
  filter: blur(72px);
  opacity: .34;
  will-change: transform;
}

.ambient-orb--one {
  background: radial-gradient(circle, rgb(var(--color-brand-red-rgb) / 58%), rgb(var(--color-brand-gold-rgb) / 20%) 58%, transparent 73%);
  width: min(48vw, 46rem);
  animation: ambient-drift-one 24s ease-in-out infinite alternate;
}

.ambient-orb--two {
  background: radial-gradient(circle, rgb(185 128 54 / 48%), rgb(236 232 221 / 18%) 62%, transparent 76%);
  width: min(40vw, 40rem);
  animation: ambient-drift-two 30s ease-in-out infinite alternate;
}

.ambient-grid {
  opacity: .08;
  background-image:
    linear-gradient(rgb(var(--color-brand-charcoal-rgb) / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--color-brand-charcoal-rgb) / 8%) 1px, transparent 1px);
}

.page--home .hero:after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
  inset: 0;
  background:
    radial-gradient(42rem 28rem at 74% 28%, rgb(var(--color-brand-gold-rgb) / 18%), transparent 68%),
    radial-gradient(34rem 28rem at 24% 72%, rgb(var(--color-brand-red-rgb) / 14%), transparent 72%);
  animation: hero-ambient-breathe 22s ease-in-out infinite alternate;
  will-change: opacity, transform;
}

.page--home .hero-copy > .hero-eyebrow,
.page--home .hero-copy .hero-title-mask,
.page--home .hero-copy .hero-lower,
.page--home .hero-copy .hero-data-strip {
  opacity: 0;
  transform: translate3d(0, 1.35rem, 0);
  animation: hero-sequence-in .92s var(--ease-premium) both;
}

.page--home .hero-copy .hero-title-mask {
  animation-delay: .14s;
}

.page--home .hero-copy .hero-lower {
  animation-delay: .28s;
}

.page--home .hero-copy .hero-data-strip {
  animation-delay: .42s;
}

.page--home .hero h1 {
  animation: none;
}

.page--home .hero h1 span {
  display: block;
  opacity: 0;
  transform: translate3d(0, .62em, 0);
  animation: hero-title-line-in .9s var(--ease-premium) both;
}

.page--home .hero h1 span:nth-child(2) {
  animation-delay: .12s;
}

@keyframes ambient-drift-one {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8vw, 8vh, 0) scale(1.08); }
  100% { transform: translate3d(14vw, 3vh, 0) scale(1.14); }
}

@keyframes ambient-drift-two {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-7vw, -5vh, 0) scale(1.1); }
  100% { transform: translate3d(-12vw, -11vh, 0) scale(1.04); }
}

@keyframes ambient-drift-three {
  0% { transform: translate3d(0, 0, 0) scale(.96); }
  100% { transform: translate3d(-10vw, 7vh, 0) scale(1.12); }
}

@keyframes hero-ambient-breathe {
  0% { opacity: .68; transform: scale(1); }
  100% { opacity: .92; transform: scale(1.045); }
}

@keyframes hero-sequence-in {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes hero-title-line-in {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Section 2: liquid-glass depth + pointer-reactive warmth */
.liquid-glass {
  --liquid-highlight: rgb(255 255 255 / 42%);
  --liquid-shade: rgb(var(--color-brand-charcoal-rgb) / 10%);
}

.liquid-glass:before {
  background:
    radial-gradient(72% 58% at var(--liquid-light-x) var(--liquid-light-y), rgb(var(--color-brand-gold-rgb) / 30%) 0%, rgb(255 255 255 / 18%) 34%, transparent 68%),
    radial-gradient(76% 54% at 92% 116%, rgb(var(--color-brand-red-rgb) / 11%) 0%, transparent 68%),
    linear-gradient(180deg, rgb(255 255 255 / 12%), transparent 42%, var(--liquid-shade));
}

.liquid-glass.is-liquid-pointer-active:before,
.liquid-glass--nav.is-liquid-pointer-active:before {
  opacity: 1;
  transform: translate3d(0, -1%, 0) scale(1.04);
}

.liquid-glass.is-liquid-pointer-active:after,
.liquid-glass--nav.is-liquid-pointer-active:after {
  opacity: .78;
}

.site-header.liquid-glass {
  --liquid-blur: 16px;
  --liquid-shadow: 0 1px 1px rgb(255 255 255 / 16%), 0 10px 30px rgb(var(--color-brand-charcoal-rgb) / 15%), 0 34px 86px rgb(var(--color-brand-charcoal-rgb) / 18%);
  transition:
    top var(--duration-base) var(--ease-standard),
    min-height var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard),
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    color var(--duration-base) var(--ease-standard),
    transform var(--duration-base) var(--ease-standard);
}

.site-header.liquid-glass.is-scrolled,
.site-header.liquid-glass.is-open {
  --liquid-blur: 24px;
  --liquid-shadow: 0 1px 1px rgb(255 255 255 / 34%), 0 14px 38px rgb(var(--color-brand-charcoal-rgb) / 14%), 0 40px 100px rgb(var(--color-brand-charcoal-rgb) / 18%);
  background:
    linear-gradient(105deg, rgb(255 255 255 / 54%), transparent 34% 74%, rgb(var(--color-brand-gold-rgb) / 12%)),
    rgb(236 232 221 / 82%);
  transform: translate(-50%) scale(.985);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.liquid-glass {
    -webkit-backdrop-filter: blur(var(--liquid-blur)) saturate(154%) brightness(1.01);
    backdrop-filter: blur(var(--liquid-blur)) saturate(154%) brightness(1.01);
  }
}

/* Section 3: one consistent scroll reveal pattern */
.reveal {
  --reveal-distance: 1.15rem;
  --reveal-duration: .78s;
  filter: blur(8px);
  transition:
    opacity var(--reveal-duration) var(--ease-premium) var(--reveal-delay),
    transform var(--reveal-duration) var(--ease-premium) var(--reveal-delay),
    filter var(--reveal-duration) var(--ease-premium) var(--reveal-delay);
  will-change: opacity, transform, filter;
}

.reveal.is-visible,
.reveal.is-reduced-motion {
  filter: blur(0);
}

.feature-pillar.reveal,
.principles-rail__item.reveal,
.company-process__step.reveal,
.factory-flow > .reveal,
.factory-section__media.reveal,
.factory-section__header.reveal,
.factory-section__action.reveal,
.capability-tile.reveal {
  transition-duration: .82s;
}

.feature-pillar.reveal.is-visible,
.principles-rail__item.reveal.is-visible,
.company-process__step.reveal.is-visible,
.factory-flow > .reveal.is-visible,
.capability-tile.reveal.is-visible {
  transform: translate3d(0, 0, 0);
}

.feature-pillar:after,
.company-process--timeline .company-process__sequence:before {
  animation-duration: 4.8s;
}

/* Section 4: project cards with restrained glass glow */
.project-card__button,
.projects-preview .editorial-gallery__media {
  transition:
    box-shadow .42s var(--ease-standard),
    transform .42s var(--ease-standard),
    filter .42s var(--ease-standard);
}

.project-card__button {
  box-shadow: 0 16px 42px rgb(var(--color-brand-charcoal-rgb) / 12%);
}

.project-card__button:before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  inset: 0;
  background:
    radial-gradient(74% 46% at 52% 0%, rgb(var(--color-brand-gold-rgb) / 24%), transparent 64%),
    linear-gradient(180deg, transparent 36%, rgb(var(--color-brand-charcoal-rgb) / 14%));
  transition: opacity .42s var(--ease-standard);
}

.project-card__media img,
.projects-preview .editorial-gallery__media img {
  transition: transform .62s var(--ease-premium), filter .62s var(--ease-premium);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .project-card__button:hover,
  .project-card__button:focus-visible {
    box-shadow:
      0 1px 0 rgb(255 255 255 / 46%) inset,
      0 18px 52px rgb(var(--color-brand-charcoal-rgb) / 18%),
      0 0 46px rgb(var(--color-brand-gold-rgb) / 18%);
    transform: translate3d(0, -.22rem, 0);
  }

  .project-card__button:hover:before,
  .project-card__button:focus-visible:before {
    opacity: 1;
  }

  .project-card__button:hover .project-card__media img,
  .project-card__button:focus-visible .project-card__media img,
  .projects-preview .editorial-gallery__item:hover .editorial-gallery__media img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.04);
  }
}

/* Section 5: CTA high-intent glow moment */
.page-cta__content.liquid-glass {
  overflow: hidden;
}

.page-cta__content.liquid-glass:after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  opacity: .72;
  background: linear-gradient(120deg, transparent 0 18%, rgb(var(--color-brand-gold-rgb) / 72%) 34%, rgb(var(--color-brand-red-rgb) / 62%) 50%, rgb(185 128 54 / 70%) 66%, transparent 82% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 220% 100%;
  animation: cta-border-travel 7s ease-in-out infinite;
}

.page-cta__actions .glass-button:first-child,
.page-cta__actions .link-button:first-child {
  position: relative;
  isolation: isolate;
}

.page-cta__actions .glass-button:first-child:before,
.page-cta__actions .link-button:first-child:before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  inset: -.55rem;
  opacity: .38;
  filter: blur(16px);
  background: radial-gradient(circle, rgb(var(--color-brand-gold-rgb) / 62%), rgb(var(--color-brand-red-rgb) / 22%) 58%, transparent 76%);
  animation: cta-button-pulse 3.8s ease-in-out infinite;
}

@keyframes cta-border-travel {
  0%, 100% { background-position: 0% 50%; opacity: .48; }
  50% { background-position: 100% 50%; opacity: .82; }
}

@keyframes cta-button-pulse {
  0%, 100% { opacity: .28; transform: scale(.96); }
  50% { opacity: .54; transform: scale(1.04); }
}

/* Motion accessibility */
@media (max-width: 47.5rem), (prefers-reduced-motion: reduce) {
  .ambient-background:before,
  .ambient-orb,
  .page--home .hero:after,
  .page-cta__content.liquid-glass:after,
  .page-cta__actions .glass-button:first-child:before,
  .page-cta__actions .link-button:first-child:before {
    animation: none;
  }
}

@media (max-width: 47.5rem) {
  .page--home .hero h1 {
    font-size: clamp(2.45rem, 10.4vw, 3.25rem);
    line-height: 1.04;
  }

  .page--home .hero-copy {
    max-width: min(100%, 22rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-background {
    display: none;
  }

  .page--home .hero-copy > .hero-eyebrow,
  .page--home .hero-copy .hero-title-mask,
  .page--home .hero-copy .hero-lower,
  .page--home .hero-copy .hero-data-strip,
  .page--home .hero h1 span,
  .reveal,
  .project-card__button,
  .project-card__media img,
  .projects-preview .editorial-gallery__media img {
    opacity: 1;
    filter: none;
    transform: none;
    transition-duration: .01ms;
    animation: none;
    will-change: auto;
  }
}

.page--home .hero .reveal-up {
  animation: none;
}
