/* ============================================================
   SLC B2B — Formulario "Contáctanos"
   Tema oscuro · acentos azul Samsung · responsive
   ============================================================ */

/* ===== Tipografía: Samsung Sharp Sans ===== */
@font-face {
  font-family: 'Samsung Sharp Sans';
  src: url('../fonts/samsungsharpsans.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Samsung Sharp Sans';
  src: url('../fonts/samsungsharpsans-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Samsung Sharp Sans';
  src: url('../fonts/samsungsharpsans-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:            #000000;
  --card-bg:       #000000;
  --card-border:   rgba(255, 255, 255, 0.08);
  --input-bg:      #3a3b40;
  --input-border:  rgba(255, 255, 255, 0.06);
  --input-focus:   #2b7fff;
  --text:          #ffffff;
  --text-muted:    #a7adb5;
  --placeholder:   #8b9096;
  --blue:          #1c6ef2;
  --blue-hi:       #4f9dff;
  --error:         #ff5c5c;
  --success:       #35d07f;
  --radius:        14px;
  --font: 'Samsung Sharp Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;              /* evita scroll horizontal por el deslizamiento lateral */
  -webkit-font-smoothing: antialiased;
}

/* ===== Layout base de secciones ===== */
.section-inner {
  max-width: none;      /* categorías a todo el ancho de la pantalla */
  margin: 0;
  padding: 0 16px;
}

.section-title {
  text-align: center;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  padding: clamp(40px, 6vw, 70px) 0 clamp(24px, 3vw, 40px);
}

/* ===== Aparición progresiva al hacer scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Deslizamiento lateral: las tarjetas entran desde los lados y se "acoplan" */
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left  { transform: translateX(-70px); }
.reveal-right { transform: translateX(70px); }
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* La tarjeta principal (con el banner) entra primero... */
.contact-card.reveal        { transition-delay: 0.00s; }
/* ...y luego los items del formulario aparecen en cascada */
.pill.reveal                { transition-delay: 0.12s; }
.subtitle.reveal            { transition-delay: 0.19s; }
.form .field:nth-of-type(1) { transition-delay: 0.26s; }
.form .field:nth-of-type(2) { transition-delay: 0.32s; }
.form .field:nth-of-type(3) { transition-delay: 0.38s; }
.form .field:nth-of-type(4) { transition-delay: 0.44s; }
.form .field:nth-of-type(5) { transition-delay: 0.50s; }
.form .field:nth-of-type(6) { transition-delay: 0.56s; }
.btn-reveal                 { transition-delay: 0.62s; }

/* ============================================================
   LO QUE HACEMOS
   ============================================================ */
.about {
  padding: clamp(24px, 3.5vw, 50px) 24px clamp(44px, 5vw, 70px);
}
.about-text {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  color: #c6ccd4;          /* un poco más claro para leerse mejor */
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.95;
}

/* ============================================================
   1. CATEGORÍAS DE PRODUCTOS
   ============================================================ */
.categories { padding-bottom: 24px; }

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cat-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 752 / 538;      /* proporción real de las fotos (~1.4:1) */
  background: #17181b;          /* respaldo mientras carga la imagen */
  cursor: pointer;
}
.cat-card--wide {
  grid-column: 1 / -1;          /* ocupa las 2 columnas */
  aspect-ratio: 1425 / 666;     /* proporción real del banner ancho (~2.14:1) */
}

.cat-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.cat-card:hover .cat-card__img,
.cat-card.is-active .cat-card__img { transform: scale(1.1); }   /* zoom-in */

.cat-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;        /* centra vertical */
  justify-content: center;    /* centra horizontal */
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0);
  transition: background 0.35s ease;
}
.cat-card:hover .cat-card__overlay,
.cat-card.is-active .cat-card__overlay {
  background: rgba(0, 0, 0, 0.35);   /* oscurece la foto en hover/toque */
}

/* El nombre ya viene impreso en la imagen; ocultamos el título duplicado
   pero lo dejamos en el DOM para accesibilidad y SEO.
   (Si algún día usas imágenes SIN texto, restaura los estilos visibles.) */
.cat-card__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Panel de descripción: centrado, letra grande y fondo gris difuminado.
   Aparece al pasar el mouse. */
.cat-card__desc {
  font-size: clamp(16px, 1.7vw, 24px);
  line-height: 1.55;
  font-weight: 500;
  color: #ffffff;
  max-width: min(88%, 660px);
  padding: clamp(16px, 2vw, 28px) clamp(18px, 2.2vw, 32px);
  border-radius: 16px;
  background: rgba(70, 70, 75, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.cat-card:hover .cat-card__desc,
.cat-card.is-active .cat-card__desc {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   2. SECCIÓN CONTÁCTANOS
   ============================================================ */
.contact {
  display: flex;
  justify-content: center;
  padding: 40px 16px 56px;
}

/* ===== Tarjeta ===== */
.contact-card {
  width: 100%;
  max-width: none;              /* a todo el ancho, como las categorías */
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ===== Hero / encabezado ===== */
.card-hero {
  position: relative;
  line-height: 0;              /* elimina el hueco bajo la imagen */
  background: #000;            /* respaldo mientras carga la foto */
}

.card-hero__img {
  display: block;
  width: 100%;
  height: auto;               /* mantiene la proporción del banner */
}

/* Oculta visualmente el título pero lo deja accesible/SEO */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Cuerpo (contiene el pill + la tarjeta interior) ===== */
.card-body {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Pill que se monta sobre el borde superior de la tarjeta interior */
.pill {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(28, 110, 242, 0.35);
  margin-bottom: -18px;        /* jala la tarjeta interior hacia arriba */
  text-align: center;
}

/* ===== Tarjeta interior (card 2) ===== */
.card-inner {
  width: 100%;
  max-width: 1450px;            /* campos más anchos, con un tope para que se lea bien */
  margin: 0 auto;
  background: #000;
  border: 5px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 42px clamp(26px, 5vw, 70px) 30px;   /* más aire a los lados en pantallas anchas */
}

.subtitle {
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.55;
  text-align: center;
  margin-bottom: 28px;
}

/* ===== Formulario ===== */
.form { width: 100%; }

/* Honeypot invisible */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 9px;
  color: #eaecef;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  padding: 16px 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea { resize: vertical; min-height: 130px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.18);
}

.field.invalid input,
.field.invalid textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.15);
}

.error {
  display: block;
  color: var(--error);
  font-size: 12px;
  margin-top: 5px;
  min-height: 14px;
}

/* ===== Botón enviar ===== */
.btn-submit {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue));
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: 17px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:hover:not(:disabled) { filter: brightness(1.08); }
.btn-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn-submit.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Estado del envío ===== */
.form-status {
  text-align: center;
  font-size: 13.5px;
  margin-top: 14px;
  min-height: 18px;
}
.form-status.ok  { color: var(--success); }
.form-status.err { color: var(--error); }

/* ============================================================
   3. FOOTER
   ============================================================ */
.site-footer {
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: clamp(50px, 7vw, 90px) 16px clamp(40px, 5vw, 64px);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.footer-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: clamp(30px, 3.5vw, 44px);
}

/* Servicios profesionales */
.services-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 44px clamp(56px, 7vw, 100px);
  margin-bottom: clamp(56px, 7vw, 84px);
}
.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: clamp(16px, 1.4vw, 20px);
}
.service__icon {
  width: clamp(54px, 5vw, 80px);
  height: clamp(54px, 5vw, 80px);
  object-fit: contain;      /* mantiene la proporción del icono */
  color: var(--blue-hi);    /* aplica solo si fuera un SVG */
}

/* Marcas que confían (espacio reservado para logos) */
.brands-grid {
  min-height: 110px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px 52px;
  margin-bottom: 60px;
}
.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}
.brands-placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-size: 15px;
  font-style: italic;
}

/* Encuéntranos */
.footer-find {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 12px;
}
.footer-place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 600;
  margin-bottom: 6px;
}
.pin-icon { width: 22px; height: 22px; color: var(--blue-hi); }
.footer-address { color: var(--text-muted); font-size: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .section-inner { padding: 0 16px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card__desc { max-width: 92%; }
  .services-grid { gap: 30px 40px; }
}

@media (max-width: 480px) {
  .contact { padding: 28px 12px 44px; }
  .card-inner { padding: 38px 18px 24px; }
  .card-body { padding: 18px 16px 22px; }
}
