/* Premium motion system: CSS-first, respects reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg-image {
    animation: none !important;
    transform: none !important;
  }
  .parallax-move {
    transform: none !important;
  }
}

/* Page load: keep body visible without JS (broken or blocked scripts must not whitescreen the site). */
body {
  opacity: 1;
  transition: opacity 0.45s ease;
}
body.is-loaded {
  opacity: 1;
}
body.page-exit {
  opacity: 0;
  transition: opacity 0.22s ease;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.hero-bg-layer {
  transform: translateZ(0);
  will-change: transform;
}

.hero-bg-image {
  animation: heroKenBurns 22s ease-in-out infinite alternate;
  transform-origin: 50% 40%;
  will-change: transform;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-eyebrow {
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.hero-title {
  animation: fadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.hero-sub {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}
.hero-tagline-line {
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.42s both;
}
.hero-cta a:nth-child(1) {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}
.hero-cta a:nth-child(2) {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both;
}

/* Scroll reveal */
.reveal-section {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-section.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-section.is-visible .reveal-stagger > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(1) {
  transition-delay: 0.04s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(3) {
  transition-delay: 0.16s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(4) {
  transition-delay: 0.22s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(5) {
  transition-delay: 0.28s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(6) {
  transition-delay: 0.34s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(7) {
  transition-delay: 0.4s;
}
.reveal-section.is-visible .reveal-stagger > *:nth-child(8) {
  transition-delay: 0.46s;
}

/* Image viewport reveal */
.motion-img {
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion-img.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Project / feature cards */
.card-media {
  position: relative;
  overflow: hidden;
}
.card-media img {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-media:hover img {
  transform: scale(1.06);
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  opacity: 0.7;
  transition: opacity 0.35s ease;
}
.card-media:hover .card-overlay {
  opacity: 1;
}
.card-hover-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.25rem 1rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.card-media:hover .card-hover-cap {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.card-float {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}
.card-float:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Triple constraint emphasis */
@keyframes tcGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 176, 150, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(201, 176, 150, 0);
    transform: scale(1.08);
  }
}

.tc-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.tc-node-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg,rgb(201 176 150),rgb(139 94 56));
  animation: tcGlow 2.6s ease-in-out infinite;
}
.tc-node:nth-child(2) .tc-node-dot {
  animation-delay: 0.65s;
}
.tc-node:nth-child(3) .tc-node-dot {
  animation-delay: 1.3s;
}

/* Buttons */
.btn-premium {
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background-color,
    border-color,
    box-shadow 0.2s ease;
}
.btn-premium:hover {
  transform: scale(1.03);
}
.btn-premium:active {
  transform: scale(0.99);
}

/* Navbar scrolled (backup if JS toggles classes) */
#site-header.is-solid {
  border-bottom-width: 1px;
  background-color: rgba(36, 28, 23, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Parallax layers */
.parallax-hero .hero-bg-layer {
  transition: transform 0.12s linear;
}
.parallax-band {
  will-change: transform;
}

/* Projects page: cover-flow style carousel */
.project-coverflow__viewport {
  position: relative;
  height: min(52vh, 460px);
  max-height: 520px;
  perspective: 1400px;
  transform-style: preserve-3d;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.project-coverflow__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(280px, 78vw);
  height: calc(min(280px, 78vw) * 1.28);
  max-height: min(360px, 88vh);
  overflow: hidden;
  border-radius: 1.15rem;
  background: #e2e8f0;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%) translateX(0) scale(1);
  will-change: transform, filter, opacity;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s ease,
    opacity 0.4s ease;
}

.project-coverflow__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-coverflow__dot[aria-current="true"],
.project-coverflow__dot--active {
  background-color: #0f172a;
  border-color: #0f172a;
}

.project-coverflow--hero .project-coverflow__viewport {
  height: min(58vh, 620px);
  max-height: 680px;
}

.project-coverflow--hero .project-coverflow__card {
  width: min(328px, 86vw);
  height: calc(min(328px, 86vw) * 1.28);
  max-height: min(500px, 74vh);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
}

/* Capabilities intro: heading shadow aligned with body copy for readability */
#our-capabilities .capabilities-intro-eyebrow {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
}
#our-capabilities .capabilities-intro h2 {
  text-shadow:
    0 1px 18px rgba(0, 0, 0, 0.78),
    0 2px 28px rgba(0, 0, 0, 0.55);
}
#our-capabilities .capabilities-intro p {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.75);
}
#our-capabilities .capability-card h3 {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
}
#our-capabilities .capability-card p {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* Hero copy: soft depth on type over textured background */
.hero-copy-panel .hero-title {
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}
.hero-copy-panel .hero-sub {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}
.hero-copy-panel .hero-tagline-line {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}

.project-coverflow--hero .project-coverflow__dot[aria-current="true"],
.project-coverflow--hero .project-coverflow__dot--active {
  background-color: #fff;
  border-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .project-coverflow__card {
    transition-duration: 0.01ms !important;
  }
}
