/* American Crest — Motion System */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Custom cursor */
.ac-cursor {
  position: fixed;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #bd8d43;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .25s ease, height .25s ease, background .25s ease, opacity .25s ease;
  opacity: 0;
}
.ac-cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(189,141,67,.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999997;
  transform: translate(-50%, -50%);
  transition: width .35s cubic-bezier(.22,1,.36,1), height .35s cubic-bezier(.22,1,.36,1), border-color .3s, opacity .3s;
  opacity: 0;
}
.ac-cursor.is-hover, .ac-cursor-ring.is-hover {
  opacity: 1;
}
.ac-cursor.is-hover { width: 0; height: 0; }
.ac-cursor-ring.is-hover { width: 64px; height: 64px; border-color: #bd8d43; }
.ac-cursor.is-click { width: 8px; height: 8px; }
@media (pointer: coarse) {
  .ac-cursor, .ac-cursor-ring { display: none !important; }
}

/* Glow */
.ac-glow {
  box-shadow: 0 0 20px rgba(189,141,67,.25), 0 0 60px rgba(189,141,67,.1);
  transition: box-shadow .4s ease;
}
.ac-glow:hover {
  box-shadow: 0 0 30px rgba(189,141,67,.45), 0 0 80px rgba(189,141,67,.2);
}

/* Glitch text */
.ac-glitch {
  position: relative;
}
.ac-glitch::before, .ac-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.ac-glitch:hover::before {
  opacity: .8;
  color: #0ff;
  clip-path: inset(0 0 55% 0);
  transform: translate(-2px, -1px);
  animation: acGlitch 0.35s infinite linear alternate-reverse;
}
.ac-glitch:hover::after {
  opacity: .8;
  color: #f0f;
  clip-path: inset(45% 0 0 0);
  transform: translate(2px, 1px);
  animation: acGlitch 0.3s infinite linear alternate-reverse;
}
@keyframes acGlitch {
  0% { clip-path: inset(20% 0 60% 0); }
  50% { clip-path: inset(50% 0 20% 0); }
  100% { clip-path: inset(10% 0 70% 0); }
}

/* Infinite marquee */
.ac-marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  background: #102b4a;
  color: #f7f3eb;
  padding: 14px 0;
  border-top: 1px solid rgba(189,141,67,.3);
  border-bottom: 1px solid rgba(189,141,67,.3);
}
.ac-marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: acMarquee 28s linear infinite;
  will-change: transform;
}
.ac-marquee-track span {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: #bd8d43;
}
.ac-marquee-track span::after {
  content: " ◆ ";
  color: rgba(247,243,235,.35);
}
@keyframes acMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Image reveal / clip-path */
.ac-reveal-img {
  overflow: hidden;
  position: relative;
}
.ac-reveal-img img {
  transform: scale(1.15);
  transition: transform 1.2s cubic-bezier(.22,1,.36,1);
}
.ac-reveal-img.is-in img {
  transform: scale(1);
}
.ac-reveal-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #102b4a;
  transform-origin: right center;
  transition: transform .9s cubic-bezier(.76,0,.24,1);
}
.ac-reveal-img.is-in::after {
  transform: scaleX(0);
}

/* 3D tilt */
.ac-tilt {
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  will-change: transform;
}

/* Kinetic type */
.ac-kinetic span {
  display: inline-block;
  transition: transform .4s cubic-bezier(.22,1,.36,1), color .3s;
}
.ac-kinetic:hover span {
  color: #bd8d43;
}

/* Particle canvas */
#ac-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: .45;
}
body > *:not(#ac-particles):not(.ac-cursor):not(.ac-cursor-ring) {
  position: relative;
  z-index: 2;
}
.popup-overlay, .navbar, header, .ac-cursor, .ac-cursor-ring {
  z-index: 99999 !important;
}

/* Liquid blob decoration */
.ac-liquid {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: radial-gradient(circle at 30% 30%, rgba(189,141,67,.2), rgba(16,43,74,.08));
  filter: blur(40px);
  animation: acLiquid 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes acLiquid {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0,0) rotate(0deg); }
  33% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; transform: translate(20px,-15px) rotate(8deg); }
  66% { border-radius: 30% 70% 40% 60% / 60% 30% 70% 40%; transform: translate(-15px,20px) rotate(-5deg); }
}

/* Elastic hover for cards */
.service-card, .why-card, .portfolio-item, .book, .card {
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease !important;
}

/* Stagger initial state */
[data-ac-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
}
