/* Full Cinematic Animation System — Ivory & Forest Editorial */
:root {
  --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-slow: 1.1s;
  --dur-med: 0.78s;
}

/* Editorial Crest Loader & Smooth Page Crossfade */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #183E32 0%, var(--forest-deep) 78%);
  color: var(--ivory);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 550ms var(--ease-editorial),
              visibility 550ms,
              transform 650ms var(--ease-editorial);
}

.anim-ready .site-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.anim-ready .site-loader.is-done {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.site-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: 24px;
  transition: transform 420ms var(--ease-editorial), opacity 340ms ease;
}

.site-loader.is-done .site-loader__inner {
  opacity: 0;
  transform: translateY(-12px);
}

.site-loader__emblem {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.site-loader__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.site-loader__ring-track {
  fill: none;
  stroke: rgba(248, 246, 241, 0.14);
  stroke-width: 1.5;
}

.site-loader__ring-fill {
  fill: none;
  stroke: var(--copper-light);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  animation: loaderRingDraw 0.82s var(--ease-editorial) 0.08s forwards;
}

.site-loader__monogram {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--ivory);
  animation: loaderFadeRise 0.5s var(--ease-cinematic) 0.1s both;
}

.site-loader__logo-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--ivory);
  display: grid;
  place-items: center;
  padding: 6px;
  animation: loaderFadeRise 0.5s var(--ease-cinematic) 0.1s both;
}

.site-loader__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-loader__brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--paper);
  margin-bottom: 6px;
  animation: loaderFadeRise 0.55s var(--ease-cinematic) 0.16s both;
}

.site-loader__tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 20px;
  animation: loaderFadeRise 0.55s var(--ease-cinematic) 0.24s both;
}

.site-loader__line {
  width: 120px;
  height: 1.5px;
  background: rgba(248, 246, 241, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

.site-loader__line-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--copper-light));
  transform-origin: left center;
  transform: scaleX(0);
  animation: loaderBarFill 0.8s var(--ease-editorial) 0.1s forwards;
}

@keyframes loaderRingDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes loaderBarFill {
  to {
    transform: scaleX(1);
  }
}

@keyframes loaderFadeRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lightweight Ivory Page Crossfade on Internal Navigation */
.page-fade {
  position: fixed;
  inset: 0;
  z-index: 990;
  background: var(--ivory);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-cinematic);
}

.page-fade.is-leaving {
  opacity: 1;
  pointer-events: all;
}

/* Top Scroll Progress Hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 250;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--copper-light), var(--forest));
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  box-shadow: 0 0 10px rgba(180, 105, 62, 0.45);
}

/* Header Scroll Elevation & Nav Underline */
.header {
  transition: background-color 380ms var(--ease-cinematic),
              box-shadow 380ms var(--ease-cinematic),
              border-color 380ms var(--ease-cinematic),
              transform 380ms var(--ease-cinematic);
}

.header.is-scrolled {
  background: rgba(248, 246, 241, 0.96);
  box-shadow: 0 12px 32px rgba(13, 38, 30, 0.08);
}

.nav a {
  position: relative;
  padding-block: 4px;
  transition: color 240ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 340ms var(--ease-cinematic);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Word-by-Word Masked Headline Reveal */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.word-inner {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  transition: transform 0.95s var(--ease-editorial), opacity 0.65s ease;
  transition-delay: var(--word-delay, 0ms);
  will-change: transform, opacity;
}

.anim-ready .is-words-visible .word-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Hero Initial Choreography */
@keyframes heroLift {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSubtleTitle {
  from {
    opacity: 0;
    transform: translateY(34px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 -12% 0);
  }
}

@keyframes panoramaReveal {
  from {
    opacity: 0;
    clip-path: inset(16% 6% 0 6% round 16px 16px 0 0);
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 16px 16px 0 0);
    transform: translateY(0);
  }
}

@keyframes kenBurnsSettle {
  from {
    transform: scale(1.14);
  }
  to {
    transform: scale(1);
  }
}

.anim-ready:not(.hero-ready) .cinema-banner,
.anim-ready:not(.hero-ready) .page-hero .eyebrow,
.anim-ready:not(.hero-ready) .page-hero__sub {
  opacity: 0;
}

.anim-ready.hero-ready .cinema-banner,
.anim-ready.hero-ready .page-hero .eyebrow {
  animation: heroLift 0.85s var(--ease-cinematic) 0.04s both;
}

.anim-ready.hero-ready .page-hero h1:not([data-split-words]) {
  animation: heroSubtleTitle 1.05s var(--ease-editorial) 0.12s both;
}

.anim-ready.hero-ready .page-hero__sub {
  animation: heroLift 0.9s var(--ease-cinematic) 0.24s both;
}

/* Ambient Atmospheric Glow on Forest Bands */
.forest-band {
  position: relative;
  overflow: hidden;
}

.forest-band::before {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  top: -220px;
  right: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 105, 62, 0.14) 0%, rgba(180, 105, 62, 0) 68%);
  pointer-events: none;
  animation: ambientDrift 16s ease-in-out infinite alternate;
}

.forest-band::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  bottom: -240px;
  left: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 148, 109, 0.09) 0%, rgba(216, 148, 109, 0) 70%);
  pointer-events: none;
  animation: ambientDrift 20s ease-in-out infinite alternate-reverse;
}

.forest-band > .container {
  position: relative;
  z-index: 1;
}

@keyframes ambientDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-45px, 30px, 0) scale(1.12);
  }
}

/* Scroll-Triggered Reveals */
.anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--dur-slow) var(--ease-cinematic),
              transform var(--dur-slow) var(--ease-cinematic),
              clip-path var(--dur-slow) var(--ease-editorial);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.anim-ready [data-reveal="fade-left"] {
  transform: translateX(-34px);
}

.anim-ready [data-reveal="fade-right"] {
  transform: translateX(34px);
}

.anim-ready [data-reveal="scale-soft"] {
  transform: translateY(28px) scale(0.95);
}

.anim-ready [data-reveal="curtain"] {
  transform: translateY(24px);
}

.anim-ready [data-reveal="image-frame"] {
  clip-path: inset(12% 4% 12% 4% round 12px);
  transform: translateY(28px);
}

.anim-ready [data-reveal="image-frame"] img {
  transform: scale(1.16);
  transition: transform 1.6s var(--ease-editorial);
  transition-delay: var(--reveal-delay, 0ms);
}

.anim-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0 0 -10% 0);
}

.anim-ready [data-reveal="image-frame"].is-visible {
  clip-path: inset(0 0 0 0 round 12px);
}

.anim-ready [data-reveal="image-frame"].is-visible img {
  transform: scale(1);
}

/* Animated Hairline Draw on Service Rows & Process Block */
.anim-ready .service-rows,
.anim-ready .process-block {
  position: relative;
}

.anim-ready .service-row {
  border-bottom-color: transparent;
}

.anim-ready .service-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hairline);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease-editorial);
  transition-delay: calc(var(--reveal-delay, 0ms) + 120ms);
}

.anim-ready .service-row.is-visible::after {
  transform: scaleX(1);
}

/* Button Sheen & Magnetic Tactile Feel */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 280ms var(--ease-cinematic),
              background-color 240ms ease,
              border-color 240ms ease,
              box-shadow 280ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%);
  transform: translateX(-125%);
  transition: transform 0.7s var(--ease-cinematic);
  pointer-events: none;
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(125%);
}

.btn:hover {
  box-shadow: 0 12px 26px rgba(13, 38, 30, 0.14);
}

.btn:active {
  transform: translateY(0) scale(0.97) !important;
}

/* Service Row Cinematic Hover */
.service-row {
  position: relative;
  transition: background-color 300ms var(--ease-cinematic),
              padding-inline 340ms var(--ease-cinematic),
              border-color 300ms var(--ease-cinematic);
}

.service-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 3px;
  border-radius: 3px;
  background: var(--copper);
  transform: scaleY(0);
  transition: transform 320ms var(--ease-cinematic);
}

.service-row:hover::before {
  transform: scaleY(1);
}

.service-row__num,
.service-row__arrow {
  transition: transform 340ms var(--ease-cinematic), color 280ms ease;
}

.service-row:hover .service-row__num {
  transform: translateX(5px);
}

.service-row:hover .service-row__arrow {
  transform: translateX(8px);
  color: var(--copper);
}

/* Spotlight & Elevation on Cards */
.sector-card,
.step-card,
.checklist-card,
.value-card {
  position: relative;
  overflow: hidden;
  transition: transform 440ms var(--ease-cinematic),
              box-shadow 440ms var(--ease-cinematic),
              border-color 440ms var(--ease-cinematic),
              background-color 440ms var(--ease-cinematic);
}

.sector-card::after,
.checklist-card::after,
.value-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(180, 105, 62, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.sector-card:hover::after,
.checklist-card:hover::after,
.value-card:hover::after {
  opacity: 1;
}

.sector-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--copper), var(--forest));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms var(--ease-cinematic);
}

.sector-card:hover::before {
  transform: scaleX(1);
}

.sector-card:hover .sector-card__icon {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ivory);
  transform: translateY(-2px) scale(1.04);
}

.sector-card:hover .sector-card__arrow {
  transform: translateX(5px);
  color: var(--copper);
}

.checklist-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--copper), var(--forest));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms var(--ease-cinematic);
}

.checklist-card:hover::before,
.checklist-card.is-targeted::before {
  transform: scaleX(1);
}

.checklist-card:hover .checklist-card__icon {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ivory);
  transform: translateY(-2px) scale(1.04);
}

.checklist-card.is-targeted {
  border-color: rgba(180, 105, 62, 0.55);
  box-shadow: 0 22px 48px rgba(180, 105, 62, 0.14);
}

@keyframes filterCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.checklist-card.is-filtering-in {
  animation: filterCardIn 0.52s var(--ease-cinematic) both;
}

.value-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--copper), var(--forest));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms var(--ease-cinematic);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-card:hover .value-card__icon {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ivory);
  transform: translateY(-2px) scale(1.04);
}

.bundle-card {
  transition: transform 420ms var(--ease-cinematic),
              background-color 360ms ease,
              border-color 360ms ease,
              box-shadow 420ms var(--ease-cinematic);
}

.bundle-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(216, 148, 109, 0.5);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.sector-card:hover,
.checklist-card:hover,
.value-card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 105, 62, 0.45);
  box-shadow: 0 20px 44px rgba(20, 54, 43, 0.09);
}

.step-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(216, 148, 109, 0.5);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

/* Review Marquee Hover & Motion Safety */

/* FAQ Smooth Plus Rotation & Answer Fade */
.faq-btn span {
  display: inline-block;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 340ms var(--ease-snappy), color 240ms ease;
}

.faq-btn[aria-expanded="true"] span {
  transform: rotate(45deg);
  color: var(--copper);
}

.faq-ans {
  opacity: 0;
  transition: max-height 380ms var(--ease-cinematic), opacity 300ms ease;
}

.faq-item.is-open .faq-ans {
  opacity: 1;
}

/* Mobile Nav Stagger */
.mobile-nav__links > a {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 420ms var(--ease-cinematic), transform 420ms var(--ease-cinematic), color 200ms ease;
}

.mobile-drawer.is-open .mobile-nav__links > a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-drawer.is-open .mobile-nav__links > a:nth-of-type(1) { transition-delay: 80ms; }
.mobile-drawer.is-open .mobile-nav__links > a:nth-of-type(2) { transition-delay: 140ms; }
.mobile-drawer.is-open .mobile-nav__links > a:nth-of-type(3) { transition-delay: 200ms; }
.mobile-drawer.is-open .mobile-nav__links > a:nth-of-type(4) { transition-delay: 260ms; }
.mobile-drawer.is-open .mobile-nav__links > a:nth-of-type(5) { transition-delay: 320ms; }

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-progress,
  .site-loader,
  .page-fade {
    display: none !important;
  }

  .forest-band::before,
  .forest-band::after,
  .reviews-track--ltr,
  .reviews-track--rtl {
    animation: none !important;
  }

  .reviews-row {
    overflow-x: auto;
  }

  .anim-ready .cinema-banner,
  .anim-ready .page-hero .eyebrow,
  .anim-ready .page-hero h1,
  .anim-ready .page-hero__sub {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .cinema-slide__media img,
  .cinema-slide__copy > * {
    transition: none !important;
    transform: none !important;
  }

  .cinema-tab.is-active .cinema-tab__bar {
    animation: none !important;
    transform: scaleX(1);
  }

  .word-inner,
  .anim-ready [data-reveal],
  .anim-ready [data-reveal="image-frame"] img,
  .anim-ready .service-row::after {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  .btn::before,
  .sector-card,
  .step-card,
  .checklist-card,
  .value-card,
  .service-row,
  .faq-btn span,
  .faq-ans,
  .custom-select__menu,
  .custom-select__chevron,
  .form-field::after {
    transition: none !important;
  }
}
