/* ─────────────────────────────────────────────────────────────────────────────
   Escala Digital — contact.css
   Sección de contacto + footer
───────────────────────────────────────────────────────────────────────────── */

/* ─── Sección base ─── */
.contact-section {
  position: relative;
  z-index: 18;
  width: 100%;
  padding: 88px 60px 0;
  background: linear-gradient(160deg, #010a1a 0%, #020d22 50%, #010818 100%);
  box-shadow: 0 -60px 80px 40px #000000;
  overflow: hidden;
}

/* Fade negro superior — cubre la línea de corte con la sección anterior */
.contact-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(to bottom, #000000 0%, #000000 20%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* ─── Fondo tech (canvas + capas CSS) ─── */
.contact-tech-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Dot grid sutil */
.contact-tech-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(41,168,255,0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Glow central muy suave */
.contact-tech-bg::after {
  content: '';
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  width: 75%; height: 55%;
  background: radial-gradient(ellipse at center, rgba(20,100,255,0.07) 0%, transparent 65%);
}

/* Canvas de partículas */
.contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ─── Header ─── */
.contact-header {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-bottom: 56px;
}

.contact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #29A8FF;
  margin-bottom: 20px;
}
.contact-eyebrow::before,
.contact-eyebrow::after {
  content: '';
  display: block;
  width: 22px;
  height: 1.5px;
  background: #29A8FF;
  opacity: 0.65;
}

.contact-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.06;
  margin: 0 0 20px;
}

.contact-title .accent {
  background: linear-gradient(90deg, #1464FF 0%, #29A8FF 50%, #1464FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

.contact-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.58);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ─── CTAs principales ─── */
.contact-ctas {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 72px;
}

/* Botón WhatsApp */
.contact-wa {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 100px;
  padding: 17px 40px;
  text-decoration: none;
  border: 1px solid rgba(37,211,102,0.3);
  box-shadow:
    0 6px 32px rgba(37,211,102,0.25),
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-wa:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 44px rgba(37,211,102,0.38),
    0 4px 12px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.contact-wa:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}
.contact-wa svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ─── Card de correo ─── */
.contact-email-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(20,100,255,0.08) 0%, rgba(10,16,32,0.6) 100%);
  border: 1px solid rgba(41,168,255,0.15);
  border-radius: 14px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  max-width: 420px;
  width: 100%;
}
.contact-email-card:hover {
  border-color: rgba(41,168,255,0.32);
  background: linear-gradient(135deg, rgba(20,100,255,0.13) 0%, rgba(10,16,32,0.7) 100%);
  transform: translateY(-2px);
}

.email-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(41,168,255,0.1);
  border: 1px solid rgba(41,168,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #29A8FF;
  flex-shrink: 0;
}
.email-card-icon svg { width: 18px; height: 18px; }

.email-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.email-card-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #29A8FF;
}
.email-card-address {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
}
.email-card-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

/* ─── Barra social ─── */
.social-bar-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
}

.social-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 28px 44px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15,25,48,0.92) 0%, rgba(8,14,30,0.96) 100%);
  border: 1px solid rgba(41,168,255,0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 40px rgba(20,100,255,0.12),
    0 8px 40px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Icono social */
.s-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px 14px;
}

.s-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.32s ease,
    background 0.32s ease,
    border-color 0.32s ease;
}

.s-icon-circle svg {
  width: 26px;
  height: 26px;
  color: rgba(255,255,255,0.75);
  transition: filter 0.3s ease;
}

/* Gmail: blanco en reposo, colores reales en hover */
.s-icon.gmail .s-icon-circle svg {
  filter: brightness(0) invert(1);
}
.s-icon.gmail:hover .s-icon-circle svg {
  filter: none;
}

.s-icon-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.42);
  transition: color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

/* Hover — sube y se ilumina */
.s-icon:hover .s-icon-circle {
  transform: translateY(-10px) scale(1.1);
}

.s-icon:active .s-icon-circle {
  transform: scale(0.88);
  transition: transform 0.1s ease;
}
.s-icon:hover .s-icon-label {
  color: rgba(255,255,255,0.88);
  transform: translateY(4px);
}

/* Colores por red en hover */
.s-icon.gmail:hover    .s-icon-circle,
.s-icon.gmail.is-active .s-icon-circle { background: #EA4335; border-color: rgba(234,67,53,0.4);   box-shadow: 0 6px 24px rgba(234,67,53,0.50);   }
.s-icon.gmail.is-active .s-icon-circle svg { filter: none; }
.s-icon.facebook:hover .s-icon-circle { background: #1877F2; border-color: rgba(24,119,242,0.4);  box-shadow: 0 6px 24px rgba(24,119,242,0.50);  }
.s-icon.instagram:hover .s-icon-circle {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: rgba(214,36,159,0.4);
  box-shadow: 0 6px 24px rgba(214,36,159,0.45);
}
.s-icon.whatsapp:hover .s-icon-circle { background: #25D366; border-color: rgba(37,211,102,0.4); box-shadow: 0 6px 24px rgba(37,211,102,0.45); }

/* GitHub — sin link aún */
.s-icon.github { opacity: 0.38; cursor: default; pointer-events: none; }

/* ─── Wrapper del email card (reveal al click en Gmail) ─── */
.email-card-wrap {
  width: 100%;
  max-width: 420px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.45s cubic-bezier(0.32,0.72,0,1),
    opacity 0.35s ease,
    margin-top 0.35s ease;
  margin-top: 0;
}
.email-card-wrap.is-revealed {
  max-height: 140px;
  opacity: 1;
  margin-top: 18px;
}

/* Shake en hover */
.s-icon:hover .s-icon-circle svg {
  animation: socialShake 0.5s ease;
}

@keyframes socialShake {
  0%,100% { transform: translateX(0) rotate(0); }
  20%      { transform: translateX(-4px) rotate(-5deg); }
  40%      { transform: translateX(4px)  rotate(5deg);  }
  60%      { transform: translateX(-4px) rotate(-5deg); }
  80%      { transform: translateX(4px)  rotate(5deg);  }
}

/* ─── Footer ─── */
.site-footer {
  position: relative;
  z-index: 3;
  padding: 40px 60px;
  margin-top: 60px;
  border-top: 1px solid rgba(41,168,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.60);
}
.footer-brand span { color: #29A8FF; }

.footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.04em;
}

.footer-made {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.04em;
}
.footer-made span { color: rgba(41,168,255,0.60); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .contact-section { padding: 72px 24px 0; }
  .contact-sub { font-size: 15px; }
  .contact-ctas { margin-bottom: 52px; }
  .contact-header { margin-bottom: 40px; }
  .social-bar { padding: 22px 16px; gap: 0; flex-wrap: wrap; justify-content: center; }
  .s-icon { padding: 4px 10px; }
  .s-icon-circle { width: 54px; height: 54px; }
  .s-icon-circle svg { width: 22px; height: 22px; }
  .site-footer { flex-direction: column; gap: 10px; padding: 32px 24px; text-align: center; }
}

@media (max-width: 480px) {
  .contact-title { font-size: 38px; }
  .contact-wa { font-size: 13px; padding: 14px 24px; }
  .contact-sub { font-size: 14px; }
  .email-card-address { font-size: 12px; letter-spacing: 0; }
  .email-card-wrap.is-revealed { max-height: 160px; }
  .s-icon { padding: 4px 8px; }
  .s-icon-circle { width: 48px; height: 48px; }
  .s-icon-circle svg { width: 20px; height: 20px; }
  .s-icon-label { font-size: 9px; }
}

@media (max-width: 380px) {
  .social-bar { padding: 18px 12px; gap: 0; }
  .s-icon { padding: 4px 6px; }
  .s-icon-circle { width: 44px; height: 44px; }
  .s-icon-circle svg { width: 18px; height: 18px; }
  .s-icon-label { display: none; }
  .email-card-address { font-size: 11px; }
}

/* ─── 320px — teléfonos muy pequeños ─── */
@media (max-width: 320px) {
  .contact-section { padding: 60px 14px 0; }
  .contact-title { font-size: 32px; }
  .contact-sub { font-size: 13px; }
  .contact-ctas { margin-bottom: 40px; }
  .contact-wa { font-size: 12px; padding: 13px 20px; gap: 10px; }
  .contact-wa svg { width: 18px; height: 18px; }
  .contact-email-card { padding: 14px 18px; gap: 12px; }
  .email-card-address { font-size: 11px; }
  .social-bar { padding: 14px 8px; }
  .s-icon { padding: 4px 4px; }
  .s-icon-circle { width: 40px; height: 40px; }
  .s-icon-circle svg { width: 16px; height: 16px; }
  .site-footer { padding: 24px 14px; gap: 8px; }
  .footer-brand { font-size: 11px; }
  .footer-copy, .footer-made { font-size: 10px; }
}
