/* ==========================================================================
   CHIMETAL — Hoja de estilos
   Industrial · sobria · moderna
   ========================================================================== */

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

:root {
  /* Marca */
  --rojo:        #C42B2E;
  --rojo-osc:    #A01F24;
  --rojo-suave:  #FBEDED;

  /* Acero / grafito */
  --acero-950:   #101317;
  --acero-900:   #161A1F;
  --acero-800:   #1F252C;
  --acero-700:   #2C343D;
  --acero-500:   #5B6570;
  --acero-300:   #A3ACB5;

  /* Neutros */
  --blanco:      #FFFFFF;
  --gris-50:     #F6F7F8;
  --gris-100:    #EEF0F2;
  --linea:       #DFE3E7;
  --texto:       #262B31;
  --texto-2:     #59616A;

  --f-titulo: 'Montserrat', system-ui, sans-serif;
  --f-texto:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ancho: 1200px;
  --radio: 4px;
  --sombra-1: 0 1px 2px rgba(16,19,23,.06), 0 2px 8px rgba(16,19,23,.05);
  --sombra-2: 0 10px 30px rgba(16,19,23,.10);
  --ease: cubic-bezier(.22,1,.36,1);
  --header-h: 76px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--f-texto);
  font-size: 15px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
strong { font-weight: 600; color: var(--acero-900); }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--rojo); color: #fff; padding: 10px 16px; border-radius: var(--radio);
  font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--ancho); margin: 0 auto; padding: 0 32px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ── TIPOGRAFÍA ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-titulo); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--rojo);
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--rojo); }

.h-section {
  font-family: var(--f-titulo); font-weight: 700;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.15;
  letter-spacing: -.01em; color: var(--acero-900);
}
.h-section em { font-style: normal; color: var(--rojo); }
.lead { font-size: 17px; line-height: 1.7; color: var(--texto-2); }

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-titulo); font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 14px 26px; border-radius: var(--radio); border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
  white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--rojo); color: #fff; }
.btn-primary:hover { background: var(--rojo-osc); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--linea); color: var(--acero-900); background: #fff; }
.btn-outline:hover { border-color: var(--acero-900); }
.btn-sm { padding: 10px 16px; font-size: 12px; }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-titulo); font-size: 13px; font-weight: 700;
  letter-spacing: .04em; color: var(--rojo);
}
.link-arrow .ico { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }

/* ==========================================================================
   CABECERA
   ========================================================================== */
.topbar { background: var(--acero-950); color: var(--acero-300); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 24px; }
.topbar-info { display: flex; gap: 24px; align-items: center; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; }
.topbar .ico { width: 14px; height: 14px; color: var(--rojo); }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--linea);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(16,19,23,.08); }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); gap: 24px; }
.site-header .logo { justify-self: start; }
.site-header nav { justify-self: center; }
.logo { flex-shrink: 0; }
.logo img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav > li { position: relative; }
.nav > li > a, .nav > li > button {
  display: flex; align-items: center; gap: 6px; height: var(--header-h);
  padding: 0 14px; background: none; border: 0;
  font-family: var(--f-titulo); font-size: 13px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--acero-900);
  position: relative; transition: color .15s; white-space: nowrap;
}
.nav > li > a::after, .nav > li > button::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: var(--rojo); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav > li:hover > a, .nav > li:hover > button,
.nav > li.is-active > a, .nav > li.is-active > button { color: var(--rojo); }
.nav > li:hover > a::after, .nav > li:hover > button::after,
.nav > li.is-active > a::after, .nav > li.is-active > button::after { transform: scaleX(1); }
.nav .chev { width: 14px; height: 14px; opacity: .6; transition: transform .2s; }
.nav > li:hover .chev { transform: rotate(180deg); }
.nav-cta { margin-left: 12px; }
/* Zona derecha de la cabecera: presupuesto + acceso clientes (icono redondo con aviso) */
.hdr-acciones { justify-self: end; display: flex; align-items: center; gap: 10px; }
.hdr-cta { padding: 11px 18px; letter-spacing: .06em; }
.hdr-cta:hover { background: var(--rojo-osc); }
.hdr-clientes {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1.5px solid var(--linea); border-radius: 50%;
  background: #fff; color: var(--acero-900); transition: border-color .2s, background .2s, color .2s;
}
.hdr-clientes .ico { width: 20px; height: 20px; }
.hdr-clientes:hover, .hdr-clientes:focus-visible { border-color: var(--rojo); background: var(--rojo); color: #fff; }
.nav-tip {
  position: absolute; top: calc(100% + 12px); right: -4px; z-index: 10;
  padding: 7px 12px; border-radius: var(--radio); background: var(--acero-900); color: #fff;
  font: 600 12px/1 var(--f-texto); white-space: nowrap;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.nav-tip::before { content: ''; position: absolute; bottom: 100%; right: 20px; border: 6px solid transparent; border-bottom-color: var(--acero-900); }
.hdr-clientes:hover .nav-tip, .hdr-clientes:focus-visible .nav-tip { opacity: 1; visibility: visible; transform: none; }
.mnav > a.btn { justify-content: center; padding: 15px 20px; border-bottom: 1.5px solid transparent; }
.mnav > a.btn-outline { border-color: var(--linea); }
.mnav > a.btn-primary { color: #fff; }
.mnav > a.btn-primary:hover { color: #fff; }
.mnav .btn.mnav-clientes { margin-top: 10px; gap: 8px; }
.mnav .mnav-clientes .ico { width: 18px; height: 18px; color: var(--rojo); }
.nav > li.nav-cta > a { height: auto; padding: 11px 18px; color: #fff; background: var(--rojo); letter-spacing: .06em; font-weight: 700; }
.nav > li.nav-cta > a::after { display: none; }
.nav > li.nav-cta:hover > a { color: #fff; background: var(--rojo-osc); }

.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--linea); border-top: 2px solid var(--rojo);
  box-shadow: var(--sombra-2); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
/* Abierto al pasar el ratón, o con el teclado (:focus-visible). No con :focus-within: tras pulsar
   un enlace con el ratón y volver atrás, el foco seguía dentro y el submenú quedaba abierto. */
.nav > li:hover .dropdown, .nav > li:has(:focus-visible) .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav > li.is-cerrado .dropdown { opacity: 0; visibility: hidden; transform: translateY(6px); }
/* Al cargar o volver atrás, Chrome da por «encima» el elemento donde estaba el ratón aunque ya no
   esté: hasta que el ratón se mueva de verdad (main.js quita .sin-hover), el hover no abre submenús. */
.nav.sin-hover > li:hover:not(:has(:focus-visible)) .dropdown { opacity: 0; visibility: hidden; transform: translateY(6px); }
.dropdown--2col { display: grid; grid-template-columns: 1fr 1fr; min-width: 480px; }
.dropdown a {
  display: block; padding: 9px 12px; border-radius: 3px;
  font-size: 14px; font-weight: 500; color: var(--texto);
  transition: background .15s, color .15s;
}
.dropdown a:hover { background: var(--gris-50); color: var(--rojo); }
.dropdown a small { display: block; font-size: 12px; color: var(--texto-2); font-weight: 400; }

.nav-toggle { display: none; background: none; border: 1px solid var(--linea); border-radius: var(--radio); width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--acero-900); }
.nav-toggle .ico { width: 22px; height: 22px; }

/* Menú móvil */
.mnav {
  display: none; position: fixed; inset: calc(var(--header-h)) 0 0 0; z-index: 199;
  background: #fff; overflow-y: auto; padding: 8px 20px 32px;
  border-top: 1px solid var(--linea);
}
.mnav.is-open { display: block; }
.mnav > a, .mnav summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--linea);
  font-family: var(--f-titulo); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
  list-style: none; cursor: pointer; color: var(--acero-900);
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav details[open] summary .ico { transform: rotate(180deg); }
.mnav details div { display: grid; padding: 6px 0 10px 12px; border-bottom: 1px solid var(--linea); }
.mnav details div a { padding: 9px 0; font-size: 15px; color: var(--texto-2); }
.mnav .btn { margin-top: 24px; width: 100%; }
.mnav-contact { margin-top: 20px; font-size: 14px; color: var(--texto-2); display: grid; gap: 8px; }
.mnav-contact a { display: flex; gap: 10px; align-items: center; }
body.nav-open { overflow: hidden; }

/* ==========================================================================
   HERO PORTADA
   ========================================================================== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--acero-900) url('hero-bg.jpg') center 35% / cover no-repeat;
  padding: 120px 0 170px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(16,19,23,.94) 0%, rgba(16,19,23,.82) 42%, rgba(16,19,23,.35) 100%),
    linear-gradient(0deg, rgba(16,19,23,.55) 0%, rgba(16,19,23,0) 40%);
}
.hero .wrap { position: relative; }
.hero-content { max-width: 760px; }
.hero h1 {
  font-family: var(--f-titulo); font-weight: 800;
  font-size: clamp(34px, 5vw, 60px); line-height: 1.05;
  letter-spacing: -.015em; text-transform: uppercase; margin-bottom: 24px;
}
.hero h1 span { color: var(--rojo); display: block; }
.hero p { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.82); max-width: 560px; margin-bottom: 36px; }
.hero .eyebrow, .page-hero .eyebrow { font-size: 12px; color: #fff; max-width: none; margin-bottom: 18px; line-height: 1.5; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.stats { position: relative; z-index: 2; margin-top: -92px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; box-shadow: var(--sombra-2); border-top: 3px solid var(--rojo);
}
.stat { padding: 30px 28px; border-right: 1px solid var(--linea); }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--f-titulo); font-weight: 800; font-size: 34px; line-height: 1; color: var(--acero-900); letter-spacing: -.02em; }
.stat-num small { font-size: 18px; font-weight: 700; color: var(--rojo); margin-left: 2px; }
.stat-txt { margin-top: 10px; font-size: 14px; color: var(--texto-2); line-height: 1.45; }

/* ==========================================================================
   SECCIONES
   ========================================================================== */
.section { padding: 104px 0; }
.section--gris { background: var(--gris-50); }
.section--dark { background: var(--acero-900); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 52px; flex-wrap: wrap; }
.section-head .lead { max-width: 520px; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
.about-text .h-section { margin-bottom: 24px; }
.about-text p { color: var(--texto-2); margin-bottom: 16px; font-size: 16px; }
.about-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--linea); }
.feat { display: flex; gap: 14px; }
.feat-ico { width: 42px; height: 42px; border-radius: var(--radio); background: var(--rojo-suave); color: var(--rojo); display: grid; place-items: center; flex-shrink: 0; }
.feat-ico .ico { width: 20px; height: 20px; }
.feat h3 { font-family: var(--f-titulo); font-size: 14px; font-weight: 700; color: var(--acero-900); margin-bottom: 4px; }
.feat p { font-size: 14px; color: var(--texto-2); line-height: 1.55; margin: 0; }

.about-media { position: relative; padding: 0 0 32px 32px; }
.about-media::before { content: ''; position: absolute; left: 0; bottom: 0; width: 62%; height: 72%; background: var(--rojo); }
.about-media img { position: relative; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-badge {
  position: absolute; right: -16px; top: 40px; background: var(--acero-900); color: #fff;
  padding: 22px 26px; box-shadow: var(--sombra-2);
}
.about-badge strong { display: block; font-family: var(--f-titulo); font-size: 40px; font-weight: 800; line-height: 1; color: #fff; }
.about-badge span { font-size: 13px; color: var(--acero-300); text-transform: uppercase; letter-spacing: .1em; }

/* Productos */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prod-card {
  background: #fff; border: 1px solid var(--linea);
  display: flex; flex-direction: column; position: relative;
  transition: box-shadow .3s, transform .3s var(--ease), border-color .3s;
}
.prod-card::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 3px;
  background: var(--rojo); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.prod-card:hover { box-shadow: var(--sombra-2); transform: translateY(-4px); border-color: transparent; }
.prod-card:hover::before { transform: scaleX(1); }
.prod-img {
  height: 200px; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(160deg, #fff 0%, var(--gris-100) 100%);
  border-bottom: 1px solid var(--linea); overflow: hidden;
}
.prod-img img { max-height: 100%; width: auto; object-fit: contain; transition: transform .4s var(--ease); mix-blend-mode: multiply; }
.prod-img--foto { padding: 0; }
.prod-img--foto img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.prod-tag { font-family: var(--f-titulo); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--rojo); margin-bottom: 8px; }
.prod-name { font-family: var(--f-titulo); font-size: 20px; font-weight: 700; color: var(--acero-900); margin-bottom: 10px; }
.prod-desc { font-size: 14px; color: var(--texto-2); line-height: 1.6; margin-bottom: 18px; flex: 1; }
.prod-specs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--acero-700); background: var(--gris-100); padding: 5px 10px; border-radius: 3px; }
.chip .ico { width: 13px; height: 13px; color: var(--rojo); }
.prod-links { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--linea); }
.prod-links .tarifa { font-size: 13px; color: var(--texto-2); display: inline-flex; gap: 6px; align-items: center; }
.prod-links .tarifa:hover { color: var(--acero-900); }
.prod-links .tarifa .ico { width: 15px; height: 15px; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(255,255,255,.12); }
.step { padding: 36px 32px 8px 0; position: relative; }
.step + .step { padding-left: 32px; border-left: 1px solid rgba(255,255,255,.12); }
.step-num { font-family: var(--f-titulo); font-weight: 800; font-size: 14px; color: var(--rojo); letter-spacing: .1em; margin-bottom: 18px; }
.step h3 { font-family: var(--f-titulo); font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--acero-300); line-height: 1.65; }
.section--dark .h-section { color: #fff; }
.section--dark .lead { color: var(--acero-300); }

/* Aplicaciones */
.apps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.app-card { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--acero-800); display: block; }
.app-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.app-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,19,23,0) 35%, rgba(16,19,23,.88) 100%); transition: background .3s; }
.app-card:hover img { transform: scale(1.06); }
.app-card:hover::after { background: linear-gradient(180deg, rgba(16,19,23,.1) 0%, rgba(16,19,23,.92) 100%); }
.app-card-label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 20px;
  color: #fff; font-family: var(--f-titulo); font-weight: 700; font-size: 15px; line-height: 1.3;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.app-card-label .ico { width: 18px; height: 18px; color: var(--rojo); opacity: 0; transform: translateX(-6px); transition: .3s var(--ease); }
.app-card:hover .app-card-label .ico { opacity: 1; transform: none; }
.app-card-label::before { content: ''; position: absolute; left: 20px; top: 0; width: 24px; height: 2px; background: var(--rojo); }

.app-more {
  grid-column: span 3; background: var(--acero-900); color: #fff; padding: 32px 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  border-left: 3px solid var(--rojo);
}
.app-more h3 { font-family: var(--f-titulo); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.app-more p { color: var(--acero-300); font-size: 15px; max-width: 520px; }

/* Banda CTA */
.cta-band { background: var(--rojo); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.cta-band::after {
  content: ''; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px;
  border: 60px solid rgba(255,255,255,.06); border-radius: 50%;
}
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band h2 { font-family: var(--f-titulo); font-weight: 700; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 16px; }
.cta-band-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-white { background: #fff; color: var(--rojo); }
.btn-white:hover { background: var(--acero-900); color: #fff; }
.cta-tel { display: inline-flex; gap: 12px; align-items: center; color: #fff; font-family: var(--f-titulo); font-weight: 700; font-size: 22px; padding: 0 8px; }
.cta-tel .ico { width: 22px; height: 22px; }

/* Contacto (portada) */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: stretch; }
.contact-list { display: grid; gap: 4px; margin: 32px 0 36px; }
.contact-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--linea); }
.contact-row:first-child { border-top: 1px solid var(--linea); }
.contact-ico { width: 44px; height: 44px; background: var(--acero-900); color: #fff; display: grid; place-items: center; flex-shrink: 0; border-radius: var(--radio); }
.contact-ico .ico { width: 20px; height: 20px; }
.contact-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); margin-bottom: 2px; }
.contact-val { font-size: 16px; color: var(--acero-900); font-weight: 500; line-height: 1.5; }
.contact-val a:hover { color: var(--rojo); }
.contact-val--big { font-family: var(--f-titulo); font-size: 22px; font-weight: 700; }
.map { min-height: 420px; background: var(--gris-100); border: 1px solid var(--linea); }
.map iframe { width: 100%; height: 100%; min-height: inherit; border: 0; display: block; filter: grayscale(.35) contrast(1.05); }
/* Mapa bajo demanda: hasta que se pulsa no se conecta con Google */
.map-consent {
  display: grid; place-items: center; text-align: center; padding: 32px 24px;
  background:
    linear-gradient(rgba(246,247,248,.92), rgba(246,247,248,.92)),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--linea) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--linea) 39px 40px);
}
.map-consent-inner { max-width: 380px; }
.map-consent-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--rojo); color: #fff; display: inline-grid; place-items: center; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(196,43,46,.3); }
.map-consent-ico .ico { width: 24px; height: 24px; }
.map-consent-dir { font-size: 15px; line-height: 1.55; color: var(--texto-2); margin-bottom: 18px; }
.map-consent-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.map-consent-note { font-size: 12.5px; color: var(--texto-2); line-height: 1.5; }
.map-consent-note a { color: var(--rojo); text-decoration: underline; }

/* ==========================================================================
   PIE
   ========================================================================== */
.footer { background: var(--acero-950); color: var(--acero-300); font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.1fr; gap: 48px; padding-top: 72px; padding-bottom: 56px; }
.footer-logo { display: inline-block; background: #fff; padding: 10px 14px; border-radius: var(--radio); margin-bottom: 20px; }
.footer-logo img { height: 44px; }
.footer p { line-height: 1.7; }
.footer h4 { font-family: var(--f-titulo); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a:hover { color: #fff; }
.footer-apps ul { grid-template-columns: 1fr; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ico { width: 16px; height: 16px; color: var(--rojo); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; font-size: 13px; }
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal a:hover { color: #fff; }

/* Barra de administración de WordPress (solo administradores con sesión iniciada) */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* Página 404 */
.err-hero { position: relative; overflow: hidden; color: #fff; padding: 88px 0 96px;
  background: var(--acero-900) url('hero-bg.jpg') center 40% / cover no-repeat; }
.err-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,19,23,.96) 0%, rgba(16,19,23,.86) 55%, rgba(16,19,23,.6) 100%); }
.err-hero .wrap { position: relative; }
.err-code { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); font-family: var(--f-titulo); font-weight: 800;
  font-size: clamp(120px, 22vw, 300px); line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.14); pointer-events: none; }
.err-hero h1 { font-family: var(--f-titulo); font-weight: 800; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; margin-bottom: 14px; }
.err-hero p:not(.eyebrow):not(.err-code) { color: rgba(255,255,255,.8); max-width: 560px; font-size: 17px; margin-bottom: 30px; }
.err-hero .eyebrow { font-size: 12px; color: #fff; margin-bottom: 18px; }
@media (max-width: 640px) { .err-hero { padding: 56px 0 64px; } .err-code { right: 8px; top: 24px; transform: none; font-size: 110px; } }

/* ==========================================================================
   PÁGINAS INTERIORES
   ========================================================================== */
.page-hero {
  position: relative; color: #fff;
  background: var(--acero-900) url('hero-bg.jpg') center 40% / cover no-repeat;
  padding: 36px 0 64px;
}
.page-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,19,23,.95) 0%, rgba(16,19,23,.85) 55%, rgba(16,19,23,.6) 100%); }
.page-hero .wrap { position: relative; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--acero-300); margin-bottom: 48px; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-current] { color: #fff; }
.page-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.page-hero h1 { font-family: var(--f-titulo); font-weight: 800; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -.01em; margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,.8); max-width: 620px; font-size: 17px; }
.page-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.keyspecs { background: #fff; border-bottom: 1px solid var(--linea); }
.keyspecs-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.keyspec { padding: 26px 24px; border-right: 1px solid var(--linea); display: flex; gap: 14px; align-items: flex-start; }
.keyspec:first-child { padding-left: 0; }
.keyspec:last-child { border-right: 0; }
.keyspec .ico { width: 22px; height: 22px; color: var(--rojo); margin-top: 2px; }
.keyspec-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--texto-2); font-weight: 600; }
.keyspec-val { font-family: var(--f-titulo); font-size: 18px; font-weight: 700; color: var(--acero-900); line-height: 1.3; margin-top: 2px; }

.page-layout--contact { grid-template-columns: minmax(0,1fr) minmax(0,1.35fr) !important; }
.page-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 64px; padding-top: 72px; padding-bottom: 104px; }
.block + .block { margin-top: 56px; }
.block-title {
  font-family: var(--f-titulo); font-size: 20px; font-weight: 700; color: var(--acero-900);
  padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--linea); position: relative;
}
.block-title::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--rojo); }
.prose p { color: var(--texto-2); font-size: 16px; line-height: 1.8; margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--acero-900); }
.prose ul { margin: 0 0 16px 0; list-style: none; display: grid; gap: 8px; }
.prose ul li { padding-left: 22px; position: relative; color: var(--texto-2); }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 11px; width: 10px; height: 2px; background: var(--rojo); }

/* Páginas legales (textos de _src/legal/) */
.legal { max-width: 780px; }
.legal h2 { font-family: var(--f-titulo); font-size: 22px; font-weight: 700; color: var(--acero-900); line-height: 1.3; margin: 44px 0 16px; padding-top: 28px; border-top: 1px solid var(--linea); }
.legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-family: var(--f-titulo); font-size: 17px; font-weight: 700; color: var(--acero-900); margin: 28px 0 12px; }
.legal ol { margin: 0 0 20px 22px; color: var(--texto-2); display: grid; gap: 6px; }
.legal ol li { padding-left: 4px; }
.legal ol li::marker { color: var(--rojo); font-weight: 700; }
.legal ul + ol { margin-top: -6px; }
.legal li { line-height: 1.7; }
.legal a { color: var(--rojo); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal a:hover { color: var(--rojo-osc); }
.note { margin-top: 20px; background: var(--gris-50); border-left: 3px solid var(--rojo); padding: 16px 20px; font-size: 15px; color: var(--texto-2); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; border: 1px solid var(--linea); }
.spec-table th, .spec-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.spec-table th { width: 38%; font-weight: 600; color: var(--acero-900); background: var(--gris-50); }
.spec-table td { color: var(--texto-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 13px; background: var(--gris-100); padding: 2px 6px; border-radius: 3px; color: var(--acero-900); display: inline-block; margin: 2px 0; }

.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc {
  display: flex; gap: 14px; align-items: center; padding: 18px 20px;
  border: 1px solid var(--linea); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.doc:hover { border-color: var(--rojo); box-shadow: var(--sombra-1); }
.doc-ico { width: 44px; height: 44px; background: var(--rojo-suave); color: var(--rojo); display: grid; place-items: center; flex-shrink: 0; border-radius: var(--radio); }
.doc-ico .ico { width: 22px; height: 22px; }
.doc-title { font-weight: 600; color: var(--acero-900); font-size: 15px; line-height: 1.35; }
.doc-meta { font-size: 13px; color: var(--texto-2); }
.doc > .ico { margin-left: auto; color: var(--acero-300); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; border: 1px solid var(--linea); background: linear-gradient(160deg, #fff, var(--gris-100)); overflow: hidden; transition: border-color .2s; }
.gallery a:hover { border-color: var(--rojo); }
.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: 14px; mix-blend-mode: multiply; transition: transform .35s var(--ease); }
.gallery a:hover img { transform: scale(1.06); }
.gallery figcaption { font-size: 12px; font-weight: 600; color: var(--acero-700); padding: 9px 10px; border-top: 1px solid var(--linea); background: #fff; text-align: center; }
/* Galería de obras: mosaico sin huecos. Cada celda tiene proporción fija y la foto la rellena (object-fit: cover). */
.gallery--fotos { grid-template-columns: repeat(3, 1fr); }
.gallery--fotos a { position: relative; aspect-ratio: 4/3; background: var(--gris-100); }
.gallery--fotos img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; padding: 0; mix-blend-mode: normal; }
/* La primera, grande (2×2): sin proporción propia, toma la altura de las dos pequeñas de su lado */
.gallery--fotos a:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
/* 1 foto: panorámica */
.gallery--fotos.gallery--n1 { grid-template-columns: 1fr; }
.gallery--fotos.gallery--n1 a:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 16/9; }
/* 2 fotos: dos iguales */
.gallery--fotos.gallery--n2 { grid-template-columns: 1fr 1fr; }
.gallery--fotos.gallery--n2 a:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; }
/* 4 fotos: grande a todo el ancho y tres debajo */
.gallery--fotos.gallery--n4 a:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16/9; }
/* 5 fotos: grande 2×2 y cuatro pequeñas en 2×2 */
.gallery--fotos.gallery--n5 { grid-template-columns: repeat(4, 1fr); }

.related { display: flex; gap: 10px; flex-wrap: wrap; }
.related a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--linea); font-weight: 600; font-size: 14px; color: var(--acero-900); transition: .2s; }
.related a:hover { border-color: var(--rojo); color: var(--rojo); }
.related .ico { width: 15px; height: 15px; }

/* Barra lateral */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.side-box { border: 1px solid var(--linea); background: #fff; }
.side-title { font-family: var(--f-titulo); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 16px 20px; border-bottom: 1px solid var(--linea); color: var(--acero-900); }
.side-nav { display: grid; padding: 8px; }
.side-nav a { padding: 9px 12px; font-size: 14px; color: var(--texto-2); display: flex; justify-content: space-between; align-items: center; border-radius: 3px; transition: .15s; }
.side-nav a:hover { background: var(--gris-50); color: var(--acero-900); }
.side-nav a[aria-current] { background: var(--acero-900); color: #fff; font-weight: 600; }
.side-nav .ico { width: 14px; height: 14px; opacity: .5; }
.side-cta { background: var(--acero-900); color: #fff; padding: 28px 24px; }
.side-cta h3 { font-family: var(--f-titulo); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.side-cta p { font-size: 14px; color: var(--acero-300); margin-bottom: 20px; }
.side-cta .tel { display: flex; align-items: center; gap: 10px; font-family: var(--f-titulo); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 18px; }
.side-cta .tel .ico { color: var(--rojo); width: 20px; height: 20px; }

/* Formulario */
.form-card { background: #fff; border: 1px solid var(--linea); border-top: 3px solid var(--rojo); padding: 40px; box-shadow: var(--sombra-1); }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--acero-900); }
.field label span { color: var(--rojo); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--texto);
  width: 100%; min-width: 0;
  padding: 12px 14px; border: 1px solid var(--linea); border-radius: var(--radio); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acero-900); box-shadow: 0 0 0 3px rgba(22,26,31,.08); }
.field textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--texto-2); }
.check input { margin-top: 4px; accent-color: var(--rojo); width: 16px; height: 16px; }
.check a { color: var(--rojo); text-decoration: underline; }
.form-help { font-size: 13px; color: var(--texto-2); margin-top: 6px; }
.form-ok { display: none; margin-top: 16px; padding: 14px 16px; background: #EEF7F0; border-left: 3px solid #2E7D4F; font-size: 14px; color: #1F4D33; }
.form-ok.is-visible { display: block; }
.form-ok a { color: inherit; font-weight: 600; }
.form-err { display: none; margin-top: 16px; padding: 14px 16px; background: var(--rojo-suave); border-left: 3px solid var(--rojo); font-size: 14px; color: var(--rojo-osc); }
.form-err.is-visible { display: block; }
.field .is-invalid { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(196,43,46,.12); }
.btn[disabled] { opacity: .7; cursor: progress; }
/* Campo trampa antispam: invisible para las personas */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Primera capa de información RGPD */
.rgpd { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--linea); font-size: 12.5px; color: var(--texto-2); line-height: 1.5; }
.rgpd-title { font-weight: 600; color: var(--acero-900); margin-bottom: 8px; }
.rgpd dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.rgpd dt { font-weight: 600; color: var(--acero-700); }
.rgpd a { color: var(--rojo); text-decoration: underline; }
@media (max-width: 640px) { .rgpd dl { grid-template-columns: 1fr; gap: 0; } .rgpd dd { margin-bottom: 6px; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 90vh; margin: auto; }
.lightbox::backdrop { background: rgba(16,19,23,.88); }
.lightbox img { max-width: 92vw; max-height: 84vh; background: #fff; display: block; }
.lightbox-cap { color: #fff; text-align: center; font-size: 14px; padding-top: 12px; }
.lightbox-close { position: fixed; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--acero-900); display: grid; place-items: center; }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .site-header .wrap { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 1080px) {
  .nav > li > a, .nav > li > button { padding: 0 10px; font-size: 12px; }
  .nav > li > a::after, .nav > li > button::after { left: 10px; right: 10px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hdr-cta { display: none; }
  .nav-tip { display: none; }
  .logo img { height: 44px; }
  .topbar .topbar-tagline { display: none; }
  .topbar .wrap { justify-content: flex-end; }
  .section { padding: 80px 0; }
  .about { grid-template-columns: 1fr; gap: 56px; }
  .about-media { max-width: 520px; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .apps-grid { grid-template-columns: repeat(3, 1fr); }
  .app-more { grid-column: span 2; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .page-layout, .page-layout--contact { grid-template-columns: 1fr !important; gap: 56px; }
  .sidebar { position: static; }
  .keyspecs-grid { grid-template-columns: 1fr 1fr; }
  .keyspec:nth-child(2) { border-right: 0; }
  .keyspec:nth-child(3) { padding-left: 0; }
  .keyspec:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar .topbar-mail { display: none; }
  .topbar .wrap { justify-content: center; }
  .hero { padding: 72px 0 130px; }
  .hero p { font-size: 16px; }
  .hero-btns .btn { width: 100%; }
  .stats { margin-top: -72px; }
  .stat { padding: 22px 18px; }
  .stat-num { font-size: 26px; }
  .section { padding: 64px 0; }
  .about-feats { grid-template-columns: 1fr; }
  .about-media { padding: 0 0 20px 20px; }
  .about-badge { right: 0; top: 20px; padding: 16px 18px; }
  .prod-grid, .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 28px 0 0; border-left: 0; }
  .apps-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .app-card-label { font-size: 13px; padding: 14px; }
  .app-card-label::before { left: 14px; }
  .app-more { grid-column: span 2; padding: 24px 20px; }
  .app-more .btn { width: 100%; }
  .cta-band-actions, .cta-band-actions .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; padding-bottom: 40px; }
  .page-hero { padding: 24px 0 48px; }
  .crumbs { margin-bottom: 32px; }
  .page-hero-btns, .page-hero-btns .btn { width: 100%; }
  .keyspecs-grid { grid-template-columns: 1fr; }
  .keyspec, .keyspec:nth-child(3) { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--linea); }
  .keyspec:last-child { border-bottom: 0; }
  .page-layout { padding-top: 48px; padding-bottom: 72px; }
  .docs { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery--fotos, .gallery--fotos.gallery--n5 { grid-template-columns: 1fr 1fr; }
  .gallery--fotos a:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4/3; }
  .spec-table th, .spec-table td { padding: 12px 14px; display: block; width: 100%; }
  .spec-table th { border-bottom: 0; padding-bottom: 2px; }
  .form-card { padding: 24px 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
