/* =============================================
   Hero Section Animations & Design Upgrade
   - Ken Burns background with veil reveal
   - Clip-path heading reveal
   - Gold shimmer buttons
   ============================================= */

/* --- 1A. Ken Burns Background (::before pseudo-element) --- */
.hero-section {
  position: relative !important;
  overflow: hidden !important;
  background-image: none !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-image: linear-gradient(180deg, var(--_primitives---opacity--neutral-darkest-60), var(--_primitives---opacity--transparent) 52%, var(--_primitives---opacity--neutral-darkest-60) 85%), url(../images/hero_image-202.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: kenBurns 25s ease-in-out infinite alternate;
  will-change: transform;
  z-index: 0;
}

@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-0.5%, -0.5%);
  }
}

/* --- 1B. Veil Reveal (::after pseudo-element) --- */
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  opacity: 1;
  animation: veilReveal 1.5s ease-out 0.2s forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes veilReveal {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Content must sit above both pseudo-elements */
.hero-section > .spacer-huge,
.hero-section > .w-layout-blockcontainer {
  position: relative;
  z-index: 2;
}

/* --- 1C. Clip-Path Heading Reveal --- */
.hero-heading {
  clip-path: inset(0 100% 0 0);
  position: relative;
}

/* Gold accent line that leads the reveal */
.hero-heading::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #C9A227, #E8D48B, #C9A227);
  opacity: 0;
  transform: scaleY(0);
}

/* Paragraph fade in */
.hero-section .hero-content-flex .hero-paragraph {
  opacity: 0;
  transform: translateY(12px);
}

/* Buttons fade in */
.hero-section .hero-content-flex .buttons-hero {
  opacity: 0;
  transform: translateY(12px);
}

/* --- Animated state (triggered by JS adding .hero-animated) --- */
.hero-animated .hero-heading {
  animation: clipReveal 0.9s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.hero-animated .hero-heading::after {
  animation: accentLine 0.9s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.hero-animated .hero-content-flex .hero-paragraph {
  animation: fadeSlideUp 0.6s ease-out 0.3s forwards;
}

.hero-animated .hero-content-flex .buttons-hero {
  animation: fadeSlideUp 0.6s ease-out 0.5s forwards;
}

@keyframes clipReveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0% 0 0);
  }
}

@keyframes accentLine {
  0% {
    opacity: 1;
    transform: scaleY(0);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1);
  }
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 1E. Gold Shimmer Buttons --- */

/* Primary button shimmer */
.button.is-icon {
  overflow: hidden;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 12px rgba(25, 81, 63, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.button.is-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 30%,
    rgba(201, 162, 39, 0.2) 45%,
    rgba(201, 162, 39, 0.35) 50%,
    rgba(201, 162, 39, 0.2) 55%,
    transparent 70%,
    transparent 100%
  );
  transition: left 0.7s ease;
  z-index: 1;
  pointer-events: none;
}

.button.is-icon:hover::before {
  left: 100%;
}

.button.is-icon:hover {
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow:
    0 8px 24px rgba(25, 81, 63, 0.3),
    0 0 20px rgba(201, 162, 39, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Arrow icon bouncy slide on hover */
.button.is-icon .icon-embed-xsmall {
  position: relative;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button.is-icon:hover .icon-embed-xsmall {
  transform: translateX(4px) !important;
}

/* Button text above shimmer */
.button.is-icon .text-block {
  position: relative;
  z-index: 2;
}

/* Secondary (alternate) button - gold gradient border */
.button.is-icon.is-alternate {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.button.is-icon.is-alternate::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.4), rgba(232, 212, 139, 0.3), rgba(201, 162, 39, 0.4));
  border-radius: inherit;
  z-index: 0;
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Inner background to create border effect */
.button.is-icon.is-alternate::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: #ffffff;
  border-radius: inherit;
  z-index: 0;
  transition: background 0.3s ease;
  pointer-events: none;
}

.button.is-icon.is-alternate:hover::after {
  opacity: 1;
}

.button.is-icon.is-alternate:hover {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.12),
    0 0 16px rgba(201, 162, 39, 0.1);
  background-color: #f7f5f1 !important;
}

.button.is-icon.is-alternate:hover::before {
  background: #f7f5f1;
}

/* Alternate button text and icon above pseudo-elements */
.button.is-icon.is-alternate .text-block,
.button.is-icon.is-alternate .icon-embed-xsmall {
  position: relative;
  z-index: 1;
}

/* --- 1F. Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before {
    animation: none;
    transform: scale(1);
  }

  .hero-section::after {
    animation: none;
    opacity: 0;
  }

  .hero-heading {
    clip-path: none;
    animation: none !important;
  }

  .hero-heading::after {
    animation: none !important;
    opacity: 0;
  }

  .hero-section .hero-content-flex .hero-paragraph {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero-section .hero-content-flex .buttons-hero {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero-animated .hero-heading,
  .hero-animated .hero-heading::after,
  .hero-animated .hero-content-flex .hero-paragraph,
  .hero-animated .hero-content-flex .buttons-hero {
    animation: none !important;
    clip-path: none;
    opacity: 1;
    transform: none;
  }

  .button.is-icon::before {
    display: none;
  }

  .button.is-icon:hover .icon-embed-xsmall {
    transform: none !important;
  }
}
