/* ============================================================
   DIKTYA SpA — Hoja de estilos
   Identidad segun "DIKTYA - Manual de Identidad V1"
   Navy #123047 · Cyan #0090D6 (acento, nunca fondo dominante)
   Titulares Exo 2 · Cuerpo Lato
   ============================================================ */

:root {
  --navy: #123047;
  --navy-900: #0b2033;
  --navy-700: #1b4a66;
  --cyan: #0090D6;
  --cyan-600: #007bb8;
  --cyan-100: #e6f4fc;
  --texto: #111827;
  --gris: #6B7280;
  --gris-100: #f3f4f6;
  --gris-200: #e5e7eb;
  --blanco: #ffffff;

  --fuente-titulo: 'Exo 2', 'Segoe UI', Arial, Helvetica, sans-serif;
  --fuente-cuerpo: 'Lato', 'Segoe UI', Arial, Helvetica, sans-serif;

  --ancho: 1180px;
  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 4px 24px rgba(18, 48, 71, .08);
  --sombra-alta: 0 12px 40px rgba(18, 48, 71, .14);
  --transicion: .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fuente-cuerpo);
  font-size: 17px;
  line-height: 1.7;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-600); text-decoration: none; transition: color var(--transicion); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 {
  font-family: var(--fuente-titulo);
  color: var(--navy);
  line-height: 1.18;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Utilidades ---------- */
.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }
.seccion { padding: clamp(60px, 9vw, 110px) 0; }
.seccion--gris { background: var(--gris-100); }
.seccion--navy { background: var(--navy); color: rgba(255,255,255,.88); }
.seccion--navy h2, .seccion--navy h3 { color: var(--blanco); }

.kicker {
  display: inline-block;
  font-family: var(--fuente-titulo);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: .9rem;
}
.kicker--claro { color: #5cc4f0; }

.titulo-seccion { max-width: 720px; margin-bottom: 3rem; }
.titulo-seccion.centrado { margin-left: auto; margin-right: auto; text-align: center; }
.titulo-seccion p { color: var(--gris); font-size: 1.07rem; margin-bottom: 0; }
.seccion--navy .titulo-seccion p { color: rgba(255,255,255,.75); }

.acento { color: var(--cyan); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: .97rem;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transicion);
  text-align: center;
}
.boton--primario { background: var(--cyan); color: #fff; }
.boton--primario:hover { background: var(--cyan-600); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,144,214,.3); }
.boton--secundario { background: transparent; color: var(--navy); border-color: var(--navy); }
.boton--secundario:hover { background: var(--navy); color: #fff; }
.boton--claro { background: #fff; color: var(--navy); }
.boton--claro:hover { background: var(--cyan); color: #fff; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gris-200);
}
.cabecera__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 82px; }
.cabecera__logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: .96rem;
  color: var(--navy);
  padding: .4rem 0;
  position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--cyan); transition: width var(--transicion);
}
.nav a:hover::after, .nav a.activo::after { width: 100%; }
.nav a.activo { color: var(--cyan); }
.nav__cta { margin-left: .4rem; }

.menu-boton {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; width: 44px; height: 44px;
}
.menu-boton span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px auto; transition: var(--transicion); border-radius: 2px;
}
.menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 55%, #1a4a68 100%);
  background-color: var(--navy);
  color: #fff;
  overflow: hidden;
  padding: clamp(80px, 12vw, 140px) 0 clamp(70px, 10vw, 120px);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('../img/trama-red.svg');
  background-size: cover; background-position: center;
  opacity: .5; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.22rem); color: rgba(255,255,255,.85); max-width: 640px; margin-bottom: 2rem; }
.hero__acciones { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Hero interno (paginas secundarias) */
.hero--interno { padding: clamp(60px, 8vw, 96px) 0; }
.hero--interno h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.hero--interno p { margin-bottom: 0; }

/* ---------- Rejilla de tarjetas ---------- */
.rejilla { display: grid; gap: 1.6rem; }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.tarjeta {
  background: #fff;
  border: 1px solid var(--gris-200);
  border-radius: var(--radio);
  padding: 2rem 1.8rem;
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
  height: 100%;
}
.tarjeta:hover { transform: translateY(-5px); box-shadow: var(--sombra-alta); border-color: var(--cyan); }
.tarjeta p { color: var(--gris); font-size: .98rem; margin-bottom: 0; }
.tarjeta__icono {
  width: 50px; height: 50px; border-radius: 12px;
  background: var(--cyan-100); color: var(--cyan);
  display: grid; place-items: center; margin-bottom: 1.2rem;
}
.tarjeta__icono svg { width: 26px; height: 26px; }

/* Tarjeta sobre fondo navy */
.seccion--navy .tarjeta {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}
.seccion--navy .tarjeta:hover { background: rgba(255,255,255,.1); border-color: var(--cyan); }
.seccion--navy .tarjeta p { color: rgba(255,255,255,.75); }
.seccion--navy .tarjeta__icono { background: rgba(0,144,214,.2); color: #5cc4f0; }

/* ---------- Bloque dos columnas (texto + imagen) ---------- */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.duo__media img { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; }
.duo__media--par { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.duo__media--par img { height: 100%; object-fit: cover; }

/* Lista de pasos */
.pasos { display: grid; gap: 1.7rem; }
.paso { display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem; align-items: start; }
.paso__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cyan-100); color: var(--cyan);
  font-family: var(--fuente-titulo); font-weight: 700; font-size: 1.05rem;
  display: grid; place-items: center;
}
.paso h3 { margin-bottom: .3rem; }
.paso p { color: var(--gris); font-size: .97rem; margin-bottom: 0; }

/* ---------- Cifras ---------- */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.6rem; }
.cifra { text-align: center; padding: 1.8rem 1rem; }
.cifra__n {
  font-family: var(--fuente-titulo); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.2rem); color: var(--cyan); line-height: 1;
}
.cifra__t { font-size: .95rem; color: var(--gris); margin-top: .5rem; }
.seccion--navy .cifra__t { color: rgba(255,255,255,.72); }

/* ---------- Galeria ---------- */
.galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.galeria img {
  border-radius: var(--radio-sm); width: 100%; height: 240px; object-fit: cover;
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.galeria img:hover { transform: scale(1.02); box-shadow: var(--sombra-alta); }

/* ---------- Lista con check ---------- */
.lista-check li {
  position: relative; padding-left: 1.9rem; margin-bottom: .7rem;
  color: var(--gris); font-size: .97rem;
}
.lista-check li::before {
  content: ''; position: absolute; left: 0; top: .52em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-100);
}

/* ---------- Formulario ---------- */
.form-envoltorio {
  background: #fff; border: 1px solid var(--gris-200);
  border-radius: var(--radio); padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--sombra);
}
.campo { margin-bottom: 1.15rem; }
.campo label {
  display: block; font-family: var(--fuente-titulo); font-weight: 600;
  font-size: .9rem; color: var(--navy); margin-bottom: .4rem;
}
.campo .req { color: var(--cyan); }
.campo input, .campo textarea, .campo select {
  width: 100%; font-family: var(--fuente-cuerpo); font-size: 1rem;
  padding: .8rem 1rem; color: var(--texto);
  border: 1.5px solid var(--gris-200); border-radius: var(--radio-sm);
  background: #fff; transition: border-color var(--transicion), box-shadow var(--transicion);
}
.campo textarea { min-height: 140px; resize: vertical; }
.campo input:focus, .campo textarea:focus, .campo select:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,144,214,.15);
}
.campo input::placeholder, .campo textarea::placeholder { color: #9ca3af; }
.campo--error input, .campo--error textarea { border-color: #dc2626; }
.campo__error { display: none; color: #dc2626; font-size: .85rem; margin-top: .3rem; }
.campo--error .campo__error { display: block; }

.form-mensaje { display: none; padding: 1rem 1.2rem; border-radius: var(--radio-sm); margin-bottom: 1.2rem; font-size: .96rem; }
.form-mensaje--ok { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-mensaje--error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- Datos de contacto ---------- */
.datos-contacto { display: grid; gap: 1.5rem; }
.dato { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; align-items: start; }
.dato__icono {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--cyan-100); color: var(--cyan);
  display: grid; place-items: center;
}
.dato__icono svg { width: 22px; height: 22px; }
.dato h3 { font-size: 1rem; margin-bottom: .15rem; }
.dato p, .dato a { font-size: .97rem; color: var(--gris); margin: 0; }
.dato a:hover { color: var(--cyan); }

/* ---------- CTA final ---------- */
.cta-final { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.cta-final::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('../img/trama-red.svg');
  background-size: cover; opacity: .35;
}
.cta-final .contenedor { position: relative; z-index: 1; text-align: center; }
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.8); max-width: 600px; margin: 0 auto 2rem; }

/* ---------- Pie ---------- */
.pie { background: var(--navy-900); color: rgba(255,255,255,.7); padding: 64px 0 28px; font-size: .94rem; }
.pie__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.pie img { height: 44px; margin-bottom: 1.1rem; }
.pie h4 { color: #fff; font-family: var(--fuente-titulo); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.pie a { color: rgba(255,255,255,.7); display: block; margin-bottom: .55rem; }
.pie a:hover { color: var(--cyan); }
.pie__legal {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .88rem; color: rgba(255,255,255,.55);
}

/* ---------- Animacion de entrada ---------- */
.revelar { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.revelar.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .revelar { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pie__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .menu-boton { display: block; }
  .nav {
    position: fixed; inset: 82px 0 auto 0;
    background: #fff; flex-direction: column; align-items: stretch;
    gap: 0; padding: 1rem 24px 1.6rem;
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--sombra);
    transform: translateY(-120%); transition: transform .3s ease;
    max-height: calc(100vh - 82px); overflow-y: auto;
  }
  .nav.abierto { transform: translateY(0); }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--gris-100); }
  .nav a::after { display: none; }
  .nav__cta { margin: 1rem 0 0; justify-content: center; }
  .duo__media--par { grid-template-columns: 1fr; }
  .pie__grid { grid-template-columns: 1fr; gap: 2rem; }
  .galeria img { height: 200px; }
}
