/* ==========================================================================
   Mancomex International Systems, S.L. — hoja de estilos principal
   Identidad: azul marino #0B2545 · cian #1B98E0 · gris pizarra #5C6B73
   ========================================================================== */

:root {
  /* Paleta de marca */
  --navy: #0b2545;
  --navy-800: #0f2e55;
  --navy-700: #163a67;
  --light: #f5f7fa;
  --cyan: #1b98e0;
  /* Variante oscurecida del cian de marca: el #1B98E0 original solo alcanza
     3,1:1 sobre blanco y no cumple WCAG AA (4,5:1) para texto pequeño.
     Se reserva para texto y enlaces sobre fondo claro. */
  --cyan-text: #0f6fa8;
  --slate: #5c6b73;
  --slate-300: #d7dde3;
  --white: #ffffff;

  /* Tipografía */
  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Métrica */
  --max: 1140px;
  --gutter: 24px;
  --radius: 10px;
  --shadow: 0 2px 4px rgba(11, 37, 69, 0.04), 0 12px 32px rgba(11, 37, 69, 0.07);
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

/* --- Tipografía ---------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 2.95rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--cyan-text);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.lead {
  font-size: clamp(1.06rem, 1.6vw, 1.22rem);
  color: var(--slate);
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.9rem;
}

/* --- Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section--light {
  background: var(--light);
}

.section--navy {
  background: var(--navy);
  color: var(--light);
}

.section--navy h1,
.section--navy h2,
.section--navy h3 {
  color: var(--white);
}

.section--navy .lead,
.section--navy p {
  color: rgba(245, 247, 250, 0.82);
}

.section-head {
  max-width: 68ch;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.divider {
  width: 56px;
  height: 3px;
  background: var(--cyan);
  border: 0;
  margin: 0 0 1.4rem;
  border-radius: 2px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.97rem;
  font-weight: 600;
  padding: 0.85em 1.7em;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

/* Cian de marca con texto azul marino: 4,9:1, cumple WCAG AA.
   El mismo cian con texto blanco solo daría 3,1:1. */
.btn--primary {
  background: var(--cyan);
  color: var(--navy);
  font-weight: 700;
}

.btn--primary:hover {
  background: #4bb0e8;
  color: var(--navy);
}

.btn--outline {
  border-color: rgba(245, 247, 250, 0.45);
  color: var(--white);
}

.btn--outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.btn--dark {
  background: var(--navy);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--navy-700);
  color: var(--white);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--slate-300);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

/* Logotipo: icono SVG + wordmark en Montserrat real (no imagen rasterizada) */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.logo:hover {
  text-decoration: none;
}

.logo__icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.logo__text {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy);
  line-height: 1;
}

.logo--negative .logo__text {
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--navy);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--cyan-text);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--cyan-text);
  border-bottom-color: var(--cyan);
}

.nav .btn {
  padding: 0.6em 1.2em;
  font-size: 0.9rem;
  border-bottom: 0;
}

.nav .btn--primary:hover {
  color: var(--navy);
  border-bottom: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2545 0%, #123258 55%, #0b2545 100%);
  color: var(--light);
  padding: clamp(72px, 11vw, 132px) 0;
}

.hero::after {
  /* Motivo de nodos de red: refuerza el concepto del logotipo */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 1px 1px,
      rgba(27, 152, 224, 0.5) 1px,
      transparent 0
    );
  background-size: 34px 34px;
  opacity: 0.32;
  mask-image: radial-gradient(ellipse at 78% 22%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 78% 22%, #000 0%, transparent 68%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.hero h1 {
  color: var(--white);
}

.hero .lead {
  color: rgba(245, 247, 250, 0.86);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Hero compacto para páginas internas */
.page-hero {
  background: var(--navy);
  color: var(--light);
  padding: clamp(56px, 8vw, 88px) 0 clamp(48px, 7vw, 72px);
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5em;
}

.page-hero .lead {
  color: rgba(245, 247, 250, 0.82);
  margin-bottom: 0;
}

/* --- Rejillas y tarjetas ------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition),
    border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: rgba(27, 152, 224, 0.4);
}

.card__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  color: var(--cyan);
}

.card h3 {
  margin-bottom: 0.5em;
}

.card p {
  color: var(--slate);
  font-size: 0.98rem;
  margin-bottom: 0;
}

/* Bloques de servicio alternos */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: 1px solid var(--slate-300);
}

.service:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.service__num {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan-text);
  margin-bottom: 0.7rem;
}

.service ul {
  margin: 1.2em 0 0;
  padding: 0;
  list-style: none;
}

.service li {
  position: relative;
  padding-left: 1.7em;
  margin-bottom: 0.6em;
  color: var(--slate);
  font-size: 0.98rem;
}

.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

/* --- Cierre / CTA -------------------------------------------------------- */

.cta {
  background: var(--navy);
  color: var(--light);
  text-align: center;
  padding: clamp(56px, 8vw, 88px) 0;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 1.6rem;
}

/* --- Contacto ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--navy);
}

.form-field .req {
  color: var(--cyan-text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  padding: 13px 15px;
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(27, 152, 224, 0.18);
}

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

.form-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.55;
}

.form-consent input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--cyan);
}

.info-panel {
  background: var(--light);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.info-panel h3 {
  margin-bottom: 1.1rem;
}

.info-list {
  margin: 0;
  font-size: 0.97rem;
}

.info-list dt {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 3px;
}

.info-list dd {
  margin: 0 0 18px;
  color: var(--navy);
}

.info-list dd:last-child {
  margin-bottom: 0;
}

/* --- Contenido legal ----------------------------------------------------- */

.prose {
  max-width: 74ch;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.4em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.3em;
  color: var(--slate);
}

.prose li {
  margin-bottom: 0.5em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.94rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-300);
  vertical-align: top;
}

.prose th {
  font-family: var(--font-head);
  font-size: 0.85rem;
  background: var(--light);
}

.legal-data {
  background: var(--light);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  font-size: 0.96rem;
  line-height: 1.8;
}

.legal-data strong {
  font-family: var(--font-head);
}

/* --- Pie de página ------------------------------------------------------- */

.site-footer {
  background: var(--navy);
  color: rgba(245, 247, 250, 0.75);
  padding: clamp(48px, 6vw, 66px) 0 30px;
  font-size: 0.94rem;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(245, 247, 250, 0.16);
}

.site-footer .logo {
  margin-bottom: 18px;
}

.site-footer h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer a {
  color: rgba(245, 247, 250, 0.75);
}

.site-footer a:hover {
  color: var(--cyan);
  text-decoration: none;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.site-footer__legal {
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(245, 247, 250, 0.6);
}

.site-footer__legal p {
  margin: 0;
}

/* --- Accesibilidad ------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--cyan);
  color: var(--white);
  padding: 12px 20px;
  font-family: var(--font-head);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

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

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

@media (max-width: 860px) {
  .service,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--slate-300);
    box-shadow: var(--shadow);
    padding: 8px var(--gutter) 22px;
    display: none;
  }

  .nav[data-open="true"] {
    display: flex;
  }

  .nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--light);
  }

  .nav a[aria-current="page"] {
    border-bottom-color: var(--light);
  }

  .nav .btn {
    margin-top: 16px;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
