/* ============================================
   PREMIUM ENHANCEMENTS - chantalbortolussi.com
   ============================================ */

/* ── Self-hosted Playfair Display ── */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v37-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v37-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v37-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ── 1. Custom Cursor (desktop only) ── */
@media (min-width: 1024px) {
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--lgr-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    will-change: transform;
    mix-blend-mode: difference;
  }

  .custom-cursor.visible {
    opacity: 1;
  }

  .custom-cursor.active {
    width: 14px;
    height: 14px;
    border-color: var(--lgr-accent2);
  }

  .custom-cursor.hover-link {
    width: 40px;
    height: 40px;
    border-color: var(--lgr-accent);
    background: rgba(191, 163, 126, 0.08);
  }
}

/* ── 2. Shimmer Effect on CTA Buttons ── */
@keyframes shimmer-sweep {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.contact-button {
  position: relative;
  overflow: hidden;
}

.contact-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.12),
    transparent
  );
  animation: shimmer-sweep 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.contact-button:hover::before {
  animation: none;
  opacity: 0;
}

/* ── 3. Improved Scroll Reveal (staggered) ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for sequential reveal */
[data-reveal]:nth-child(1) { transition-delay: 0s; }
[data-reveal]:nth-child(2) { transition-delay: 0.1s; }
[data-reveal]:nth-child(3) { transition-delay: 0.2s; }
[data-reveal]:nth-child(4) { transition-delay: 0.3s; }
[data-reveal]:nth-child(5) { transition-delay: 0.4s; }
[data-reveal]:nth-child(6) { transition-delay: 0.5s; }
[data-reveal]:nth-child(7) { transition-delay: 0.6s; }
[data-reveal]:nth-child(8) { transition-delay: 0.7s; }

/* Named delay classes override nth-child */
[data-reveal].reveal-delay-1 { transition-delay: 0.15s; }
[data-reveal].reveal-delay-2 { transition-delay: 0.3s; }
[data-reveal].reveal-delay-3 { transition-delay: 0.45s; }
[data-reveal].reveal-delay-4 { transition-delay: 0.6s; }

/* ── 4. Parallax on Hero Image (desktop) ── */
@media (min-width: 1024px) {
  .header-section-wrapper {
    background-attachment: fixed;
  }
}

/* ── 5. Image Hover Effects ── */
.section-image img {
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.6s ease;
}

.section-image:hover img,
.section:hover .section-image img {
  transform: scale(1.05);
  filter: contrast(1.05) brightness(1.04);
}

/* ── 6. Counter number animation support ── */
.counter-number {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── Reduced motion: respect user preference ── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .contact-button::before {
    animation: none;
    display: none;
  }

  .custom-cursor {
    display: none;
  }

  .section-image img {
    transition: none;
  }
}
