/* Dalia microinteractions stylesheet
 * Page transitions + scroll reveals.
 * Carregado em todas as paginas via _partials/header. */

/* ======================================================================
 * 2. PAGE TRANSITIONS
 * ====================================================================== */
body {
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.dalia-page-leave {
  opacity: 0;
}

body.dalia-page-enter {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  body,
  body.dalia-page-leave,
  body.dalia-page-enter {
    transition: none !important;
    opacity: 1 !important;
  }
}

/* ======================================================================
 * 3. SCROLL REVEALS
 * ====================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

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

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ======================================================================
 * 4. HOVER BUTTONS
 * Border gold revelada com escala sutil em CTAs.
 * ====================================================================== */
.nav-cta,
.hero-cta,
.pitch-cta,
.map-cta,
.df-access a {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background-color 0.4s ease,
              border-color 0.4s ease,
              color 0.4s ease,
              box-shadow 0.4s ease;
}

.nav-cta:hover,
.hero-cta:hover,
.pitch-cta:hover,
.map-cta:hover,
.df-access a:hover {
  transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .nav-cta,
  .hero-cta,
  .pitch-cta,
  .map-cta,
  .df-access a {
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  .nav-cta:hover,
  .hero-cta:hover,
  .pitch-cta:hover,
  .map-cta:hover,
  .df-access a:hover {
    transform: none;
  }
}

/* ======================================================================
 * 5. IMAGE OVERLAY GREEN (cards de cidades, blog, comparaveis)
 * ====================================================================== */
[data-image-card],
.cidade-card,
.blog-card {
  position: relative;
  overflow: hidden;
}

[data-image-card]::after,
.cidade-card::after,
.blog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dalia-green-deep, #163A2A);
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

[data-image-card]:hover::after,
.cidade-card:hover::after,
.blog-card:hover::after {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  [data-image-card]::after,
  .cidade-card::after,
  .blog-card::after {
    transition: none;
  }
}

/* ======================================================================
 * 6. SMOOTH SCROLL pro fragment links
 * ====================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ======================================================================
 * 7. SKIP LINK (a11y)
 * ====================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  padding: 1rem 1.5rem;
  background: var(--dalia-gold, #B8973A);
  color: var(--dalia-green-deep, #163A2A);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}
