/* ============================================================
   Micky Arquitectos — Estilos compartidos
   ============================================================ */

section[id], header[id], article[id] {
  scroll-margin-top: 80px;
}

h1, h2 {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-weight: 600;
}

h2 {
  font-weight: 600;
}

p {
  line-height: 1.7;
}

.hover-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(31, 31, 31, 0.08);
  border-color: #1F1F1F;
}

.steps-line {
  background: repeating-linear-gradient(90deg, #1F1F1F 0 8px, transparent 8px 14px);
}

.bg-blueprint {
  background-image:
    linear-gradient(to right, rgba(232, 230, 224, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(232, 230, 224, 0.4) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-blueprint-light {
  background-image:
    linear-gradient(to right, rgba(31, 31, 31, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 31, 31, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* Animación base (usada en otras páginas) */
@keyframes plano-mover {
  0% { background-position: 0 0; }
  100% { background-position: 80px 80px; }
}
.plano-animado {
  animation: plano-mover 40s linear infinite;
}

/* Cuadrícula fina — fluye hacia la derecha + abajo rápido */
@keyframes plano-fino-mover {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}
.plano-fino {
  animation: plano-fino-mover 10s linear infinite;
}

/* Cuadrícula gruesa — fluye en diagonal opuesta, más lento */
@keyframes plano-grueso-mover {
  0%   { background-position: 0 0; }
  100% { background-position: -120px 120px; }
}
.plano-grueso {
  animation: plano-grueso-mover 28s linear infinite;
}

/* ============================================================
   Iluminación suave para los logos de "Especialistas en"
   Cada elemento define su color de halo con la variable --glow
   ============================================================ */
.glow-tile,
.glow-icon {
  --glow: rgba(31, 111, 84, 0.45);
  animation: glow-pulse 4.5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: filter;
}

.glow-tile {
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(31, 31, 31, 0.06),
              0 6px 16px rgba(31, 31, 31, 0.10),
              0 0 14px 0 var(--glow);
}

.glow-tile:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 0 1px rgba(31, 31, 31, 0.08),
              0 10px 24px rgba(31, 31, 31, 0.14),
              0 0 28px 6px var(--glow);
}

.glow-icon:hover {
  transform: translateY(-3px) scale(1.06);
}

@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px var(--glow));
  }
  50% {
    filter: drop-shadow(0 0 20px var(--glow));
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow-tile,
  .glow-icon {
    animation: none;
    filter: drop-shadow(0 0 10px var(--glow));
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

a[data-section] {
  transition: color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   NAVBAR PREMIUM — Franja, pill, separadores y CTA animado
   ============================================================ */

/* Franja de acento más alta y con shimmer */
@keyframes nav-strip-shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.nav-accent-strip {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(31, 111, 84, 0.5) 15%,
    rgba(45, 209, 112, 0.85) 50%,
    rgba(31, 111, 84, 0.5) 85%,
    transparent 100%
  );
  animation: nav-strip-shimmer 3.5s ease-in-out infinite;
}

/* Separador vertical entre zonas del nav */
.nav-sep {
  width: 1px;
  height: 28px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, transparent, rgba(31,31,31,0.13), transparent);
}

/* Pill container que agrupa los links */
.nav-links-container {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(248, 247, 245, 0.9);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  padding: 4px;
}

/* Links individuales */
.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}
.nav-link:hover {
  background-color: rgba(31, 111, 84, 0.07);
}

/* Estado activo: fondo + punto indicador debajo */
a.nav-link.nav-active {
  color: #1F6F54 !important;
  text-decoration: none !important;
  background-color: rgba(31, 111, 84, 0.11);
  border-radius: 8px;
}
a.nav-link.nav-active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1F6F54;
}

/* CTA con glow pulsante */
@keyframes cta-glow-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(31, 111, 84, 0.28); }
  50%       { box-shadow: 0 4px 20px rgba(31, 111, 84, 0.55), 0 0 0 5px rgba(31, 111, 84, 0.07); }
}
.nav-cta {
  background: linear-gradient(135deg, #2dd170 0%, #1a9e54 100%) !important;
  transition: transform 0.2s ease !important;
  animation: cta-glow-pulse 3s ease-in-out infinite;
}
.nav-cta:hover {
  animation: none;
  box-shadow: 0 6px 22px rgba(31, 111, 84, 0.55) !important;
  transform: translateY(-1px);
  background: linear-gradient(135deg, #34d97e 0%, #1F6F54 100%) !important;
}

/* ============================================================
   HERO — Overlay de profundidad radial
   ============================================================ */
.hero-radial-glow {
  background: radial-gradient(
    ellipse 70% 60% at 60% 40%,
    rgba(31, 111, 84, 0.06) 0%,
    transparent 65%
  );
}

/* ============================================================
   HERO — Casillas de info mejoradas
   ============================================================ */
.info-box {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 230, 224, 0.9);
  border-left: 3px solid #1F6F54;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow:
    0 2px 10px rgba(31, 31, 31, 0.08),
    0 0 0 1px rgba(31, 111, 84, 0.05);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.info-box:hover {
  transform: translateX(4px);
  box-shadow:
    0 6px 20px rgba(31, 31, 31, 0.10),
    0 0 0 1px rgba(31, 111, 84, 0.12);
}

/* ============================================================
   FEATURE CARDS — Tarjetas de navegación de páginas
   ============================================================ */
.feature-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}
/* Línea de acento superior que se revela al hacer hover */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #1F6F54 0%, #34d399 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover::before {
  transform: scaleX(1);
}
.feature-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 24px 48px rgba(31, 31, 31, 0.10),
    0 8px 16px rgba(31, 31, 31, 0.06),
    0 0 0 1px rgba(31, 111, 84, 0.12);
  border-color: rgba(31, 111, 84, 0.20) !important;
}
.feature-card-icon {
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
  box-shadow: 0 4px 14px rgba(31, 31, 31, 0.22), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* ============================================================
   CAD OVERLAY — Detalles estilo AutoCAD sobre cuadrículas
   ============================================================ */
.cad-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  color: rgba(31, 111, 84, 2.6);
  z-index: 1;
}
.cad-overlay--dark {
  color: rgba(255, 255, 255, 2.45);
}

/* Halo claro detrás del texto para que no compita con la cuadrícula del hero */
.texto-legible {
  text-shadow:
    0 0 2px #FAFAF7,
    0 0 4px #FAFAF7,
    0 0 8px #FAFAF7,
    0 0 12px rgba(250, 250, 247, 0.9);
}

/* Halo oscuro para texto sobre fondos oscuros con cuadrícula */
.texto-legible-oscuro {
  text-shadow:
    0 0 2px #1F1F1F,
    0 0 4px #1F1F1F,
    0 0 8px #1F1F1F,
    0 0 12px rgba(31, 31, 31, 0.9);
}
