/**
 * Editorial Polish — Shared across Homepage, /art-direction, /copywriting
 * Normalizes palette, adds hover states, micro-interactions, mobile fixes.
 * Loads AFTER page-specific inline styles. Uses high-specificity selectors.
 *
 * MAS Canonical Palette:
 *   vino:   #7A0053
 *   cream:  #FFF7F8
 *   fucsia: #FF007A
 *   black:  #1A1A1A
 *   gris:   #F5F0F0
 *   border: #F5F0F0
 */

/* ─── SMOOTH SCROLL ───────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── SCROLL-TRIGGERED FADE-IN ────────────────────────────── */
.reveal,
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible,
.reveal-up.visible {
  opacity: 1;
  transform: none;
}
/* Stagger delays */
.reveal.d1, .reveal-delay-1 { transition-delay: 0.08s; }
.reveal.d2, .reveal-delay-2 { transition-delay: 0.16s; }
.reveal.d3, .reveal-delay-3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }

/* ─── BUTTON TRANSITIONS (all buttons) ────────────────────── */
button,
a[class*="btn"],
a[class*="cta"],
a[class*="Cta"],
.btn,
.btn--primary,
.btn--ghost,
.btn--ghost-white,
.pl-btn,
.nav-cta,
.nav-mobile-cta,
.topbar-cta,
.topbar-mobile-cta,
.ruta-cta,
.ruta-cta-copy,
.hero-cta-btn,
.btn-primary-lg,
.btn-wa,
.t6-ctaf-btn,
.t6-inv-card-cta,
.t6-lead-submit,
.t6-exit-submit {
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ─── CARD HOVER LIFT — universal ─────────────────────────── */
.sueno-story-card,
.problema-card,
.maestro-card,
.test-card,
.rol-card,
.ad-card,
.ruta-card,
.ruta-card-copy,
.detail-card,
.price-card,
.mapa-phase,
.mapa-phase-copy,
.work-item,
.lbd-cell,
.pq-col,
.pq-col-copy,
.desc-highlights,
.t6-inv-card,
.auth-badge {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.sueno-story-card:hover,
.problema-card:hover,
.maestro-card:hover,
.test-card:hover,
.rol-card:hover,
.ad-card:hover,
.ruta-card:hover,
.ruta-card-copy:hover,
.detail-card:hover,
.mapa-phase:hover,
.mapa-phase-copy:hover,
.work-item:hover,
.lbd-cell:hover,
.t6-inv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(122, 0, 83, 0.12);
}

/* ─── LINK HOVER — underline shift ────────────────────────── */
a[class*="link"]:hover,
.nav-link:hover,
.topbar-link:hover,
.footer-link:hover,
.nav-mobile-link:hover,
.topbar-mobile-link:hover {
  color: #FF007A;
}

/* ─── IMAGE LAZY-LOAD FADE ────────────────────────────────── */
img[loading="lazy"] {
  transition: opacity 0.4s ease;
}

/* ─── FOCUS VISIBLE — accessibility ───────────────────────── */
:focus-visible {
  outline: 2px solid #FF007A;
  outline-offset: 2px;
}

/* ─── SECTION DIVIDERS — subtle bottom borders ────────────── */
section + section {
  border-top: none;
}

/* ─── MOBILE OPTIMIZATIONS ────────────────────────────────── */
@media (max-width: 768px) {
  /* Touch targets */
  button,
  a[class*="btn"],
  a[class*="cta"],
  a[class*="link"],
  .nav-link,
  .topbar-link,
  .nav-mobile-link,
  .topbar-mobile-link,
  .faq-q,
  .accordion-trigger {
    min-height: 44px;
    min-width: 44px;
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }
  .container,
  .container--sm,
  section {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Reduce section padding on mobile for breathing */
  .section {
    padding: 72px 0;
  }
}

@media (max-width: 480px) {
  /* Tighter mobile */
  h1, .hero-h1, .hero-headline, .pl-h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem) !important;
    letter-spacing: -0.02em;
  }
  h2, .hero-h2, .pl-h2 {
    font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
  }
}

/* ─── SELECTION COLOR ─────────────────────────────────────── */
::selection {
  background: rgba(255, 0, 122, 0.15);
  color: #1A1A1A;
}

/* ─── SCROLLBAR STYLING ───────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FFF7F8;
}
::-webkit-scrollbar-thumb {
  background: rgba(122, 0, 83, 0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(122, 0, 83, 0.45);
}

/* ─── SCROLL PROGRESS BAR ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF007A, #7A0053);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}
