/* =============================================================
   moncreative — services-common.css
   Estilos compartidos por todas las páginas de servicio:
   branding, marketing-digital, multimedia, modelado-3d,
   modelado-y-animacion-3d, sitios-web.

   INSTRUCCIONES DE USO:
   1. Encolar este archivo PRIMERO en functions.php:
      wp_enqueue_style( 'moncreative-services-common', ... );
   2. Luego encolar el CSS específico de cada servicio.
   3. Eliminar el bloque base duplicado (variables :root, cursor,
      background, hero, sections, divider) de cada archivo de
      servicio individual — solo conservar la sección "SERVICES
      SECTION" hacia abajo.
   ============================================================= */

/* moncreative — branding.css
   /wp-content/themes/everhue/assets/css/branding.css */

:root {
  --sky: #0fbcd4;
  --sky-light: #7ee8fa;
  --orange: #ff6b2b;
  --orange-light: #ff9966;
  --bg: #080808;
  --bg2: #0d0d0d;
  --bg3: #121212;
  --white: #f0f0f0;
  --muted: rgba(240,240,240,0.75); /* WCAG AA: contraste mínimo 4.5:1 */
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg) !important;
  color: var(--white) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
#cursor {
  width: 12px; height: 12px;
  background: var(--sky);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s, background 0.3s, width 0.3s, height 0.3s;
  box-shadow: 0 0 20px var(--sky), 0 0 40px rgba(15,188,212,0.4);
  mix-blend-mode: screen;
}
#cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(15,188,212,0.4);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.08s;
}
body:has(a:hover) #cursor, body:has(button:hover) #cursor {
  width: 20px; height: 20px;
  background: var(--orange);
  box-shadow: 0 0 25px var(--orange), 0 0 50px rgba(255,107,43,0.4);
}

/* ── ANIMATED BACKGROUND ── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.mesh-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float-blob 18s ease-in-out infinite;
}
.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(15,188,212,0.15) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-duration: 20s;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,107,43,0.12) 0%, transparent 70%);
  top: 30%; right: -150px;
  animation-duration: 25s;
  animation-delay: -8s;
}
.blob-3 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(126,232,250,0.08) 0%, transparent 70%);
  bottom: -200px; left: 30%;
  animation-duration: 22s;
  animation-delay: -4s;
}
@keyframes float-blob {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.05); }
  66% { transform: translate(-20px,50px) scale(0.95); }
}

/* ── NOISE TEXTURE OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}


.logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--sky) 0%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 46px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border: 1px solid rgba(15,188,212,0.25);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 30px;
  background: rgba(15,188,212,0.05);
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 10px var(--sky);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-title .line-1 { color: var(--white); display: block; }
.hero-title .grad {
  background: linear-gradient(135deg, var(--sky-light) 0%, var(--sky) 40%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.hero-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 12px;
  font-weight: 300;
}
.hero-body {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-body strong {
  color: var(--white);
  font-weight: 500;
}
.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  background: linear-gradient(135deg, var(--sky) 0%, var(--orange) 100%);
  border: none;
  border-radius: 100px;
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--orange) 0%, var(--sky) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(15,188,212,0.35), 0 0 60px rgba(255,107,43,0.2);
  transform: translateY(-2px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: var(--white);
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  transition: all 0.3s;
}
.btn-secondary:hover {
  border-color: var(--sky);
  color: var(--sky);
  box-shadow: 0 0 20px rgba(15,188,212,0.15);
  transform: translateY(-2px);
}

/* ── HERO IMAGE SIDE ── */
.hero-visual {
  position: relative;
}
.hero-img-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}
.hero-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,188,212,0.2) 0%, rgba(255,107,43,0.15) 100%);
  z-index: 1;
  mix-blend-mode: screen;
}
.hero-img-wrap img {
  width: 100%;
  display: block;
  border-radius: 20px;
  filter: saturate(0.8) contrast(1.1);
}
.hero-img-border {
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(15,188,212,0.4), rgba(255,107,43,0.3), transparent);
  pointer-events: none;
  z-index: 2;
}
.hero-float-card {
  position: absolute;
  bottom: -20px;
  left: -30px;
  background: rgba(8,8,8,0.9);
  border: 1px solid rgba(15,188,212,0.2);
  border-radius: 16px;
  padding: 20px 24px;
  backdrop-filter: blur(20px);
  z-index: 3;
  animation: float-card 4s ease-in-out infinite;
}
@keyframes float-card {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.float-stat {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--sky) 0%, var(--sky-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.float-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ── SECTIONS ── */
section {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}
.section-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--orange);
}
.section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.section-body {
  color: var(--muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  max-width: 560px;
}

/* ── DIVIDER LINE ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 30%, rgba(15,188,212,0.2) 50%, rgba(255,255,255,0.08) 70%, transparent 100%);
  margin: 0;
}

/* ── 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;
  }
  .mesh-blob,
  .hero-float-card,
  .scanline,
  .hero-eyebrow::before {
    animation: none !important;
  }
}

/* ── ACCESIBILIDAD: focus-visible para navegación por teclado ── */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── CURSOR personalizado: solo en dispositivos desktop con puntero fino ── */
@media (pointer: fine) and (hover: hover) {
  body { cursor: none; }
}

/* ══════════════════════════════════════
   OPTIMIZACIONES DE PERFORMANCE
   Auditoría 2026 — Mejoras de render
══════════════════════════════════════ */

/* content-visibility: auto → el browser saltea el render de
   secciones fuera del viewport, mejora TTI en páginas largas */
.stats-section,
.servicios-section,
.planes-section,
.process-section,
.portfolio-section,
.cta-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px; /* estimado de altura */
}

/* will-change solo en elementos que realmente animan */
.hero-title,
.hero-visual,
.hero-float-card {
  will-change: transform, opacity;
}

/* Aislamiento de pintado para secciones independientes */
.hero {
  contain: layout paint;
}

/* ── IMÁGENES: Aspect ratio para evitar CLS ── */
.hero-img-wrap img,
.portfolio-img,
.service-img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

/* ── TIPOGRAFÍA: Alinear con home (DM Sans body) ── */
p, li, .body-text {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
  color: var(--muted);
}

/* Legibilidad mejorada sobre fondos oscuros */
strong, b {
  color: var(--white);
  font-weight: 600;
}

/* ── LAZY LOADING nativo en imágenes de contenido ── */
img:not([loading]) {
  loading: lazy;
}
