/* ============================================
   ANGUS NELSON — Enhanced Animations & Effects
   ============================================ */

/* --- Parallax Hero --- */
.parallax-hero {
  position: relative;
  overflow: hidden;
}

.parallax-hero__bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  z-index: 0;
  will-change: transform;
}

.parallax-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.parallax-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.parallax-hero__content {
  position: relative;
  z-index: 2;
}

/* --- Enhanced Scroll Animations --- */

/* Fade up (default) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade left */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade right */
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delays */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* --- Gold line draw animation --- */
.divider-gold-animate {
  width: 0;
  height: 1px;
  background: var(--gold-accent);
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: 0.3s;
}

.divider-gold-animate.visible {
  width: 60px;
}

.divider-gold-animate--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Counting Numbers --- */
.counter-value {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--navy-primary);
  display: inline-block;
}

.counter-prefix {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--navy-primary);
}

.counter-suffix {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  color: var(--navy-primary);
}

/* --- Image Hover Effects --- */
.img-hover {
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

.img-hover img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.6s ease;
}

.img-hover:hover img {
  transform: scale(1.04);
}

.img-hover--darken::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 26, 46, 0.4) 100%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* --- Enhanced Button Hover --- */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--secondary {
  position: relative;
}

.btn--secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold-accent);
  transition: width 0.35s ease, left 0.35s ease;
}

.btn--secondary:hover::after {
  width: 80%;
  left: 10%;
}

/* --- Card / Block Hover --- */
.c3-card {
  transition: transform 0.4s ease, background 0.4s ease;
  border-radius: 4px;
}

.c3-card:hover {
  transform: translateY(-4px);
  background: rgba(250, 248, 245, 0.05);
}

/* --- Metric Hover --- */
.metric {
  transition: transform 0.3s ease;
}

.metric:hover {
  transform: translateY(-2px);
}

/* --- Logo Strip Hover Enhancement --- */
.logo-strip__item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-strip__item:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* --- Photo Gallery / Carousel --- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  overflow: hidden;
}

.photo-gallery__item {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4/3;
  position: relative;
}

.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-gallery__item:hover img {
  transform: scale(1.06);
}

.photo-gallery__item--wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .photo-gallery__item--wide {
    grid-column: span 2;
  }
}

/* --- Email Popup / Modal --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 26, 46, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 9999;
  background: var(--ivory);
  max-width: 520px;
  width: 90%;
  padding: 56px 48px;
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(15, 26, 46, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.popup.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.popup__close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--slate-light);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
  line-height: 1;
}

.popup__close:hover {
  color: var(--navy-primary);
}

.popup__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-accent);
  margin-bottom: 12px;
  display: block;
}

.popup__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--navy-primary);
  margin-bottom: 16px;
  line-height: 1.25;
}

.popup__text {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 24px;
}

.popup__bullets {
  list-style: none;
  margin-bottom: 28px;
}

.popup__bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.5;
}

.popup__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 1px;
  background: var(--gold-accent);
}

.popup__form {
  display: flex;
  gap: 10px;
}

.popup__form input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid var(--border-light);
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

.popup__form input[type="email"]:focus {
  border-color: var(--gold-accent);
}

.popup__form .btn {
  white-space: nowrap;
  padding: 14px 24px;
  font-size: 0.72rem;
}

.popup__micro {
  font-size: 0.7rem;
  color: var(--slate-light);
  margin-top: 12px;
}

@media (max-width: 768px) {
  .popup {
    padding: 40px 28px;
  }
  .popup__form {
    flex-direction: column;
  }
  .popup__title {
    font-size: 1.35rem;
  }
}

/* --- Smooth Section Divider --- */
.section-wave {
  position: relative;
}

.section-wave::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 0%);
}

/* --- Video Embed Container --- */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--navy-deep);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Page transition smoothness --- */
.section {
  transition: background-color 0.3s ease;
}

/* --- Scrolling Logo Marquee --- */
.marquee-section {
  overflow: hidden;
  padding: 40px 0;
  background: var(--navy-deep);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 60px;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.marquee-track img {
  height: 28px;
  width: auto;
  opacity: 0.55;
  filter: brightness(1.1);
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.marquee-track img:hover {
  opacity: 0.9;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .marquee-track {
    gap: 40px;
    animation-duration: 20s;
  }
  .marquee-track img {
    height: 22px;
  }
}

/* --- Full-Bleed Hero --- */
.hero-fullbleed {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-fullbleed__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-fullbleed__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.hero-fullbleed__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(15, 26, 46, 0.88) 0%,
    rgba(15, 26, 46, 0.72) 35%,
    rgba(15, 26, 46, 0.3) 60%,
    rgba(15, 26, 46, 0.05) 80%
  );
  z-index: 1;
}

.hero-fullbleed__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding-top: 100px;
  margin-left: 0;
}

.hero-fullbleed h1 {
  color: var(--text-on-dark-bright);
}

.hero-fullbleed p,
.hero-fullbleed li {
  color: var(--text-on-dark);
}

.hero-fullbleed .recognition-list li::before {
  background: var(--gold-accent);
}

@media (max-width: 768px) {
  .hero-fullbleed {
    min-height: 90vh;
  }
  .hero-fullbleed__overlay {
    background: linear-gradient(
      to bottom,
      rgba(15, 26, 46, 0.75) 0%,
      rgba(15, 26, 46, 0.85) 50%,
      rgba(15, 26, 46, 0.7) 100%
    );
  }
  .hero-fullbleed__bg img {
    object-position: center center;
  }
  .hero-fullbleed__content {
    padding-top: 80px;
    max-width: 100%;
  }
}

/* --- Reduced motion support --- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .parallax-hero__bg {
    top: 0;
    height: 100%;
  }
  
  .img-hover img {
    transition: none;
  }
  
  .divider-gold-animate {
    width: 60px;
    transition: none;
  }
}
