/* Alterfocus — componentes compartidos
   Centraliza la animación de entrada (fade-up), el sistema de acordeón (.af-eh-bar*),
   el layout compartido split-hero (Open Call & Out Bounds), el sistema coherente de botones
   y las microinteracciones táctiles de todo el sitio. */

@keyframes af-fadeup {
  0%   { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ==========================================================================
   SISTEMA DE REVELADO POR SCROLL (SCROLL REVELATIONS)
   ========================================================================== */
.af-reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-fluid), transform 0.8s var(--ease-fluid), filter 0.8s var(--ease-fluid);
  transition-delay: calc(var(--idx, 0) * 0.05s);
  will-change: opacity, transform;
}

.af-reveal.shown,
.af-reveal.af-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ==========================================================================
   ACORDEÓN (Editorial / Events)
   ========================================================================== */
.af-eh-bar { border-top: 1px solid var(--af-line); }

.af-eh-bar-toggle {
  width: 100%;
  min-height: 16vh;
  background: var(--af-bg);
  color: var(--af-ink);
  border: none;
  padding: 0 var(--space-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  transition: background 0.4s var(--ease-fluid), color 0.4s var(--ease-fluid);
}
.af-eh-bar-toggle:hover,
.af-eh-bar.af-open .af-eh-bar-toggle { background: var(--af-ink); color: var(--af-bg); }

.af-eh-bar-label {
  font-family: var(--af-font-serif);
  font-weight: 700;
  font-size: clamp(24px,4.4vw,42px);
  letter-spacing: -0.01em;
}

.af-eh-bar-chevron {
  display: inline-block;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.63s var(--ease-fluid);
}
.af-eh-bar.af-open .af-eh-bar-chevron { transform: rotate(45deg); }

.af-eh-bar-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.77s var(--ease-fluid);
  background: var(--af-bg);
}
.af-eh-bar.af-open .af-eh-bar-panel { grid-template-rows: 1fr; }

.af-eh-bar-panel > .af-eh-bar-grid,
.af-eh-bar-panel > .af-eh-stay-grid {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s var(--ease-fluid) 0.15s, transform 0.5s var(--ease-fluid) 0.15s;
}
.af-eh-bar.af-open .af-eh-bar-panel > .af-eh-bar-grid,
.af-eh-bar.af-open .af-eh-bar-panel > .af-eh-stay-grid {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   CARRUSEL HERO: GESTOS TÁCTILES & INDICADORES
   ========================================================================== */
.af-eh-hero {
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.af-eh-hero-dots {
  position: absolute;
  bottom: clamp(14px, 2.8vw, 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
}

.af-eh-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(248, 247, 245, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.35s var(--ease-fluid), background 0.35s var(--ease-fluid);
}

.af-eh-hero-dot.active {
  width: 22px;
  background: var(--af-bg);
}


/* ==========================================================================
   LAYOUT SPLIT-HERO COMPARTIDO (Open Call & Out Bounds)
   ========================================================================== */
.af-split-hero {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: row;
  background: var(--af-ink);
  color: var(--af-bg);
}

.af-split-hero--light {
  background: var(--af-bg);
  color: var(--af-ink);
}

.af-split-hero-img {
  position: sticky;
  top: 0;
  width: 42%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--af-ink);
}

.af-split-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.af-split-hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.15) 0%, rgba(5,5,5,0.55) 100%);
  pointer-events: none;
}

.af-split-hero-caption {
  position: absolute;
  left: clamp(20px,3vw,40px);
  bottom: clamp(28px,4vw,48px);
  right: clamp(20px,3vw,40px);
  z-index: 2;
}

.af-split-hero-caption-eyebrow {
  font-family: var(--af-font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--af-bg);
  opacity: 0.75;
}

.af-split-hero-caption-title {
  font-family: var(--af-font-serif);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(20px,2.4vw,28px);
  color: var(--af-bg);
  margin-top: 8px;
  line-height: 1.25;
}

.af-split-hero-content {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: clamp(100px, 14vh, 140px) clamp(20px, 5vw, 64px) clamp(60px, 8vw, 90px);
}

.af-split-hero-inner {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}

@media (max-width: 860px) {
  .af-split-hero {
    flex-direction: column;
  }
  .af-split-hero-img {
    position: relative;
    width: 100%;
    height: 46vh;
  }
  .af-split-hero-content {
    width: 100%;
    padding: clamp(40px, 6vw, 60px) clamp(20px, 5vw, 48px) clamp(60px, 8vw, 80px);
  }
}


/* ==========================================================================
   SISTEMA DE BOTONES Y CTAS (UNIFICADO & COHERENTE)
   ========================================================================== */

/* Base compartida (tipografía, forma pill, cursor, transiciones y feedback táctil) */
.af-btn,
.af-cta,
.af-ob-btn,
.af-about-cta-btn,
.af-eh-stay-btn,
.af-oc-submit,
.af-ew-cta {
  display: inline-block;
  font-family: var(--af-font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.3s var(--ease-fluid), color 0.3s var(--ease-fluid), border-color 0.3s var(--ease-fluid), transform 0.18s var(--ease-fluid);
}

/* Microinteracción táctil para celulares (90% mobile) */
.af-btn:active,
.af-cta:active,
.af-ob-btn:active,
.af-about-cta-btn:active,
.af-eh-stay-btn:active,
.af-oc-submit:active,
.af-ew-cta:active {
  transform: scale(0.97);
}

/* 1. Botón Ghost / Contorno Blanco (.af-cta) — Para superponer sobre fotos oscuras en Heroes */
.af-cta {
  background: transparent;
  border: 1.5px solid var(--af-bg);
  color: var(--af-bg);
  padding: 14px 30px;
}
.af-cta:hover {
  background: var(--af-bg);
  color: var(--af-ink);
  border-color: var(--af-bg);
}

/* 2. Botón Primario Sólido Acento (.af-ob-btn, .af-about-cta-btn, .af-oc-submit) — Formularios y CTAs principales */
.af-ob-btn,
.af-about-cta-btn,
.af-oc-submit {
  background: var(--af-accent);
  color: var(--af-ink);
  border: none;
  padding: 15px 34px;
}
.af-ob-btn:hover,
.af-about-cta-btn:hover {
  background: var(--af-bg);
  color: var(--af-ink);
}
.af-oc-submit:hover {
  background: var(--af-ink);
  color: var(--af-bg);
}

/* 3. Botón Secundario Contorno Oscuro sobre Fondo Claro (.af-eh-stay-btn) */
.af-eh-stay-btn {
  background: transparent;
  border: 1.5px solid var(--af-ink);
  color: var(--af-ink);
  padding: 12px 28px;
  font-size: 13px;
}
.af-eh-stay-btn:hover {
  background: var(--af-ink);
  color: var(--af-bg);
  border-color: var(--af-ink);
}

/* 4. Botón Sólido Oscuro (.af-ew-cta) */
.af-ew-cta {
  background: var(--af-ink);
  color: var(--af-bg);
  border: none;
  padding: 14px 32px;
}
.af-site .af-ew-cta {
  color: var(--af-bg);
}
.af-ew-cta:hover,
.af-site .af-ew-cta:hover {
  background: var(--af-accent);
  color: var(--af-ink);
}


/* ==========================================================================
   ACCESIBILIDAD: PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}