/* ==========================================================================
   Comercializadora Dorsan SpA — hoja de estilos
   Paleta tomada del logo: azul abisal, haz de luz celeste y acero plateado.
   ========================================================================== */

:root {
  --abismo: #041436;      /* fondo principal oscuro (header, hero, pie) */
  --hondo: #0a2e66;       /* azul intermedio del logo */
  --haz: #29a8e0;         /* celeste de la gota y del haz de luz: acciones */
  --haz-oscuro: #1683b5;
  --acero: #c5d0dd;       /* plateado del emblema */
  --acero-claro: #e6ecf2;
  --papel: #f2f5f8;
  --blanco: #ffffff;
  --tinta: #0f1b2d;
  --tinta-suave: #4a5a70;
  --linea: #d5dde6;
  --error: #b42318;
  --exito: #067647;

  --fuente-titulo: "Saira", "Arial Narrow", "Segoe UI", sans-serif;
  --fuente-texto: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ancho: 1180px;
  --radio: 6px;
  --alto-header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-header) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
}

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

h1, h2, h3 { font-family: var(--fuente-titulo); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--haz-oscuro); }

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

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }

.solo-lectores {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--haz); color: var(--abismo); padding: .6rem 1rem; font-weight: 600; border-radius: var(--radio);
}
.saltar:focus { top: 1rem; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--fuente-titulo); font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  padding: .8rem 1.4rem; border-radius: var(--radio); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.boton-principal { background: var(--haz); color: var(--abismo); }
.boton-principal:hover { background: #4bbbec; }
.boton-contorno { border-color: rgba(197, 208, 221, .5); color: var(--acero-claro); background: transparent; }
.boton-contorno:hover { border-color: var(--acero-claro); color: var(--blanco); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(4, 20, 54, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(197, 208, 221, .12);
}
.header .contenedor { display: flex; align-items: center; justify-content: space-between; height: var(--alto-header); }

.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.marca-emblema { width: 42px; height: auto; }
.marca-texto { width: 124px; height: auto; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2rem; }
.nav a:not(.boton) {
  color: var(--acero); text-decoration: none; font-weight: 500; font-size: .98rem;
  padding: .3rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:not(.boton):hover { color: var(--blanco); border-bottom-color: var(--haz); }
.nav .boton, .header .contenedor > .boton { padding: .55rem 1.1rem; font-size: .95rem; }

.menu-boton {
  display: none; background: none; border: 1px solid rgba(197, 208, 221, .35); border-radius: var(--radio);
  width: 44px; height: 44px; color: var(--acero-claro); cursor: pointer; padding: 0;
}
.menu-boton svg { width: 24px; height: 24px; margin: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--acero-claro);
  background:
    radial-gradient(ellipse 38% 80% at 72% -5%, rgba(41, 168, 224, .30), transparent 70%),
    linear-gradient(180deg, var(--abismo) 0%, #061a45 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero .contenedor { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 2rem; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 700; color: var(--blanco);
  letter-spacing: -.02em; max-width: 17ch; margin-bottom: .4em;
}
.hero-bajada { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 50ch; color: var(--acero); margin-bottom: 2rem; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-datos {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 2.6rem 0 0; padding: 0; list-style: none;
  font-size: .95rem; color: var(--acero);
}
.hero-datos li { padding: 0 1.2rem; border-left: 1px solid rgba(197, 208, 221, .25); }
.hero-datos li:first-child { padding-left: 0; border-left: 0; }
.hero-datos strong { display: block; font-family: var(--fuente-titulo); color: var(--blanco); font-weight: 600; font-size: 1.05rem; }

.hero-logo { position: relative; justify-self: center; width: min(100%, 460px); }
.hero-logo img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 50%, #000 45%, transparent 100%);
  animation: aparecer 1.4s ease-out both;
}
@keyframes aparecer { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.seccion-blanca { background: var(--blanco); }
.seccion-cabecera { max-width: 60ch; margin-bottom: 3rem; }
.seccion-cabecera p { color: var(--tinta-suave); font-size: 1.1rem; margin: 0; }

/* Productos: rejilla con líneas finas, sin tarjetas flotantes */
.productos-lista {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--linea);
}
.producto {
  padding: 2rem 1.75rem 2rem 0; border-bottom: 1px solid var(--linea);
  display: flex; flex-direction: column;
}
.producto:not(:nth-child(3n+1)) { padding-left: 1.75rem; border-left: 1px solid var(--linea); }
.producto-icono {
  width: 52px; height: 52px; border-radius: var(--radio); margin-bottom: 1.1rem;
  background: var(--abismo); color: var(--acero-claro); display: grid; place-items: center;
}
.producto-icono svg { width: 28px; height: 28px; }
.producto p { color: var(--tinta-suave); font-size: 1rem; flex: 1; }
.producto-cotizar {
  align-self: flex-start; font-family: var(--fuente-titulo); font-weight: 600; font-size: .95rem;
  color: var(--haz-oscuro); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.producto-cotizar:hover { color: var(--hondo); }

/* Proceso (secuencia real: numeración justificada) */
.pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: paso; }
.paso { counter-increment: paso; position: relative; padding-top: 4.2rem; }
.paso::before {
  content: counter(paso); position: absolute; top: 0; left: 0;
  font-family: var(--fuente-titulo); font-weight: 700; font-size: 3.2rem; line-height: 1;
  color: var(--hondo);
}
.paso::after { content: ""; position: absolute; top: 1.6rem; left: 3rem; right: -1.25rem; height: 1px; background: var(--linea); }
.paso:last-child::after { display: none; }
.paso p { color: var(--tinta-suave); margin: 0; }

/* Ventajas */
.ventajas { background: var(--abismo); color: var(--acero); }
.ventajas h2 { color: var(--blanco); }
.ventajas-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.ventajas-lista li { border-top: 2px solid var(--haz); padding-top: 1.2rem; }
.ventajas-lista h3 { color: var(--blanco); }
.ventajas-lista p { margin: 0; font-size: 1rem; }

/* ---------- Cotizador ---------- */
.cotizar-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); background: var(--blanco); }
.cotizar-info { background: var(--hondo); color: var(--acero-claro); padding: clamp(2rem, 4vw, 3rem); }
.cotizar-info h2 { color: var(--blanco); }
.cotizar-info h3 { color: var(--blanco); font-size: 1.05rem; margin-top: 2rem; }
.cotizar-info ol { margin: 0; padding-left: 1.2rem; }
.cotizar-info li { margin-bottom: .6rem; }
.contacto-directo { list-style: none; margin: 0; padding: 0; }
.contacto-directo li { margin-bottom: .5rem; }
.contacto-directo a { color: var(--blanco); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.contacto-directo a:hover { border-bottom-color: var(--haz); }

.formulario { padding: clamp(2rem, 4vw, 3rem); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.campo { margin-bottom: 1.25rem; }
.campo label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.campo .opcional { font-weight: 400; color: var(--tinta-suave); }
.campo input, .campo select, .campo textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  padding: .7rem .85rem; border: 1px solid #b9c5d3; border-radius: var(--radio); background: var(--blanco);
  transition: border-color .2s, box-shadow .2s;
}
.campo textarea { min-height: 130px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--haz-oscuro); box-shadow: 0 0 0 3px rgba(41, 168, 224, .25); }
.campo [aria-invalid="true"] { border-color: var(--error); }
.campo-error { color: var(--error); font-size: .9rem; margin: .3rem 0 0; }
.campo-error:empty { display: none; }
.campo input, .campo select { height: 2.9rem; }
.campo-check + .campo-error { margin: -1rem 0 1.25rem; }
.ayuda { color: var(--tinta-suave); font-size: .88rem; margin-top: .3rem; }

.campo-check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.5rem; font-size: .95rem; }
.campo-check input { width: 20px; height: 20px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--hondo); }

.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.formulario .boton-principal { width: 100%; font-size: 1.05rem; padding: .95rem; background: var(--hondo); color: var(--blanco); }
.formulario .boton-principal:hover { background: var(--abismo); }
.formulario .boton-principal[disabled] { opacity: .65; cursor: progress; }

.estado { display: none; padding: 1rem 1.1rem; border-radius: var(--radio); margin-bottom: 1.5rem; font-weight: 500; }
.estado.visible { display: block; }
.estado.ok { background: #e7f6ee; color: var(--exito); border-left: 4px solid var(--exito); }
.estado.mal { background: #fdecea; color: var(--error); border-left: 4px solid var(--error); }

/* ---------- Ubicación ---------- */
.ubicacion-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.datos-empresa { font-style: normal; }
.datos-empresa dl { margin: 0; }
.datos-empresa dt { font-family: var(--fuente-titulo); font-weight: 600; color: var(--hondo); margin-top: 1.2rem; }
.datos-empresa dd { margin: .15rem 0 0; }
.mapa { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 10px; background: var(--acero-claro); }

/* ---------- Pie ---------- */
.pie { background: var(--abismo); color: var(--acero); padding: 3.5rem 0 2rem; font-size: .95rem; }
.pie-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.pie h2 { font-size: 1rem; color: var(--blanco); margin-bottom: .9rem; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: .45rem; }
.pie a { color: var(--acero); text-decoration: none; }
.pie a:hover { color: var(--blanco); text-decoration: underline; }
.pie-marca { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.pie-legal { border-top: 1px solid rgba(197, 208, 221, .15); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .88rem; color: #8b9ab0; }

/* ---------- WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.whatsapp svg { width: 30px; height: 30px; }
.whatsapp:hover { background: #1ebe5b; }

/* ---------- Páginas interiores (privacidad, gracias, 404) ---------- */
.pagina-simple { padding: clamp(3rem, 7vw, 5rem) 0; }
.texto-legal { max-width: 72ch; margin-inline: auto; background: var(--blanco); padding: clamp(1.5rem, 4vw, 3rem); border-radius: 10px; border: 1px solid var(--linea); }
.texto-legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.texto-legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.texto-legal ul { padding-left: 1.2rem; }
.aviso-centro { text-align: center; max-width: 52ch; margin-inline: auto; }
.aviso-centro h1 { font-size: clamp(2rem, 5vw, 3rem); }
.aviso-centro .boton { margin-top: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .contenedor { grid-template-columns: 1fr; }
  .hero-logo { order: -1; width: min(70%, 300px); }
  .hero { background: radial-gradient(ellipse 60% 45% at 50% -5%, rgba(41, 168, 224, .30), transparent 70%), linear-gradient(180deg, var(--abismo) 0%, #061a45 100%); }
  .productos-lista { grid-template-columns: 1fr 1fr; }
  .producto, .producto:not(:nth-child(3n+1)) { padding: 2rem 1.5rem 2rem 0; border-left: 0; }
  .producto:nth-child(2n) { padding-left: 1.5rem; border-left: 1px solid var(--linea); }
  .ventajas-lista { grid-template-columns: 1fr 1fr; }
  .cotizar-grid, .ubicacion-grid { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .menu-boton { display: grid; }
  .nav {
    position: absolute; top: var(--alto-header); left: 0; right: 0;
    background: var(--abismo); border-bottom: 1px solid rgba(197, 208, 221, .15);
    display: none; padding: 1rem 1.25rem 1.5rem;
  }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a:not(.boton) { display: block; padding: .9rem 0; border-bottom: 1px solid rgba(197, 208, 221, .1); }
  .nav .boton { margin-top: 1rem; width: 100%; padding: .8rem; }
  .pasos { grid-template-columns: 1fr; gap: 2rem; }
  .paso::after { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .marca-texto { width: 104px; }
  .productos-lista { grid-template-columns: 1fr; }
  .producto, .producto:nth-child(2n), .producto:not(:nth-child(3n+1)) { padding: 1.75rem 0; border-left: 0; }
  .fila { grid-template-columns: 1fr; }
  .ventajas-lista, .pie-grid { grid-template-columns: 1fr; }
  .hero-datos { grid-template-columns: 1fr; gap: .9rem; }
  .hero-datos li { padding: 0; border-left: 0; }
  .hero-acciones .boton { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .header, .whatsapp, .mapa, .formulario { display: none; }
  body { background: #fff; }
}
