:root {
  --navy: #00368c;
  --navy-2: #0047b3;
  --ink: #00368c;
  --red: #fe101d;
  --red-2: #ff2a35;
  --blue: #00368c;
  --blue-2: #0047b3;
  --cream: #ffffff;
  --sand: #ffffff;
  --white: #ffffff;
  --muted: rgba(0, 54, 140, 0.72);
  --line: rgba(0, 54, 140, 0.16);
  --shadow: 0 18px 50px rgba(0, 54, 140, 0.16);
  --radius: 22px;
  --header: 124px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Outfit", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus {
  left: 8px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  padding: 12px 0;
  background: var(--navy);
  border-bottom: 0;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled,
.site-header.open {
  background: var(--navy);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 54, 140, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px 6px 8px;
}

.brand img {
  display: block;
  height: 92px;
  width: auto;
  max-width: min(460px, 52vw);
}

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

.nav a:not(.btn) {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav a:not(.btn):hover,
.nav a:not(.btn).active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav .btn {
  margin-left: 4px;
  padding: 10px 16px;
  font-size: 0.88rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

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

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(254, 16, 29, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  align-self: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  margin: 0 auto;
  transition: 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.hero {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: end stretch;
  color: #fff;
  background-color: #2c3036;
  padding-top: var(--header);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/hero-obra.jpg") 72% 42% / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(44, 48, 54, 0.28) 0%,
    rgba(44, 48, 54, 0.42) 48%,
    rgba(28, 31, 36, 0.58) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.4vw, 2.7rem);
  line-height: 1.2;
  margin: 18px 0 16px;
  max-width: min(34rem, 100%);
  font-weight: 700;
}

.hero p.lead {
  max-width: 46ch;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.84);
}

.hero-mail {
  margin: 16px 0 0;
  font-weight: 700;
}

.hero-mail a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
}

.stat span {
  font-size: 0.86rem;
  opacity: 0.8;
}

.section {
  padding: 92px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}

.kicker {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section-head h2,
.block h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
  margin: 8px 0 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.about-photo {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 460px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 460px;
}

.about-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  max-width: 230px;
}

.about-copy p {
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 28px;
}

.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.mv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 54, 140, 0.08);
}

.mv h3 {
  margin: 0 0 8px;
  font-family: var(--display);
}

.chip-ok {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.homologacion {
  background: #fff;
}

.homolog-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.homolog-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.homolog-scores .card {
  text-align: center;
  padding: 16px 10px;
}

.homolog-scores small {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.homolog-scores b {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 1.15rem;
}

.homolog-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.homolog-list li {
  margin: 8px 0;
}

.cert-open {
  border: 0;
  background: var(--cream);
  border-radius: 22px;
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
  position: relative;
}

.cert-open:hover {
  transform: translateY(-4px);
}

.cert-open img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.cert-open span {
  display: block;
  margin-top: 12px;
  font-weight: 800;
  color: var(--navy);
}

.services {
  background: var(--navy);
  color: #fff;
}

.services .kicker {
  color: #fff;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 24px;
  min-height: 220px;
  transition: transform 0.25s, background 0.25s;
}

.service:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.09);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--red);
  margin-bottom: 16px;
}

.service h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.2rem;
}

.service p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
}

.gallery-back {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.gallery-back:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.gallery-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-cat {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: var(--navy);
  width: 100%;
  aspect-ratio: 4 / 3;
}

.gallery-cat img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.gallery-cat:hover img {
  transform: scale(1.08);
}

.gallery-cat .count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.gallery-cat .cap {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: left;
  line-height: 1.25;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.is-hidden {
  display: none !important;
}

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: var(--navy);
  width: 100%;
  aspect-ratio: 4 / 3;
}

.gallery-item.hide {
  display: none !important;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .cap {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 54, 140, 0.94);
  z-index: 60;
  display: none;
  place-items: center;
  padding: 24px;
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-nav.prev {
  left: 18px;
}

.lightbox-nav.next {
  right: 18px;
}

.lightbox.cert-only .lightbox-nav {
  display: none;
}

.lightbox.cert-only img {
  max-height: 88vh;
  max-width: min(720px, 92vw);
}

.lightbox-caption {
  position: absolute;
  bottom: 18px;
  color: #fff;
  font-weight: 700;
}

.clients {
  background: #fff;
  overflow: hidden;
}

.marquee {
  display: flex;
  gap: 16px;
  animation: slide 32s linear infinite;
  width: max-content;
}

.marquee:hover {
  animation-play-state: paused;
}

.client-card {
  width: 180px;
  height: 110px;
  background: var(--cream);
  border-radius: 18px;
  display: grid;
  place-items: center;
  padding: 14px;
  flex: none;
}

.client-card img {
  max-height: 72px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.client-card.dark {
  background: var(--navy);
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.contact {
  background: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.info-item {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
}

.info-item small {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-item p {
  margin: 4px 0 0;
  font-weight: 700;
}

.info-item a:hover {
  color: var(--red);
}

.map-wrap {
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.form {
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin: 12px 0 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(254, 16, 29, 0.16);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form-msg {
  margin-top: 12px;
  font-weight: 700;
  min-height: 1.4em;
}

.form-msg.ok {
  color: var(--navy);
}

.form-msg.err {
  color: var(--red);
}

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h3 {
  color: #fff;
  font-family: var(--display);
  margin: 0 0 12px;
}

.site-footer a:hover {
  color: #fff;
}

.copy {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.86rem;
}

.whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(254, 16, 29, 0.4);
}

.whatsapp:hover {
  transform: scale(1.05);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.7s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  :root {
    --header: 112px;
  }

  .site-header {
    height: auto;
    min-height: var(--header);
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px 22px;
    display: none;
    gap: 8px;
  }

  .site-header.open .nav {
    display: flex;
  }

  .nav a:not(.btn) {
    width: 100%;
  }

  .nav .btn {
    margin-left: 0;
    width: 100%;
  }

  .brand {
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 52px);
    padding: 5px 10px 5px 6px;
  }

  .brand img {
    height: 72px;
    max-width: 100%;
  }

  .stats,
  .about-grid,
  .homolog-grid,
  .mv,
  .service-grid,
  .contact-grid,
  .footer-grid,
  .form-row,
  .gallery-grid,
  .gallery-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --header: 108px;
  }

  .site-header {
    height: auto;
    min-height: var(--header);
    padding: 12px 0;
  }

  .brand {
    max-width: calc(100% - 52px);
    padding: 5px 10px 5px 6px;
  }

  .brand img {
    height: 64px;
    max-width: 100%;
  }

  .hero::after {
    background-image: url("../img/hero-obra-mobile.jpg");
    background-position: center 36%;
  }

  .hero-content {
    padding-bottom: 48px;
  }

  .stats,
  .about-grid,
  .homolog-grid,
  .mv,
  .service-grid,
  .contact-grid,
  .footer-grid,
  .form-row,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .homolog-scores {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-head {
    align-items: start;
  }

  .gallery-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-photo,
  .about-photo img {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .marquee,
  .gallery-item img {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}
