:root {
  --blue: #0a3568;
  --blue-2: #0e4f90;
  --navy: #06284c;
  --yellow: #ffd400;
  --ink: #0d2c59;
  --text: #2b4362;
  --line: #dfe7f1;
  --soft: #f6f9fc;
  --white: #fff;
  --shadow: 0 16px 38px rgba(5,35,72,.12);
  /* menú colapsable: alto y logo grandes al inicio, compactos al hacer scroll */
  --header-h: 104px;
  --header-h-sm: 72px;
  --logo-w: 330px;
  --logo-w-sm: 220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color: var(--text);
  background: white;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button, input, textarea {
  font: inherit;
}

section[id] {
  scroll-margin-top: var(--header-h-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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

.eyebrow {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--blue);
  text-transform: uppercase;
  margin: 0 0 8px;
}

.eyebrow.light {
  color: white;
}

.eyebrow:after {
  content: "";
  display: inline-block;
  width: 42px;
  height: 3px;
  background: var(--yellow);
  margin-left: 12px;
  vertical-align: middle;
}

h1, h2, h3, p {
  margin-top: 0;
}

h2 {
  font-size: clamp(1.75rem,2.6vw,2.4rem);
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -.03em;
}

p {
  line-height: 1.55;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 5px;
  font-weight: 800;
  font-size: .95rem;
  transition: .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--yellow);
  color: #10223c;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,212,0,.28);
}

.btn-primary:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  border-color: rgba(255,255,255,.75);
  color: #fff;
  background: rgba(0,0,0,.06);
}

.btn-outline-dark {
  border-color: #4773a8;
  color: var(--blue);
  background: #fff;
}

/* fijo (no sticky) para que al encogerse no mueva el contenido de la página */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #edf1f6;
  transition: box-shadow .3s ease;
}

header.compact {
  box-shadow: 0 6px 20px rgba(5,35,72,.08);
}

main {
  padding-top: var(--header-h);
}

.nav {
  height: var(--header-h);
  transition: height .3s ease;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  width: var(--logo-w);
  transition: width .3s ease;
}

header.compact .nav {
  height: var(--header-h-sm);
}

header.compact .logo {
  width: var(--logo-w-sm);
}

.menu {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}

.menu a {
  font-size: .9rem;
  color: #15345f;
}

.menu a:hover {
  color: var(--blue-2);
}

.hamb {
  display: none;
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 1.65rem;
  color: var(--ink);
  cursor: pointer;
}

.hero {
  --hero-grad: linear-gradient(90deg,rgba(3,39,74,.96) 0%,rgba(3,39,74,.82) 42%,rgba(3,39,74,.1) 69%);
  position: relative;
  isolation: isolate;
  /* la portada ocupa la pantalla completa bajo el menú; svh evita saltos por la barra del navegador en celulares */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  background: var(--hero-grad),url('../assets/terreno-camioneta.webp') center 62%/cover no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-grad);
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: center/cover no-repeat;
  background-position: var(--pos);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.hero-dots[hidden] {
  display: none;
}

.hero-dots button {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.hero-dots button::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background .3s,transform .3s;
}

.hero-dots button[aria-current=true]::before {
  background: var(--yellow);
  transform: scale(1.2);
}

.hero-copy {
  max-width: 585px;
  padding: 72px 0;
}

.hero h1 {
  font-size: clamp(2.75rem,4.6vw,4rem);
  line-height: .96;
  letter-spacing: -.04em;
  margin: 0 0 22px;
}

.hero p {
  font-size: 1.12rem;
  max-width: 560px;
  margin-bottom: 28px;
}

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

section {
  padding: 72px 0;
}

.about {
  padding: 0;
  background: white;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr .72fr;
  align-items: stretch;
}

.about-copy {
  padding: 64px 46px 64px 0;
}

.about-photo {
  min-height: 420px;
  background: url('../assets/planta-pasarela.webp') center 30%/cover no-repeat;
  clip-path: polygon(18% 0,100% 0,86% 100%,0 100%);
}

.about-points {
  padding: 55px 0 45px 32px;
  display: grid;
  align-content: center;
  gap: 26px;
}

.point {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
}

.point-icon {
  font-size: 1.7rem;
  color: var(--blue);
}

.point strong {
  display: block;
  color: var(--ink);
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 8px 0 64px;
}

.mv-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 22px 24px;
  background: var(--soft);
}

.mv-card h3 {
  color: var(--ink);
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.mv-card p {
  margin: 0;
  font-size: .93rem;
}

.services {
  background: linear-gradient(#fff,#fbfdff);
}

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

.section-head p {
  max-width: 520px;
  margin-bottom: 4px;
}

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

.service-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 6px 18px rgba(13,44,89,.05);
}

.service-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.service-body {
  padding: 20px;
}

.service-body h3 {
  color: var(--ink);
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.service-body p {
  font-size: .91rem;
  margin: 0;
}

.supplies {
  background: #fff;
}

.supply-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.supply-intro {
  position: sticky;
  top: calc(var(--header-h-sm) + 20px);
}

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

.product-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  transition: .2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.product-card .meta {
  padding: 13px 14px 15px;
}

.product-card h3 {
  font-size: .98rem;
  color: var(--ink);
  margin-bottom: 3px;
}

.product-card p {
  font-size: .82rem;
  margin: 0;
  color: #60718a;
}
/* productos insignia: destacados sobre la grilla de materiales */
.products-label {
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

.featured {
  margin-bottom: 30px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  background: var(--navy);
  border: 2px solid var(--yellow);
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 14px 34px rgba(6,40,76,.22);
}

.featured-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.featured-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.featured-body h3 {
  color: #fff;
  font-size: 1.12rem;
  margin: 0;
}

.featured-body p {
  margin: 0;
  font-size: .9rem;
  color: #d6e2f0;
}

.badge {
  display: inline-block;
  background: var(--yellow);
  color: #10223c;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.modal-product .badge {
  margin-bottom: 6px;
}

/* strategic partners */

.partners {
  background: linear-gradient(180deg,#f7fafe 0%,#fff 100%);
  padding: 72px 0;
}

.partners-head {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}

.partners-head p:last-child {
  margin-bottom: 4px;
}

.partner-block {
  margin-top: 28px;
}

.partner-title {
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

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

.ally-grid {
  /* flex centrado: si la última fila queda incompleta, los logos quedan al medio */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.ally-grid .partner-card {
  flex: 0 0 calc((100% - 48px) / 4);
}

.partner-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-shadow: 0 7px 22px rgba(13,44,89,.06);
}

.partner-card img {
  max-height: 88px;
  width: 100%;
  object-fit: contain;
}

.partner-note {
  margin-top: 20px;
  font-size: .88rem;
  color: #60718a;
}

.value {
  padding: 0;
  background: var(--navy);
  color: #fff;
}

.value-wrap {
  display: grid;
  grid-template-columns: .88fr 1.6fr;
  min-height: 390px;
  align-items: stretch;
}

.value-copy {
  padding: 58px 35px 40px 0;
}

.value-copy h2 {
  color: #fff;
}

.value-photo {
  background: linear-gradient(90deg,var(--navy) 0%,rgba(6,40,76,.25) 28%,rgba(6,40,76,.02)),url('../assets/faena-panoramica.webp') center/cover no-repeat;
}

.value-points {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 16px;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.value-item {
  font-size: .82rem;
}

.value-item b {
  display: block;
}

.projects {
  background: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(4,1fr);
  gap: 14px;
  align-items: stretch;
}

.project-intro {
  padding: 5px 25px 5px 0;
}

.project-card {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  min-height: 250px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px 14px 14px;
  background: linear-gradient(transparent,rgba(4,31,60,.9));
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}

.contact {
  background: var(--soft);
  padding: 60px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.15fr .72fr;
  gap: 30px;
  align-items: start;
}

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

.form-grid .field-msg {
  grid-column: 2;
  grid-row: 2/4;
  display: flex;
}

.form-grid .cf-turnstile {
  grid-column: 1/-1;
  min-height: 65px;
}

.form-grid input, .form-grid textarea {
  width: 100%;
  border: 1px solid #cfdbe9;
  border-radius: 5px;
  padding: 13px 14px;
  background: #fff;
}

.form-grid textarea {
  min-height: 116px;
  resize: vertical;
}

.form-grid button {
  grid-column: 1;
}

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

.form-status {
  grid-column: 1/-1;
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
}

.form-status.ok {
  color: #1b7a3a;
}

.form-status.error {
  color: #b42318;
}

.contact-list {
  display: grid;
  gap: 12px;
  font-size: .95rem;
  color: var(--ink);
}

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

footer {
  background: #052747;
  color: #fff;
  padding: 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 28px;
}

.footer-grid img {
  width: 190px;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: .84rem;
  color: #dce8f4;
}

.footer-social {
  font-size: .85rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,20,40,.7);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 20px;
}

.modal.open {
  display: grid;
}

.modal-card {
  background: white;
  width: min(900px,100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px;
  padding: 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: #eef3f8;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
  margin-top: 20px;
}

.modal-product {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.modal-product img {
  height: 110px;
  width: 135px;
  object-fit: cover;
}

.modal-product h4 {
  margin: 0 0 5px;
  color: var(--ink);
}

.modal-product p {
  margin: 0;
  font-size: .83rem;
}

/* el menú completo no cabe bajo ~1200px: se pasa al botón hamburguesa */
@media(max-width:1200px) {
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow);
  }
  .menu.open {
    display: flex;
  }
  .hamb {
    display: block;
  }
  .nav>.btn {
    display: none;
  }
  :root {
    --header-h: 92px;
    --header-h-sm: 68px;
    --logo-w: 280px;
    --logo-w-sm: 200px;
  }
}

/* laptops pequeñas: proyectos con el texto arriba y las 4 fotos en una fila */
@media(min-width:981px) and (max-width:1200px) {
  .project-grid {
    grid-template-columns: repeat(4,1fr);
  }
  .project-intro {
    grid-column: 1/-1;
    padding-right: 0;
  }
}

@media(max-width:980px) {
  .hero {
    background-position: 63% 62%;
  }
  .hero-copy {
    padding: 55px 0;
  }
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
  .about-points {
    grid-column: 1/-1;
    grid-template-columns: repeat(2,1fr);
    padding: 32px 0;
  }
  .about-copy {
    padding-right: 25px;
  }
  .service-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .supply-layout {
    grid-template-columns: 1fr;
  }
  .supply-intro {
    position: static;
  }
  .product-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .value-wrap {
    grid-template-columns: 1fr;
  }
  .value-copy {
    padding-right: 0;
  }
  .value-photo {
    min-height: 330px;
  }
  .value-points {
    grid-template-columns: repeat(3,1fr);
  }
  .project-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .project-intro {
    grid-column: 1/-1;
  }
  .partners-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-grid img {
    margin: auto;
  }
  .footer-links {
    flex-wrap: wrap;
  }
}

@media(max-width:620px) {
  :root {
    --header-h: 78px;
    --header-h-sm: 62px;
    --logo-w: 230px;
    --logo-w-sm: 170px;
  }
  .container {
    width: min(100% - 28px,1180px);
  }
  section {
    padding: 52px 0;
  }
  .hero {
    --hero-grad: linear-gradient(180deg,rgba(3,39,74,.94),rgba(3,39,74,.78));
    background: var(--hero-grad),url('../assets/terreno-camioneta-640.webp') 58% 62%/cover no-repeat;
  }
  .hero-slide {
    background-position: var(--pos-m);
  }
  .hero-copy {
    padding: 40px 0 72px;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.6rem);
  }
  .eyebrow {
    letter-spacing: .12em;
  }
  .eyebrow:after {
    width: 28px;
    margin-left: 10px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-copy {
    padding: 48px 0 30px;
  }
  .about-photo {
    min-height: 330px;
    clip-path: none;
    background-image: url('../assets/planta-pasarela-640.webp');
  }
  .about-points {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }
  .mv-grid {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }
  .section-head {
    display: block;
  }
  .service-grid, .product-grid, .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    aspect-ratio: 4/5;
  }
  .supply-layout {
    gap: 20px;
  }
  .value-photo {
    background-image: linear-gradient(90deg,var(--navy) 0%,rgba(6,40,76,.25) 28%,rgba(6,40,76,.02)),url('../assets/faena-panoramica.webp');
  }
  .value-points {
    grid-template-columns: repeat(2,1fr);
  }
  .brand-grid {
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
  }
  .ally-grid {
    gap: 10px;
  }
  .ally-grid .partner-card {
    flex-basis: calc((100% - 10px) / 2);
  }
  .partner-card {
    min-height: 96px;
    padding: 10px;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .field-msg {
    grid-column: 1;
    grid-row: auto;
  }
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-product {
    grid-template-columns: 105px 1fr;
  }
  .modal-product img {
    width: 105px;
    height: 90px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none!important;
  }
}
