/*
Theme Name:   E3D Child Theme
Theme URI:    https://estudiotresdigital.com
Description:  Tema hijo con estilos Estudio Tres Digital — Vintage editorial × cyberpunk terminal
Author:       Estudio Tres Digital
Template:     Impreza
Version:      1.0.0
*/

/* ─────────────────────────────────────────────
   ESTUDIO TRES DIGITAL — Estilos globales
   Vintage editorial × cyberpunk terminal
   ───────────────────────────────────────────── */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Major+Mono+Display&family=Titillium+Web:wght@300;400;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Variables globales ── */
:root {
  --ink: #0d0913;
  --ink-2: #16101f;
  --ink-3: #1f1830;
  --paper: #f2ebdd;
  --paper-2: #e8dfcb;
  --purple: #5c2d8f;
  --purple-bright: #8a4dd1;
  --purple-deep: #2a1245;
  --red: #e03a2f;
  --red-deep: #a8221b;
  --yellow: #ffd200;
  --gray: #8a8a92;
  --gray-2: #4a4654;
  --neon: #d65cff;

  --display: "Major Mono Display", "Courier New", monospace;
  --headline: "Bebas Neue", "Oswald", sans-serif;
  --body: "Titillium Web", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;
}

/* ── Body base ── */
body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────
   1. TIPOGRAFÍA — Títulos estilo editorial
   ───────────────────────────────────────────── */

/* Clase principal para títulos grandes tipo Bebas Neue */
.e3d-titulo,
.e3d-titulo h1,
.e3d-titulo h2,
.e3d-titulo h3,
.e3d-titulo h4 {
  font-family: var(--headline) !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  line-height: 0.92 !important;
  text-transform: uppercase !important;
}

/* Clase para texto monospaced tipo terminal */
.e3d-mono {
  font-family: var(--mono) !important;
  letter-spacing: 0.02em !important;
}

/* Eyebrow / etiqueta pequeña sobre los títulos */
.e3d-eyebrow {
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: var(--gray) !important;
  display: block;
  margin-bottom: 12px;
}

/* Texto con outline (solo borde, sin relleno) */
.e3d-outline {
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent !important;
}

/* Texto tachado estilo editorial */
.e3d-strike {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 4px;
  opacity: 0.55;
}

/* ─────────────────────────────────────────────
   2. HERO — Fondo morado + grid de rectángulos
   ───────────────────────────────────────────── */

/* Sección hero completa */
.e3d-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

/* Degradado radial morado → negro (el fondo principal) */
.e3d-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(92, 45, 143, 0.35), transparent 70%);
  pointer-events: none;
}

/* Grid de rectángulos / cuadrícula editorial */
.e3d-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(242, 235, 221, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 235, 221, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent 80%);
  pointer-events: none;
}

/* El contenido del hero va sobre los fondos */
.e3d-hero .e3d-hero-content {
  position: relative;
  z-index: 2;
}

/* Scanlines CRT (opcional, añadir clase .e3d-scanlines a la sección) */
.e3d-scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0) 4px
  );
  z-index: 3;
}

/* Título principal del hero — tipografía grande */
.e3d-hero-titulo {
  font-family: var(--headline) !important;
  font-size: clamp(56px, 10vw, 156px) !important;
  line-height: 0.86 !important;
  text-transform: uppercase !important;
  color: var(--paper) !important;
  letter-spacing: -0.005em !important;
}

/* Variantes de color en el título */
.e3d-hero-titulo .e3d-red,
.e3d-titulo-rojo { color: var(--red) !important; font-style: italic; }

.e3d-hero-titulo .e3d-outline-text {
  -webkit-text-stroke: 1.5px var(--paper);
  color: transparent !important;
}

/* Stamps / etiquetas tipo sello */
.e3d-stamp {
  display: inline-block;
  font-family: var(--mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 4px 8px;
  border: 1px solid var(--paper);
  color: var(--paper);
  background: rgba(242, 235, 221, 0.04);
  margin-right: 8px;
  margin-bottom: 8px;
}
.e3d-stamp.rojo {
  border-color: var(--red);
  color: var(--red);
}

/* Efecto glitch en hover para títulos */
.e3d-glitch {
  position: relative;
  display: inline-block;
}
.e3d-glitch::before,
.e3d-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
}
.e3d-glitch::before {
  color: var(--red);
  transform: translate(2px, 0);
  mix-blend-mode: screen;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0.85;
}
.e3d-glitch::after {
  color: var(--purple-bright);
  transform: translate(-2px, 0);
  mix-blend-mode: screen;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  opacity: 0.85;
}
.e3d-glitch:hover::before { animation: e3d-glitch-a 0.4s steps(2) infinite; }
.e3d-glitch:hover::after  { animation: e3d-glitch-b 0.4s steps(2) infinite; }
@keyframes e3d-glitch-a {
  0%, 100% { transform: translate(2px, 0); }
  50%       { transform: translate(4px, -1px); }
}
@keyframes e3d-glitch-b {
  0%, 100% { transform: translate(-2px, 0); }
  50%       { transform: translate(-4px, 1px); }
}

/* ─────────────────────────────────────────────
   3. SECCIÓN METODOLOGÍA — Tabs accordion
   ───────────────────────────────────────────── */

/* Contenedor de la sección metodología */
.e3d-metodo {
  padding: 80px 0;
  position: relative;
  background: var(--ink);
  color: var(--paper);
}

/* Fondo con degradado morado + rojo sutil */
.e3d-metodo-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(92, 45, 143, 0.18), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(224, 58, 47, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Toggle de tabs (Timeline / Flywheel) */
.e3d-tabs {
  display: inline-flex;
  border: 1px solid var(--paper);
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}
.e3d-tabs button,
.e3d-tabs .e3d-tab-btn {
  background: transparent !important;
  border: none !important;
  color: var(--paper) !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  padding: 12px 22px !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.e3d-tabs button.active,
.e3d-tabs button:focus,
.e3d-tabs .e3d-tab-btn.activo {
  background: var(--paper) !important;
  color: var(--ink) !important;
}

/* Acordeón de etapas */
.e3d-accordion {
  border-top: 1px solid var(--paper);
  position: relative;
  z-index: 2;
}

.e3d-etapa {
  border-bottom: 1px solid var(--paper);
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: stretch;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}
.e3d-etapa:hover { background: rgba(92, 45, 143, 0.1); }
.e3d-etapa.abierto { background: rgba(92, 45, 143, 0.15); }

.e3d-etapa-num {
  font-family: var(--display) !important;
  font-size: 28px;
  color: var(--red);
  padding: 28px 0 28px 12px;
  display: flex;
  align-items: flex-start;
}

.e3d-etapa-titulo {
  padding: 24px 24px 24px 0;
}
.e3d-etapa-titulo h3 {
  font-family: var(--headline) !important;
  font-size: clamp(22px, 2.4vw, 36px) !important;
  letter-spacing: 0.01em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  color: var(--paper) !important;
  margin-bottom: 6px;
}
.e3d-etapa-titulo .e3d-stage-tag {
  font-family: var(--mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--gray) !important;
}

.e3d-etapa-icono {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-family: var(--display) !important;
  font-size: 22px;
  color: var(--paper);
  transition: transform 0.3s ease, color 0.3s ease;
}
.e3d-etapa.abierto .e3d-etapa-icono {
  transform: rotate(45deg);
  color: var(--red);
}

.e3d-etapa-cuerpo {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  border-top: 1px dashed rgba(242, 235, 221, 0.3);
}
.e3d-etapa.abierto .e3d-etapa-cuerpo { max-height: 600px; }

.e3d-etapa-cuerpo .e3d-spacer {
  border-right: 1px dashed rgba(242, 235, 221, 0.18);
}
.e3d-etapa-cuerpo .e3d-col {
  padding: 28px 24px;
  border-right: 1px dashed rgba(242, 235, 221, 0.18);
}
.e3d-etapa-cuerpo .e3d-col:last-child { border-right: none; }
.e3d-etapa-cuerpo p {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(242, 235, 221, 0.85);
  margin-bottom: 16px;
}
.e3d-etapa-cuerpo ul { list-style: none; padding: 0; }
.e3d-etapa-cuerpo li {
  font-family: var(--mono) !important;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 0 8px 20px;
  position: relative;
  border-bottom: 1px dashed rgba(242, 235, 221, 0.14);
  text-transform: uppercase;
  color: var(--paper);
}
.e3d-etapa-cuerpo li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 9px;
  top: 11px;
}

.e3d-bi-note {
  border-left: 3px solid var(--red);
  padding: 8px 14px;
  background: rgba(224, 58, 47, 0.08);
  font-style: italic;
  font-size: 14px;
  margin-top: 8px;
  color: var(--paper);
}

/* ─────────────────────────────────────────────
   4. BOTONES
   ───────────────────────────────────────────── */

.e3d-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  padding: 16px 24px !important;
  font-family: var(--mono) !important;
  font-size: 13px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: none !important;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}
.e3d-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--ink);
  pointer-events: none;
}
.e3d-btn:hover { transform: translate(-2px, -2px); }
.e3d-btn:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  z-index: -1;
  transform: translate(6px, 6px);
}

.e3d-btn-ghost {
  background: transparent !important;
  color: var(--paper) !important;
  border: 1px solid var(--paper) !important;
}
.e3d-btn-ghost::before { display: none; }

/* ─────────────────────────────────────────────
   5. UTILIDADES GENERALES
   ───────────────────────────────────────────── */

/* Fondo oscuro base */
.e3d-fondo-oscuro { background: var(--ink) !important; color: var(--paper) !important; }
.e3d-fondo-morado { background: var(--purple) !important; color: var(--paper) !important; }
.e3d-fondo-papel  { background: var(--paper) !important; color: var(--ink) !important; }

/* Scrollbar cyberpunk */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--purple); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* Selección de texto */
::selection { background: var(--red); color: var(--paper); }

/* Animación reveal al hacer scroll */
.e3d-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.e3d-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────
   5b. OVERRIDES ESPECÍFICOS PARA IMPREZA
   Impreza tiene estilos agresivos en h1-h4 y botones,
   estas reglas los neutralizan dentro de bloques E3D.
   ───────────────────────────────────────────── */

/* Evita que Impreza sobreescriba la fuente de los títulos E3D */
.e3d-titulo h1,
.e3d-titulo h2,
.e3d-titulo h3,
.e3d-titulo h4,
.e3d-hero-titulo,
h1.e3d-hero-titulo {
  font-family: "Bebas Neue", "Oswald", sans-serif !important;
  font-weight: 400 !important;
  line-height: 0.92 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.005em !important;
}

/* Impreza a veces inyecta padding/margin en secciones, lo reseteamos */
.e3d-hero.vc_row,
.e3d-metodo.vc_row {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Evita que WPBakery agregue fondo blanco a filas dentro del hero */
.e3d-hero .vc_row-has-fill,
.e3d-metodo .vc_row-has-fill {
  background: transparent !important;
}

/* Botones E3D no deben heredar estilos de Impreza */
.e3d-btn,
.e3d-btn:hover,
.e3d-btn:focus,
.e3d-btn-ghost,
.e3d-btn-ghost:hover {
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  letter-spacing: 0.18em !important;
}

/* ─────────────────────────────────────────────
   6. RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .e3d-hero-titulo { font-size: clamp(40px, 8vw, 90px) !important; }
  .e3d-etapa { grid-template-columns: 60px 1fr auto; }
  .e3d-etapa-cuerpo { grid-template-columns: 60px 1fr; }
  .e3d-etapa-cuerpo .e3d-spacer { display: none; }
  .e3d-etapa-cuerpo .e3d-col { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .e3d-etapa { grid-template-columns: 50px 1fr auto; }
  .e3d-etapa-num { font-size: 20px; padding: 20px 0 20px 8px; }
  .e3d-etapa-icono { padding: 0 14px; }
}
