/* =============================================
   BODY-PORQUE — WEPY.AI  v3
   Split 70/30: izquierda dinámica / derecha fija
   Bloque B: FAQ acordeón
   ============================================= */


/* ─────────────────────────────────────────────
   CONTENEDOR STICKY 400vh
   ───────────────────────────────────────────── */
.porque__sticky-outer {
  position: relative;
  height: 400vh;
}

.porque__sticky-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 70fr 30fr;
  overflow: hidden;
}


/* ─────────────────────────────────────────────
   COLUMNA IZQUIERDA — DINÁMICA (#0F172A)
   ───────────────────────────────────────────── */
.porque__col-left {
  position: relative;
  background: #0F172A;
  overflow: hidden;
}


/* ── Indicadores de panel (borde derecho interno) ── */
.porque__nums {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 20;
}

.porque__num {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.20);
  line-height: 1;
  transition: color 300ms ease;
  font-family: 'Inter', sans-serif;
}

.porque__num.is-active {
  color: var(--panel-accent-color, #2563EB);
}


/* ─────────────────────────────────────────────
   PANELES
   ───────────────────────────────────────────── */
.porque__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(60px, 6%, 80px);
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  transition:
    opacity  400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
  z-index: 5;
}

.porque__panel.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.porque__panel.is-exiting {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  z-index: 6;
}

.porque__panel-content {
  max-width: 580px;
  width: 100%;
}


/* ── Eyebrow ─────────────────────────────── */
.porque__panel-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 380ms ease 60ms, transform 380ms ease 60ms;
}


/* ── Línea de acento ─────────────────────── */
.porque__panel-accent {
  display: block;
  width: 60px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: var(--space-5);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 320ms ease 130ms;
}

.porque__panel--1 .porque__panel-accent { background: #2563EB; }
.porque__panel--2 .porque__panel-accent { background: #14B8A6; }
.porque__panel--3 .porque__panel-accent { background: #7C3AED; }
.porque__panel--4 .porque__panel-accent { background: #8B5CF6; }


/* ── Título ──────────────────────────────── */
.porque__panel-title {
  font-size: clamp(52px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 450ms ease 200ms, transform 450ms ease 200ms;
}


/* ── Acentos de texto ────────────────────── */
.porque__accent-brand {
  background: linear-gradient(90deg, #2563EB 0%, #14B8A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.porque__accent-violet {
  background: var(--gradient-violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Línea subrayado del título ──────────── */
.porque__title-underline {
  display: block;
  height: 3px;
  border-radius: 2px;
  width: 80px;
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 500ms ease 310ms;
}

.porque__panel--1 .porque__title-underline { background: #2563EB; }
.porque__panel--2 .porque__title-underline { background: #14B8A6; }
.porque__panel--3 .porque__title-underline { background: #7C3AED; }
.porque__panel--4 .porque__title-underline { background: #8B5CF6; }


/* ── Descripción ─────────────────────────── */
.porque__panel-desc {
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  opacity: 0;
  transition: opacity 400ms ease 380ms;
}


/* ── Estados is-active: animar contenido ─── */
.porque__panel.is-active .porque__panel-eyebrow {
  opacity: 1;
  transform: translateY(0);
}

.porque__panel.is-active .porque__panel-accent {
  transform: scaleX(1);
}

.porque__panel.is-active .porque__panel-title {
  opacity: 1;
  transform: translateY(0);
}

.porque__panel.is-active .porque__title-underline {
  clip-path: inset(0 0% 0 0);
}

.porque__panel.is-active .porque__panel-desc {
  opacity: 1;
}


/* ─────────────────────────────────────────────
   COLUMNA DERECHA — FIJA (#ffffff)
   ───────────────────────────────────────────── */
.porque__col-right {
  position: relative;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 4vh, 3.5rem) clamp(1.25rem, 2.5vw, 2rem);
}

.porque__right-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8B5CF6;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}

.porque__right-title {
  font-family: 'Noto Serif Display', 'Georgia', 'Times New Roman', serif;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #111827;
  writing-mode: horizontal-tb;
  overflow-wrap: break-word;
  flex: 1;
  align-self: stretch;
}


/* ─────────────────────────────────────────────
   BLOQUE B — FAQ
   ───────────────────────────────────────────── */
.porque__block-b {
  position: relative;
  background: #ffffff;
}

.porque__block-b::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #2563EB 0%, #22D3A3 100%);
  opacity: 0.30;
}

.porque__faq-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}


/* ── Encabezado FAQ ──────────────────────── */
.porque__faq-header {
  text-align: center;
  padding-top: 80px;
  padding-bottom: 56px;
}

.porque__faq-eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 460ms ease 0ms, transform 460ms ease 0ms;
}

.porque__faq-title {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 700;
  color: #111827;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 460ms ease 80ms, transform 460ms ease 80ms;
}

.porque__faq-subtitle {
  font-size: var(--text-base);
  color: #6B7280;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 460ms ease 160ms, transform 460ms ease 160ms;
}

.porque__faq-header.is-visible .porque__faq-eyebrow,
.porque__faq-header.is-visible .porque__faq-title,
.porque__faq-header.is-visible .porque__faq-subtitle {
  opacity: 1;
  transform: translateY(0);
}


/* ── Lista de preguntas ──────────────────── */
.porque__faq-list {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}


/* ── Item FAQ ────────────────────────────── */
.porque__faq-item {
  position: relative;
  border-bottom: 1px solid #E5E7EB;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.porque__faq-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Borde izquierdo gradiente (estado abierto) */
.porque__faq-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #2563EB, #14B8A6);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 250ms ease;
  z-index: 2;
}

.porque__faq-item.is-open::before {
  clip-path: inset(0 0 0% 0);
}


/* ── Botón trigger ───────────────────────── */
.porque__faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: 22px var(--space-4);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.porque__faq-trigger:hover {
  background: #F9FAFB;
}

.porque__faq-item.is-open .porque__faq-trigger {
  background: transparent;
}

.porque__faq-q-text {
  font-size: var(--text-base);
  font-weight: 600;
  color: #111827;
  line-height: 1.5;
}


/* ── Ícono +/× ─────────────────────────── */
.porque__faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #D1D5DB;
  color: #6B7280;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: border-color 200ms ease, color 200ms ease, transform 250ms ease-out;
}

.porque__faq-trigger:hover .porque__faq-icon {
  border-color: var(--color-primary);
}

.porque__faq-item.is-open .porque__faq-icon {
  transform: rotate(45deg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}


/* ── Cuerpo de respuesta ─────────────────── */
.porque__faq-body {
  height: 0;
  overflow: hidden;
  background: #F7F8FA;
  box-shadow:
    inset 0 0 60px 0 rgba(37, 99, 235, 0.05),
    inset 0 0 60px 0 rgba(20, 184, 166, 0.05);
  transition: height 280ms ease-out;
}

.porque__faq-answer {
  padding: 0 var(--space-4) 20px var(--space-4);
  font-size: 15px;
  line-height: 1.75;
  color: #6B7280;
  clip-path: inset(0 100% 0 0);
}


/* ─────────────────────────────────────────────
   RESPONSIVE — MÓVIL (max 767px)
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Desactivar sticky */
  .porque__sticky-outer { height: auto; }

  .porque__sticky-inner {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  /* Columna derecha va primero en móvil */
  .porque__col-right {
    order: -1;
    padding: 48px var(--space-6) 32px;
    align-items: flex-start;
  }

  /* Título en móvil: tamaño reducido */
  .porque__right-title {
    font-size: clamp(1.75rem, 5vw, 2rem);
    flex: none;
    line-height: 1.2;
  }

  /* Columna izquierda: padding y panels estáticos */
  .porque__col-left {
    padding: var(--space-8) var(--space-4);
  }

  .porque__panel {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
    display: block;
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
    background: #1E293B;
    border-top-width: 3px;
    border-top-style: solid;
    margin-bottom: var(--space-4);
    will-change: auto;
  }

  .porque__panel--1 { border-top-color: #2563EB; }
  .porque__panel--2 { border-top-color: #14B8A6; }
  .porque__panel--3 { border-top-color: #7C3AED; }
  .porque__panel--4 { border-top-color: #8B5CF6; }

  /* Todo visible en móvil */
  .porque__panel-eyebrow,
  .porque__panel-title,
  .porque__panel-desc {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .porque__panel-accent {
    transform: scaleX(1) !important;
    transition: none !important;
  }

  .porque__title-underline {
    clip-path: none !important;
    transition: none !important;
  }

  .porque__panel-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* Ocultar indicadores en móvil */
  .porque__nums { display: none; }

  /* FAQ */
  .porque__faq-trigger { padding: 22px 0; }
  .porque__faq-list { padding-bottom: 60px; }
  .porque__faq-header { padding-top: 56px; padding-bottom: 40px; }
}


/* ─────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .porque__panel,
  .porque__panel-eyebrow,
  .porque__panel-accent,
  .porque__panel-title,
  .porque__title-underline,
  .porque__panel-desc,
  .porque__faq-eyebrow,
  .porque__faq-title,
  .porque__faq-subtitle,
  .porque__faq-item,
  .porque__faq-answer {
    transition: none !important;
    animation: none !important;
  }

  .porque__panel { opacity: 0; transform: none; }
  .porque__panel.is-active { opacity: 1; }

  .porque__panel-eyebrow,
  .porque__panel-title,
  .porque__panel-desc  { opacity: 1 !important; transform: none !important; }
  .porque__panel-accent    { transform: scaleX(1) !important; }
  .porque__title-underline { clip-path: none !important; }
  .porque__faq-answer      { clip-path: none !important; }
}
