/* ============================================================
   Cerrajeros Valdés — costadelsolcerrajeros.es
   ============================================================ */

:root {
  --negro: #101013;
  --negro-2: #16161a;
  --tarjeta: #1c1c21;
  --borde: #2b2b32;
  --amarillo: #ffc400;
  --amarillo-suave: rgba(255, 196, 0, 0.12);
  --texto: #f0eee8;
  --gris: #aaa8a1;
  --verde: #25d366;
  --verde-oscuro: #1eb356;
  --radio: 18px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  background: var(--negro);
  color: var(--texto);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

::selection { background: var(--amarillo); color: #141414; }

a { color: var(--amarillo); }

:focus-visible {
  outline: 2px solid var(--amarillo);
  outline-offset: 3px;
  border-radius: 4px;
}

.contenedor {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 22px;
}

.saltar {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--amarillo);
  color: #141414;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.saltar:focus { left: 8px; }

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.boton svg { width: 20px; height: 20px; flex: 0 0 auto; }

.boton-whatsapp {
  background: var(--verde);
  color: #fff;
}
.boton-whatsapp:hover {
  background: var(--verde-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
}

.boton-amarillo {
  background: var(--amarillo);
  color: #141414;
}
.boton-amarillo:hover {
  background: #ffd54d;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 196, 0, 0.25);
}

.boton-grande { padding: 0.95rem 1.7rem; font-size: 1.05rem; }

/* ---------- Cabecera ---------- */

.cabecera {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.cabecera.desplazada {
  background: rgba(13, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.cabecera-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--texto);
}
.logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--amarillo);
}
.logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.logo-texto strong { color: var(--amarillo); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.logo-texto small { color: var(--gris); font-size: 0.72rem; letter-spacing: 0.06em; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav > a:not(.boton) {
  color: var(--texto);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav > a:not(.boton):hover {
  color: var(--amarillo);
  border-color: var(--amarillo);
}
.nav-cta { padding: 0.55rem 1.15rem; font-size: 0.9rem; }

.cabecera-derecha {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.idiomas {
  display: flex;
  border: 1px solid var(--borde);
  border-radius: 999px;
  overflow: hidden;
}
.idioma {
  background: transparent;
  border: 0;
  color: var(--gris);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.idioma.activo {
  background: var(--amarillo);
  color: #141414;
}

.hamburguesa {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--borde);
  border-radius: 10px;
  cursor: pointer;
}
.hamburguesa span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--texto);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hamburguesa.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburguesa.abierto span:nth-child(2) { opacity: 0; }
.hamburguesa.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 8.5rem 0 5rem;
  background:
    linear-gradient(180deg, rgba(10, 10, 13, 0.82) 0%, rgba(12, 12, 15, 0.88) 55%, var(--negro) 100%),
    url("../img/puerta-seguridad.jpg") center 38% / cover no-repeat;
}

.hero-contenido { max-width: 780px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 196, 0, 0.55);
  background: rgba(255, 196, 0, 0.08);
  color: var(--amarillo);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.punto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  animation: latido 2.2s infinite;
}
@keyframes latido {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.hero h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}

.hero-sub {
  color: #cfcdc6;
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  max-width: 620px;
  margin-bottom: 2.1rem;
}

.hero-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.3rem;
}

.hero-confianza {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.9rem;
  list-style: none;
}
.hero-confianza li {
  color: var(--gris);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-confianza li::before {
  content: "✓";
  color: var(--amarillo);
  font-weight: 800;
}

/* ---------- Secciones ---------- */

.seccion { padding: 5.6rem 0; }
.seccion-alt {
  background: var(--negro-2);
  border-block: 1px solid #1f1f25;
}

.kicker {
  color: var(--amarillo);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.intro-seccion {
  color: var(--gris);
  max-width: 640px;
  margin-bottom: 2.8rem;
}

/* ---------- Servicios ---------- */

.rejilla-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.tarjeta {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.7rem 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tarjeta:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 196, 0, 0.6);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}
.tarjeta h3 { font-size: 1.13rem; font-weight: 700; margin-bottom: 0.45rem; }
.tarjeta p { color: var(--gris); font-size: 0.94rem; }

.icono-caja {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--amarillo-suave);
  color: var(--amarillo);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.icono-caja svg { width: 30px; height: 30px; }

/* ---------- Galería ---------- */

.rejilla-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
}

.foto {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
}
.foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.foto:hover img { transform: scale(1.05); }
.foto figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 2.2rem 1rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
}

.galeria-nota {
  margin-top: 2rem;
  padding: 1.15rem 1.3rem;
  border: 1px dashed rgba(255, 196, 0, 0.5);
  border-radius: var(--radio);
  background: var(--amarillo-suave);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}
.galeria-nota a { font-weight: 700; }

.galeria-marcas {
  margin-top: 1.1rem;
  color: var(--gris);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* ---------- Proceso ---------- */

.proceso-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.2rem;
  align-items: center;
}

.proceso-foto { position: relative; margin: 0; }
.proceso-foto img {
  position: relative;
  z-index: 1;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.proceso-foto::before {
  content: "";
  position: absolute;
  top: -16px;
  right: -16px;
  width: 62%;
  height: 62%;
  border: 3px solid var(--amarillo);
  border-radius: 22px;
  opacity: 0.8;
}

.pasos {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}
.paso { display: flex; gap: 1.05rem; }
.paso-numero {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--amarillo);
  color: #141414;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}
.paso h3 { font-size: 1.08rem; margin-bottom: 0.25rem; }
.paso p { color: var(--gris); font-size: 0.94rem; }

/* ---------- Reserva ---------- */

.reserva-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.6rem;
  align-items: start;
}

.formulario {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
  margin-bottom: 1.4rem;
}

.campo { display: flex; flex-direction: column; gap: 0.38rem; }
.campo-completo { grid-column: 1 / -1; }

.campo label {
  font-size: 0.88rem;
  font-weight: 600;
}
.campo label span { color: var(--amarillo); }

.campo input,
.campo select,
.campo textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--texto);
  background: #131317;
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--amarillo);
  box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.16);
}
.campo textarea { resize: vertical; min-height: 84px; }
.campo input::placeholder,
.campo textarea::placeholder { color: #6f6d66; }

.campo input.fecha-vacia::-webkit-calendar-picker-indicator { filter: invert(0.75); }

.boton-enviar { width: 100%; }

.form-estado {
  margin-top: 0.9rem;
  color: var(--verde);
  font-size: 0.92rem;
  font-weight: 600;
}

.form-nota {
  margin-top: 0.9rem;
  color: var(--gris);
  font-size: 0.82rem;
}

.form-fallback {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--gris);
}
.form-fallback a { font-weight: 700; }

.panel-contacto {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.panel-contacto h3 { font-size: 1.15rem; margin-bottom: 0.2rem; }

.panel-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--texto);
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  transition: background 0.15s ease;
}
a.panel-item:hover { background: rgba(255, 255, 255, 0.05); }

.panel-icono {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--amarillo-suave);
  color: var(--amarillo);
  display: grid;
  place-items: center;
}
.panel-icono svg { width: 24px; height: 24px; }
.panel-icono.verde { background: rgba(37, 211, 102, 0.14); color: var(--verde); }

.panel-item strong { display: block; font-size: 0.96rem; line-height: 1.3; }
.panel-item small { color: var(--gris); font-size: 0.85rem; overflow-wrap: anywhere; }

/* ---------- Zonas ---------- */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.chips li {
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 0.48rem 1.05rem;
  font-size: 0.92rem;
  color: var(--gris);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chips li:hover {
  border-color: var(--amarillo);
  color: var(--texto);
}

/* ---------- Pie ---------- */

.pie {
  background: #0b0b0d;
  border-top: 1px solid #1f1f25;
}

.pie-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.2rem;
  padding-block: 3.2rem;
}

.pie-logo { margin-bottom: 1rem; }
.pie-breve { color: var(--gris); font-size: 0.92rem; max-width: 320px; }

.pie h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amarillo);
  margin-bottom: 1rem;
}

.pie-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.93rem;
}
.pie-lista a {
  color: var(--gris);
  text-decoration: none;
  transition: color 0.15s ease;
}
.pie-lista a:hover { color: var(--amarillo); }
.pie-lista span { color: var(--gris); }

.pie-legal {
  border-top: 1px solid #1c1c22;
  padding-block: 1.1rem;
}
.pie-legal-fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.4rem;
  font-size: 0.82rem;
  color: var(--gris);
}

.enlace-legal {
  background: none;
  border: 0;
  font: inherit;
  color: var(--gris);
  text-decoration: underline;
  cursor: pointer;
}
.enlace-legal:hover { color: var(--amarillo); }

/* ---------- WhatsApp flotante ---------- */

.whatsapp-flotante {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease;
}
.whatsapp-flotante svg { width: 32px; height: 32px; }
.whatsapp-flotante:hover { transform: scale(1.08); }

/* ---------- Modal legal ---------- */

.modal {
  background: #17171b;
  color: var(--texto);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  max-width: 600px;
  width: calc(100% - 2rem);
  padding: 1.8rem 1.9rem;
  margin: auto;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.modal h3 { color: var(--amarillo); margin-bottom: 1rem; }
.modal p { color: var(--gris); font-size: 0.9rem; margin-bottom: 0.75rem; }

.modal-cerrar {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  color: var(--gris);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.modal-cerrar:hover { color: var(--texto); }

/* ---------- Animación de aparición ---------- */

.revelar {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.revelar.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .revelar { opacity: 1; transform: none; transition: none; }
  .punto { animation: none; }
  .foto img, .boton, .tarjeta, .whatsapp-flotante { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #0e0e11;
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
    padding: 0.6rem 1.4rem 1.4rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.abierto {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .nav > a:not(.boton) {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid #1e1e24;
    font-size: 1rem;
  }
  .nav-cta {
    margin-top: 1.1rem;
    justify-content: center;
  }
  .hamburguesa { display: flex; }

  .proceso-grid {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }
  .proceso-foto { max-width: 480px; }

  .reserva-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}

@media (max-width: 640px) {
  .hero { padding: 7.5rem 0 4rem; min-height: auto; }
  .hero-botones .boton { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .logo-texto { font-size: 0.9rem; }
  .logo-texto small { display: none; }
  .seccion { padding: 4.2rem 0; }
  .galeria-nota { flex-direction: column; align-items: flex-start; }
  .pie-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .pie-legal-fila { flex-direction: column; align-items: flex-start; }
}
