﻿/* =============================================================
   MyVCard — SCSI Soluciones TI
   Hoja de estilos principal
   Orden: 1) variables  2) base  3) animaciones  4) encabezado
          5) contenido  6) componentes  7) barra fija  8) responsivo
   Diseño móvil primero: el ancho de referencia es 430 px.
   ============================================================= */

/* ---------- 1. VARIABLES DE MARCA ---------- */
:root {
  --fondo: #0E0B0E;          /* fondo general, casi negro */
  --tinta: #F5F0EC;          /* texto y placas claras */
  --borde: rgba(245, 240, 236, .16);
  --borde-fuerte: rgba(245, 240, 236, .45);
  --superficie: rgba(245, 240, 236, .04);
  --superficie-alta: rgba(245, 240, 236, .08);
  --linea: rgba(245, 240, 236, .18);
  --ancho-tarjeta: 430px;    /* ancho máximo de la tarjeta */
  --margen: 24px;            /* margen lateral del contenido */
  --curva: cubic-bezier(.2, .8, .2, 1);

  --tipo-titulo: Sora, system-ui, sans-serif;
  --tipo-texto: 'Instrument Sans', system-ui, sans-serif;
  --tipo-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--tipo-texto);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }

h1, h2, h3, p { margin: 0; }

img { display: block; }

/* Contenedor centrado: en escritorio la tarjeta se mantiene angosta */
.lienzo { min-height: 100%; display: flex; justify-content: center; }
.tarjeta { position: relative; width: 100%; max-width: var(--ancho-tarjeta); }

/* Etiquetas monoespaciadas reutilizables */
.etiqueta {
  font-family: var(--tipo-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .75;
}
.etiqueta--tenue { opacity: .5; }
.etiqueta--mini { font-size: 10px; letter-spacing: .08em; text-transform: none; opacity: .5; }

/* ---------- 3. ANIMACIONES ---------- */
/* Entrada escalonada de bloques */
@keyframes aparecer { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fundido  { from { opacity: 0; } to { opacity: 1; } }

/* Movimiento lento de las manchas del encabezado */
@keyframes deriva-1 { 0%, 100% { transform: translate(-6%, -4%) scale(1); }    50% { transform: translate(10%, 8%) scale(1.18); } }
@keyframes deriva-2 { 0%, 100% { transform: translate(8%, 6%) scale(1.1); }    50% { transform: translate(-10%, -8%) scale(.92); } }
@keyframes deriva-3 { 0%, 100% { transform: translate(0, 4%) scale(.95); }     50% { transform: translate(6%, -10%) scale(1.25); } }

/* Anillo que se expande alrededor del logotipo */
@keyframes anillo { 0% { transform: scale(1); opacity: .45; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* Destello que recorre el botón principal */
@keyframes destello { from { transform: translateX(-130%); } to { transform: translateX(130%); } }

/* Línea que se dibuja junto a los títulos de sección */
@keyframes trazo { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Punto de "abierto ahora" */
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Desplazamiento continuo de la cinta de servicios (la pista está duplicada) */
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Respeta la preferencia del sistema de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- 4. ENCABEZADO ---------- */
.encabezado {
  position: relative;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* Manchas de color desenfocadas: la "malla de gradiente" en movimiento */
.encabezado__mancha { position: absolute; filter: blur(50px); will-change: transform; }
.encabezado__mancha--1 { inset: -20%; background: radial-gradient(closest-side, oklch(.62 .19 330), transparent 70%); opacity: .85; animation: deriva-1 19s ease-in-out infinite; }
.encabezado__mancha--2 { inset: -10% -30% 20% -10%; background: radial-gradient(closest-side, oklch(.55 .16 288), transparent 70%); opacity: .72; animation: deriva-2 24s ease-in-out infinite; }
.encabezado__mancha--3 { inset: 25% -20% -25% 10%; background: radial-gradient(closest-side, oklch(.68 .14 22), transparent 70%); opacity: .5; animation: deriva-3 31s ease-in-out infinite; }

/* Velo que funde el encabezado con el fondo y asegura contraste del texto */
.encabezado__velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 11, 14, .2) 0%, rgba(14, 11, 14, .58) 58%, var(--fondo) 100%);
}

.encabezado__cuerpo {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 26px var(--margen) 32px;
}

.encabezado__marcas { display: flex; align-items: center; justify-content: space-between; animation: fundido 1.1s ease both; }
.encabezado__identidad { display: flex; flex-direction: column; gap: 20px; }

/* Logotipo sobre placa clara + anillo animado */
.logo { position: relative; width: 108px; height: 108px; animation: aparecer .85s var(--curva) .1s both; }
.logo__anillo { position: absolute; inset: 0; border-radius: 999px; border: 1px solid rgba(245, 240, 236, .5); animation: anillo 3.8s ease-out 1.2s infinite; }
.logo__placa {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  padding: 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 240, 236, .35);
  background: var(--tinta);
  overflow: hidden;
}
.logo__placa img { width: 100%; height: 100%; object-fit: contain; }

/* Nombre: contraste de pesos (300 / 700) en lugar de dos familias */
.titulo { font-family: var(--tipo-titulo); font-size: 44px; letter-spacing: -.025em; }
.titulo__ligero { display: block; font-weight: 300; line-height: .96; animation: aparecer .85s var(--curva) .22s both; }
.titulo__fuerte { display: block; font-weight: 700; line-height: 1; animation: aparecer .85s var(--curva) .32s both; }

.lema { margin-top: 16px; max-width: 300px; font-size: 16px; line-height: 1.45; opacity: .76; text-wrap: pretty; animation: aparecer .85s var(--curva) .44s both; }

/* ---------- 5. CONTENIDO ---------- */
.contenido {
  /* El relleno inferior deja espacio para la barra fija */
  padding: 4px var(--margen) 132px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* Botón principal (.vcf) */
.boton-principal {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 20px 24px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--fondo);
  font-size: 16.5px;
  font-weight: 600;
  animation: aparecer .85s var(--curva) .56s both;
}
.boton-principal:hover { background: #fff; opacity: 1; }
.boton-principal .etiqueta--tenue { color: var(--fondo); opacity: .55; }
.boton-principal__brillo {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  animation: destello 6s ease-in-out 1.8s infinite;
}

/* Contacto rápido: tres accesos con área táctil amplia */
.contacto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; animation: aparecer .85s var(--curva) .66s both; }
.contacto__opcion {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 96px;
  padding: 16px 14px;
  border: 1px solid var(--borde);
  border-radius: 20px;
}
.contacto__opcion:hover { border-color: var(--borde-fuerte); opacity: 1; }
.contacto__texto { display: flex; flex-direction: column; gap: 3px; }
.contacto__nombre { font-size: 14px; font-weight: 500; }

/* Títulos de sección con línea que se dibuja */
.seccion { display: flex; flex-direction: column; gap: 16px; }
.seccion__titulo { display: flex; align-items: center; gap: 14px; }
.seccion__linea { flex: 1; height: 1px; background: var(--linea); transform-origin: left; animation: trazo 1.2s var(--curva) .8s both; }

/* ---------- 6. COMPONENTES ---------- */

/* Productos: cuadrícula fija 2x2, sin desplazamiento */
.productos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.producto { display: flex; flex-direction: column; gap: 10px; animation: aparecer .8s var(--curva) .8s both; }
.producto:nth-child(2) { animation-delay: .88s; }
.producto:nth-child(3) { animation-delay: .96s; }
.producto:nth-child(4) { animation-delay: 1.04s; }
.producto__placa {
  /* Placa clara para que los logotipos de color se lean sobre el fondo oscuro */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 82px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 240, 236, .14);
  border-radius: 16px;
  background: var(--tinta);
  overflow: hidden;
}
.producto__placa img { max-width: 100%; height: 54px; object-fit: contain; }
.producto__nombre { font-size: 13px; font-weight: 500; padding: 0 2px; }
.producto__nota { font-size: 11.5px; line-height: 1.35; opacity: .55; padding: 0 2px; }

/* Servicios: cinta en movimiento continuo */
.cinta {
  overflow: hidden;
  margin: 0 calc(var(--margen) * -1);   /* se extiende a sangre */
  padding: 2px 0 6px;
  /* Desvanecido en ambos extremos */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cinta__pista {
  display: flex;
  gap: 10px;
  width: max-content;
  padding-left: var(--margen);
  animation: cinta 46s linear infinite;
}
/* Se pausa al pasar el cursor o al tocar */
.cinta:hover .cinta__pista,
.cinta:active .cinta__pista { animation-play-state: paused; }

.servicio {
  flex: none;
  width: 232px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--borde);
  border-radius: 22px;
  background: var(--superficie);
}
.servicio:hover { border-color: var(--borde-fuerte); background: var(--superficie-alta); opacity: 1; }
.servicio__indice { font-family: var(--tipo-mono); font-size: 10px; letter-spacing: .16em; opacity: .4; }
.servicio__cuerpo { display: flex; flex-direction: column; gap: 9px; }
.servicio__nombre { font-family: var(--tipo-titulo); font-size: 19px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.servicio__nota { font-size: 13px; line-height: 1.45; opacity: .62; text-wrap: pretty; }

.cinta__pie {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tipo-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .42;
}
.cinta__pie .seccion__linea { animation: none; }

/* Horario y ubicación */
.datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dato { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: rgba(245, 240, 236, .05); }
.dato__linea { font-size: 14px; line-height: 1.45; }
.dato__linea--tenue { opacity: .6; }
.estado { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; opacity: .85; }
.estado__punto { width: 6px; height: 6px; border-radius: 999px; background: oklch(.78 .16 150); animation: latido 2.8s ease-in-out infinite; }
/* Fuera de horario el punto cambia a ámbar (clase que agrega JavaScript) */
.estado--cerrado .estado__punto { background: oklch(.78 .14 70); animation: none; }
.enlace-sutil { align-self: flex-start; font-size: 12.5px; border-bottom: 1px solid rgba(245, 240, 236, .35); }

/* Mapa (marcador provisional) */
.mapa {
  display: grid;
  place-items: center;
  height: 150px;
  border-radius: 20px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(245, 240, 236, .11) 0 6px, rgba(245, 240, 236, .03) 6px 12px);
}

/* Redes y firma */
.pie { display: flex; flex-direction: column; gap: 20px; }
.redes { display: flex; gap: 8px; }
.red {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 15px 8px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  font-size: 13.5px;
}
.red:hover { border-color: var(--borde-fuerte); opacity: 1; }
.firma { font-family: var(--tipo-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .38; text-align: center; line-height: 1.8; }

/* ---------- 7. BARRA FIJA ---------- */
.barra-fija {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;   /* sólo los botones reciben toques */
  background: linear-gradient(180deg, rgba(14, 11, 14, 0), rgba(14, 11, 14, .94) 45%);
  padding: 26px 0 max(16px, env(safe-area-inset-bottom));
}
.barra-fija__cuerpo {
  width: 100%;
  max-width: var(--ancho-tarjeta);
  display: flex;
  gap: 10px;
  padding: 0 var(--margen);
  pointer-events: auto;
}
.barra-fija__accion {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--fondo);
  font-size: 15px;
  font-weight: 600;
}
.barra-fija__accion:hover { background: #fff; opacity: 1; }
.barra-fija__secundaria {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(245, 240, 236, .28);
  border-radius: 999px;
  background: rgba(14, 11, 14, .7);
  font-size: 15px;
  font-weight: 500;
}
.barra-fija__secundaria:hover { border-color: rgba(245, 240, 236, .6); opacity: 1; }

/* ---------- 8. RESPONSIVO ---------- */
/* Pantallas muy angostas (iPhone SE y similares) */
@media (max-width: 360px) {
  :root { --margen: 18px; }
  .titulo { font-size: 38px; }
  .contacto__opcion { min-height: 88px; }
}

/* ---------- 9. MYVCARD (datos del panel) ---------- */
/* Nombre de la persona en su tarjeta */
.persona { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; animation: aparecer .85s var(--curva) .44s both; }
.persona__linea { width: 56px; height: 1px; background: var(--borde-fuerte); }
.persona__nombre { font-family: var(--tipo-titulo); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
/* Puesto debajo del nombre */
.persona__puesto { margin-top: -6px; font-size: 14px; line-height: 1.35; letter-spacing: .02em; opacity: .78; }

/* Foto de la persona en lugar del logo (Datos generales > Imagen en la tarjeta) */
.logo__placa--foto { padding: 0; }
.logo__placa--foto img { object-fit: cover; object-position: center top; }
/* Con foto, el logo pasa a un sello en la esquina de la foto */
.logo__sello {
  position: absolute;
  right: -8px;
  bottom: -4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 7px;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  background: var(--tinta);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  overflow: hidden;
  animation: aparecer .85s var(--curva) .5s both;
}
.logo__sello img { width: 100%; height: 100%; object-fit: contain; }

/* Contacto rápido: de 1 a 4 accesos en un renglón, según los datos que haya */
.contacto { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.contacto__opcion { min-width: 0; }
/* Con cuatro accesos (persona con teléfono de oficina) van en 2 x 2 para que se lean los números */
.contacto:has(> .contacto__opcion:nth-child(4)) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.contacto:has(> .contacto__opcion:nth-child(4)) .contacto__opcion { min-height: 84px; }
.contacto__texto .etiqueta--mini { overflow-wrap: anywhere; }

/* Horario y ubicación: cada uno en su bloque */
.datos { grid-template-columns: 1fr; }

/* Redes: hasta seis, en dos renglones si hace falta */
.redes { flex-wrap: wrap; }
.red { flex: 1 1 30%; min-width: 0; }

/* Servicio sin WhatsApp: no es liga */
span.servicio { cursor: default; }

@media (max-width: 360px) {
  .persona__nombre { font-size: 21px; }
}
