:root {
  /* Blanco de cal y de PVC, el azul de las publicaciones y el verde del logotipo */
  --cal: #f2f4f6;
  --pvc: #ffffff;
  --azul: #1428a0;
  --azul-hondo: #0b1660;
  --tinta: #1b2033;
  --gris: #5a6072;
  --junta: #c9ced8;
  --verde: #4cb82e;
  --verde-claro: #62d63f;
  --max: 1160px;
  --measure: 62ch;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--cal);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--azul); text-underline-offset: 3px; }
p { margin: 0 0 1em; }

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

/* Escala tipográfica clásica: 18 / 21 / 24 / 36 / 48 / portada aparte */
h1, h2, h3 { margin: 0; font-family: var(--display); font-optical-sizing: auto; }
h2 {
  font-weight: 800;
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  line-height: 1;
  color: var(--azul-hondo);
  margin-bottom: .75em;
}
h3 { font-weight: 700; font-size: 1.5rem; line-height: 1.15; color: var(--azul-hondo); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Botones */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  padding: .85em 1.35em;
  border: 2px solid var(--azul);
  border-radius: 2px;
  background: var(--azul);
  color: var(--pvc);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--azul-hondo); border-color: var(--azul-hondo); }
.btn--line { background: transparent; color: var(--azul); }
.btn--line:hover { background: var(--azul); border-color: var(--azul); color: var(--pvc); }
.btn--green { background: var(--verde); border-color: var(--verde); color: var(--azul-hondo); }
.btn--green:hover { background: var(--verde-claro); border-color: var(--verde-claro); }
.btn--small { font-size: .95rem; padding: .55em 1em; }

/* Cabecera */
.header { position: sticky; top: 0; z-index: 30; background: var(--azul-hondo); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: inline-flex; flex-direction: column; align-items: center; color: var(--verde); font-family: var(--serif); line-height: 1; text-decoration: none; }
.logo__lhe { font-size: 1.45rem; letter-spacing: .3em; margin-right: -.3em; padding: 0 .4em 4px; border-bottom: 1.5px solid var(--verde); }
.logo__sub { font-size: .56rem; letter-spacing: .6em; margin-right: -.6em; padding-top: 5px; }

.nav { display: flex; align-items: center; gap: 2em; }
.nav a { color: #dfe4ff; font-size: 1rem; text-decoration: none; }
.nav a:not(.btn):hover { color: var(--pvc); text-decoration: underline; text-decoration-color: var(--verde); }

.nav-toggle { display: none; padding: 8px; border: 0; background: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--pvc); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Portada */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 80px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 96px;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  line-height: .9;
  text-transform: uppercase;
  color: var(--azul);
  max-width: 9ch;
  margin-bottom: .45em;
}
.hero__lead { max-width: 40ch; font-size: 1.3125rem; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

/* Foto de portada enmarcada como una ventana de PVC blanco */
.elev { margin: 0; }
.elev__win {
  padding: 14px;
  background: var(--pvc);
  box-shadow: 0 0 0 1px var(--junta), 0 48px 60px -44px rgba(11, 22, 96, .5);
}
.elev__win img { width: 100%; height: auto; outline: 1px solid var(--junta); }
.elev figcaption { max-width: 34ch; margin-top: 20px; font-size: .875rem; line-height: 1.45; color: var(--gris); }

/* Animación única: la foto de portada aparece al cargar */
@media (prefers-reduced-motion: no-preference) {
  .elev__win { animation: appear .8s .15s both; }
}
@keyframes appear { from { opacity: 0; } }

/* De dónde sale tu ventana: cadena del perfil a la casa */
.chain { padding: 88px 0; background: var(--pvc); border-top: 1px solid var(--junta); }
.chain__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.chain__list li { position: relative; padding: 32px 32px 0 0; border-top: 2px solid var(--azul); }
.chain__list li::before {
  content: "";
  position: absolute; top: -7px; left: 0;
  width: 12px; height: 12px;
  background: var(--azul);
}
.chain__list li:last-child::before { background: var(--verde); }
.chain__list h3 { margin-bottom: .4em; }
.chain__logo { display: block; width: auto; height: 60px; margin-bottom: 24px; }
.chain__logo--lhe { display: inline-flex; justify-content: center; height: 60px; padding: 0 18px; background: var(--azul-hondo); }
.chain__list p { margin: 0; max-width: 36ch; color: var(--gris); }

/* Secciones */
.section { padding: 112px 0; }
.section--pvc { background: var(--pvc); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.prose { max-width: var(--measure); }
.prose__lead { font-size: 1.3125rem; line-height: 1.5; }

.checks { list-style: none; margin: 1.6em 0 0; padding: 0; }
.checks li { position: relative; margin-bottom: .6em; padding-left: 1.9em; }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: .3em;
  width: 1.15em; height: 1.15em;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b1660' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  border-radius: 50%;
}

/* Productos: símbolo de plano + descripción */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 48px; margin: 0; padding: 0; list-style: none; }
.products li { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; align-content: start; }
.products .sym { grid-row: span 2; width: 52px; height: 65px; }
.products h3 { margin-bottom: .3em; }
.products p { margin: 0; color: var(--gris); }

.sym { fill: none; stroke: var(--azul); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; overflow: visible; }
.sym .dash { stroke-dasharray: 4 3; }
.sym .thick { stroke-width: 3; }
.sym .hatch { stroke: var(--junta); }

/* Herrajes Winkhaus: bloque destacado bajo los productos */
.feature {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  margin-top: 72px; padding: 40px;
  background: var(--cal);
  border-left: 6px solid var(--azul);
}
.feature__logo { width: auto; height: 96px; }
.feature h3 { font-size: 2.25rem; line-height: 1; margin-bottom: .35em; }
.feature p { max-width: var(--measure); margin: 0; }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery a { display: block; background: var(--azul); }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery__more { margin-top: 20px; color: var(--gris); }

/* Pasos: secuencia real, por eso va numerada */
.steps__title { margin-top: 112px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 1px solid var(--junta); }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 12px;
  font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1;
  color: var(--azul);
}
.steps h3 { margin-bottom: .35em; }
.steps p { margin: 0; color: var(--gris); }

/* Contacto */
.contact-sec { padding: 112px 0 80px; background: var(--azul); color: var(--pvc); }
.contact-sec h2 { color: var(--pvc); }
.contact-sec a { color: var(--pvc); text-decoration-color: rgba(255, 255, 255, .4); }
.contact-sec a:hover { text-decoration-color: var(--verde); }
.contact-sec .split > div > p { color: rgba(255, 255, 255, .85); }

.contact-sec .phone {
  display: inline-block;
  margin: .1em 0 .5em;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1;
  color: var(--verde-claro);
  text-decoration: none;
}

.contact { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin: 1em 0 0; }
.contact dt { font-weight: 700; color: #c9d3ff; }
.contact dd { margin: 0; }

.form { display: grid; gap: 18px; padding: 36px; color: var(--tinta); background: var(--pvc); border-radius: 2px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input, .form textarea {
  width: 100%;
  padding: .75em .9em;
  font: inherit; font-weight: 400;
  border: 1px solid var(--junta); border-radius: 2px;
  background: var(--cal);
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--verde); outline-offset: 0; border-color: var(--azul); background: var(--pvc); }
.form .btn { justify-self: start; }
.form__note { margin: 0; font-size: .875rem; color: var(--gris); }

.map { display: block; width: 100%; height: 320px; margin-top: 72px; border: 0; background: var(--cal); }

/* Chincheta del mapa: etiqueta con la punta sobre la dirección */
.pin { padding-bottom: 8px; }
.pin span {
  position: relative;
  display: block;
  padding: 8px 14px;
  font: 700 1rem/1 var(--body);
  white-space: nowrap;
  color: var(--pvc);
  background: var(--azul);
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(11, 22, 96, .3);
}
.pin span::after {
  content: "";
  position: absolute; left: 50%; top: 100%;
  border: 8px solid transparent; border-top-color: var(--azul);
  transform: translateX(-50%);
}

/* Pie */
.footer { padding: 36px 0; background: var(--azul-hondo); color: rgba(255, 255, 255, .75); font-size: .875rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.footer p { margin: 0; }
.footer .footer__small { margin-top: 6px; font-size: .8rem; opacity: .75; }
.footer .logo__lhe { font-size: 1.15rem; }

/* Barra de llamada, solo en móvil */
.callbar { display: none; }

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

/* Tablet */
@media (max-width: 1000px) {
  .hero__inner { gap: 48px; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .chain__list { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .gallery, .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Móvil */
@media (max-width: 760px) {
  body { font-size: 17px; padding-bottom: 60px; }
  .container { padding: 0 16px; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--azul-hondo);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .nav .btn--small { margin: 12px 16px; text-align: center; }

  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 64px; }
  .hero h1 { max-width: none; }
  .hero__actions .btn { flex: 1 1 100%; text-align: center; }
  .elev { max-width: 360px; }

  .chain { padding: 64px 0; }
  .chain__list { grid-template-columns: 1fr; gap: 0; }
  .chain__list li { padding: 0 0 32px 28px; border-top: 0; border-left: 2px solid var(--azul); }
  .chain__list li:last-child { padding-bottom: 0; border-left-color: transparent; }
  .chain__list li::before { top: 0; left: -7px; }

  .section { padding: 72px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .products { grid-template-columns: 1fr; gap: 36px; }
  .gallery { gap: 8px; }
  .feature { grid-template-columns: 1fr; gap: 20px; margin-top: 56px; padding: 28px 20px; }
  .feature__logo { height: 72px; }
  .steps__title { margin-top: 72px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }

  .contact-sec { padding: 72px 0 56px; }
  .form { padding: 22px 18px; }
  .form .btn { justify-self: stretch; text-align: center; }
  .map { height: 260px; margin-top: 48px; }

  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1fr;
    box-shadow: 0 -6px 18px rgba(11, 22, 96, .18);
  }
  .callbar a {
    display: grid; place-items: center;
    height: 60px;
    font-weight: 700; font-size: 1.05rem;
    text-decoration: none;
    color: var(--pvc); background: var(--azul);
  }
  .callbar a + a { color: var(--azul-hondo); background: var(--verde); }
}

/* Créditos del mapa: el enlace blanco de la sección no se leería sobre su fondo claro */
.contact-sec .maplibregl-ctrl-attrib a { color: var(--tinta); }
