:root {
  --brand: #0a4a8f;
  --brand-dark: #073565;
  --ink: #15191e;
  --muted: #55606c;
  --line: #dfe5ec;
  --soft: #f3f6fa;
  --tint: #e8f0f9;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: var(--brand);
}

:focus-visible {
  outline: 3px solid #7fb2ea;
  outline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 16px;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.narrow {
  max-width: 760px;
}

#quienes-somos p {
  max-width: 680px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  max-width: 680px;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.center {
  text-align: center;
}

.section {
  padding: 80px 0;
}

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

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px 0;
}

.brand img {
  width: auto;
  height: 96px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand);
  border-color: var(--brand);
}

.hero {
  background: linear-gradient(180deg, var(--soft) 0%, var(--white) 100%);
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
}

.hero-art {
  width: 100%;
  max-width: 400px;
  height: auto;
  justify-self: center;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(7, 53, 101, 0.18);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.actions-center {
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid var(--brand);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: var(--white);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(7, 53, 101, 0.06);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--brand);
}

.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.materials {
  background: var(--brand);
  color: var(--white);
  padding: 64px 0;
}

.materials h2 {
  color: var(--white);
}

.materials p {
  color: #e6eef8;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.chips li {
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-weight: 600;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.contact-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-list a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.contact-list li:first-child {
  grid-column: 1 / -1;
}

.map {
  position: relative;
  min-height: 320px;
  margin: 0 0 8px;
}

.map-aviso {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  grid-auto-rows: min-content;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.map-aviso svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.js .map-aviso {
  display: grid;
}

.map-pie {
  margin: 0 0 32px;
  text-align: center;
  font-size: 0.95rem;
}

.map iframe {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.gallery figure {
  margin: 0;
  flex: 0 1 calc((100% - 40px) / 3);
}

@media (max-width: 900px) {
  .gallery figure {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 560px) {
  .gallery figure {
    flex-basis: 100%;
  }
}

.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.gallery figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.celda-visor {
  display: grid;
}

.celda-visor img {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.celda-visor img.is-activo {
  opacity: 1;
}

.celda {
  cursor: pointer;
}

.celda:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 14px;
}

.visor {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  background: rgba(10, 16, 24, 0.92);
  padding: 56px 16px 32px;
}

.visor-cerrar {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 101;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.visor-titulo {
  color: var(--white);
  text-align: center;
  margin: 0 0 20px;
  font-size: 1.3rem;
}

.visor-grilla {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.visor-grilla figure {
  margin: 0;
}

.visor-grilla img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.visor-grilla figcaption {
  margin-top: 8px;
  color: #d6e2f0;
  font-size: 0.95rem;
  text-align: center;
}

body.visor-abierto {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .celda-visor img {
    transition: none;
  }
}

.btn-whatsapp {
  background: #0f7a6e;
  border-color: #0f7a6e;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #0a5f55;
  border-color: #0a5f55;
}

.site-footer {
  background: var(--brand-dark);
  color: #d6e2f0;
  padding: 24px 0;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.site-footer p + p {
  margin-top: 6px;
}

.site-footer a {
  color: var(--white);
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0 8px;
  }

  .brand img {
    height: 58px;
  }

  .site-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px 8px;
    overflow-x: auto;
    font-size: clamp(0.7rem, 3.5vw, 0.9rem);
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    white-space: nowrap;
    padding: 4px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-art {
    max-width: 300px;
    margin: 0 auto;
  }

  .hero,
  .section {
    padding: 56px 0;
  }
}

.btn-flotante-whatsapp {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  box-shadow: 0 12px 26px rgba(7, 53, 101, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-flotante-whatsapp:hover,
.btn-flotante-whatsapp:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 14px 30px rgba(7, 53, 101, 0.36);
}

.btn-flotante-whatsapp svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  stroke: none;
}

.section,
.hero,
.materials {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section > .container,
.hero > .container,
.materials > .container {
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: -80px;
  right: -140px;
  width: min(640px, 70%);
  background: url("../img/plano-frente.webp") no-repeat center / contain;
  opacity: 0.12;
  transform: translate3d(0, var(--py, 0px), 0);
  pointer-events: none;
  z-index: 0;
}

#quienes-somos::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10, 74, 143, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 74, 143, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

#servicios::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: -80px;
  left: 0;
  right: 0;
  background: url("../img/plano-corte.webp") no-repeat center / min(980px, 100%) auto;
  opacity: 0.07;
  transform: translate3d(0, var(--py, 0px), 0);
  pointer-events: none;
  z-index: 0;
}

#trabajos::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(10, 74, 143, 0.04) 0 1px, transparent 1px 14px);
  pointer-events: none;
  z-index: 0;
}

.materials::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: -80px;
  left: 0;
  right: 0;
  background: url("../img/plano-corte-blanco.webp") no-repeat center / min(980px, 100%) auto;
  opacity: 0.12;
  transform: translate3d(0, var(--py, 0px), 0);
  pointer-events: none;
  z-index: 0;
}

#contacto::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(10, 74, 143, 0.14) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

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

  .btn {
    transition: none;
  }

  .btn-flotante-whatsapp {
    transition: none;
  }

  .js [data-reveal],
  .js [data-reveal-group] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero::before,
  #servicios::before,
  .materials::before {
    transform: none;
  }
}
