:root {
  --red: #b52b37;
  --red-dark: #8e1f2a;
  --ink: #14171a;
  --carbon: #20262b;
  --steel: #69737b;
  --line: #d9dee2;
  --paper: #f5f3ee;
  --white: #ffffff;
  --green: #25d366;
  --amber: #d69a3d;
  --max: 1220px;
  --shadow: 0 22px 70px rgba(20, 23, 26, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 11px 4px at 18px 14px, rgba(69, 78, 84, .08) 0 52%, transparent 56%),
    radial-gradient(ellipse 11px 4px at 54px 38px, rgba(255, 255, 255, .42) 0 48%, transparent 54%);
  background-size: 72px 48px;
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(238, 239, 237, .95);
  border-bottom: 1px solid rgba(20, 23, 26, .11);
  backdrop-filter: blur(16px);
}

.brand img {
  width: auto;
  max-width: 235px;
  max-height: 76px;
  object-fit: contain;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: #30363b;
  font-size: .94rem;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid transparent;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(360px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: var(--max);
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: clamp(46px, 7vw, 92px) 18px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(245, 243, 238, .94), rgba(245, 243, 238, .68) 58%, transparent);
  pointer-events: none;
}

.hero {
  position: relative;
  isolation: isolate;
}

.hero-copy {
  padding-top: 18px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: 3.55rem;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0 0;
  color: #4f5960;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

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

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

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-ghost {
  color: var(--carbon);
  border-color: #9aa3aa;
}

.btn-dark {
  color: var(--white);
  background: var(--carbon);
}

.btn-wa {
  color: #06160b;
  background: var(--green);
}

.hero-gallery {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: clamp(480px, 55vw, 620px);
}

.hero-photo {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #d8dde0;
  box-shadow: var(--shadow);
}

.hero-photo-large {
  grid-row: 1 / span 2;
}

.hero-photo img {
  height: 100%;
  object-fit: cover;
}

.hero-photo-large img {
  object-position: 56% center;
}

.hero-photo:nth-child(2) img {
  object-position: center 42%;
}

.hero-photo:nth-child(3) img {
  object-position: center 48%;
}

.hero-photo::after,
.photo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.18), transparent 44%);
  pointer-events: none;
}

.section {
  padding: clamp(68px, 10vw, 118px) 18px;
}

.section-head,
.split,
.contact,
.footer {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(280px, 620px) minmax(240px, 520px);
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  margin-bottom: 34px;
}

.section-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -18px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.3vw, 4.25rem);
  line-height: 1;
}

.section-head p:not(.eyebrow),
.section-copy p,
.contact p {
  margin: 0;
  color: #59636a;
  font-size: 1.03rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: var(--max);
  margin: 0 auto;
}

.service-grid article {
  min-height: 220px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(20, 23, 26, .05);
}

.service-grid h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
  line-height: 1.16;
}

.service-grid p {
  margin: 0;
  color: #59636a;
  font-size: .96rem;
}

.materials-section {
  color: var(--white);
  background: var(--carbon);
}

.materials-section .section-head {
  max-width: var(--max);
}

.materials-section .section-head p:not(.eyebrow) {
  color: rgba(255,255,255,.72);
}

.materials-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 14px;
  max-width: var(--max);
  margin: 0 auto;
}

.materials-grid article {
  padding: 26px;
  color: var(--ink);
  background: var(--white);
  border-top: 4px solid var(--red);
}

.materials-grid h3 {
  margin: 0 0 18px;
  font-size: 1.3rem;
}

.materials-grid ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.materials-grid li {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: #384047;
  font-weight: 800;
}

.materials-grid p {
  margin: 0;
  color: #59636a;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 500px) 1fr;
  gap: clamp(30px, 6vw, 82px);
  align-items: center;
}

.section-copy h2 {
  margin-bottom: 20px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.spec-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list b {
  color: var(--red);
}

.spec-list span {
  color: #384047;
}

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

.photo-grid img,
.wide-gallery img,
.project-media img,
.photo-panel {
  background: #d8dde0;
  box-shadow: var(--shadow);
}

.photo-grid img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 8px;
}

.dark-section {
  max-width: none;
  color: var(--white);
  background: #22282d;
}

.dark-section .section-head,
.dark-section .wide-gallery {
  max-width: var(--max);
  margin-inline: auto;
}

.dark-section p:not(.eyebrow) {
  color: rgba(255,255,255,.72);
}

.wide-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.wide-gallery img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 8px;
  box-shadow: none;
}

.team-section {
  grid-template-columns: 1.05fr .95fr;
}

.photo-panel {
  position: relative;
  overflow: hidden;
}

.photo-panel img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 8px;
}

.project-list {
  display: grid;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
}

.industrial-feature {
  max-width: none;
  color: var(--white);
  background-image:
    linear-gradient(90deg, rgba(18, 22, 25, .96), rgba(24, 29, 33, .88) 48%, rgba(24, 29, 33, .78)),
    url("backgrounds/estructura-industrial-autino.jpg");
  background-position: center;
  background-size: cover;
}

.industrial-feature .section-head,
.industrial-feature .project-list {
  max-width: var(--max);
  margin-inline: auto;
}

.industrial-feature .section-head p:not(.eyebrow) {
  color: rgba(255,255,255,.76);
}

.project-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.project-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-content: center;
  padding: 10px;
  background: var(--line);
}

.project-media img:first-child {
  grid-row: auto;
}

.project-media img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #eef1f3;
  padding: 6px;
  box-shadow: none;
}

.project-copy {
  align-self: center;
  padding: clamp(26px, 5vw, 54px);
}

.project-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.project-copy p {
  margin: 0;
  color: #59636a;
}

.gallery-section {
  padding-top: 0;
}

.technical-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: var(--max);
  margin: 0 auto;
}

.technical-gallery img {
  aspect-ratio: 4 / 3;
  background: #d8dde0;
  object-fit: contain;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(20, 23, 26, .08);
}

.contact {
  margin-bottom: clamp(48px, 8vw, 82px);
  padding: clamp(34px, 6vw, 64px);
  color: var(--white);
  background: var(--red);
}

.contact .eyebrow,
.contact p {
  color: rgba(255,255,255,.82);
}

.contact h2 {
  max-width: 760px;
}

.contact-data {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: rgba(255,255,255,.9);
  font-weight: 800;
}

.location-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.45);
  text-underline-offset: 4px;
}

.location-link:hover,
.location-link:focus-visible {
  color: var(--white);
  text-decoration-color: currentColor;
}

.location-pin {
  flex: 0 0 auto;
  line-height: 1.45;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 18px 96px;
  color: #59636a;
}

.footer img {
  width: 210px;
  height: auto;
  object-fit: contain;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
}

#wa-toggle {
  display: none;
}

.wa-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  cursor: pointer;
}

.wa-trigger svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.wa-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s ease;
}

#wa-toggle:checked ~ .wa-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.wa-close {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #59636a;
  cursor: pointer;
}

.wa-panel strong {
  padding-right: 30px;
  font-size: 1.12rem;
}

.wa-panel a {
  display: grid;
  gap: 2px;
  padding: 13px;
  background: #f3f5f6;
  border-left: 4px solid var(--green);
}

.wa-panel span {
  color: #59636a;
  font-size: .92rem;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .section-head,
  .split,
  .project-card,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-gallery {
    height: auto;
    grid-template-rows: auto;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .materials-grid {
    grid-template-columns: 1fr;
  }

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

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

}

@media (max-width: 680px) {
  .site-header {
    position: static;
    gap: 14px;
  }

  .brand img {
    max-width: 150px;
    max-height: 78px;
  }

  h1 {
    max-width: 18ch;
    font-size: 2.2rem;
    line-height: 1.02;
  }

  .hero-gallery,
  .photo-grid,
  .wide-gallery,
  .project-media,
  .technical-gallery,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo-large,
  .project-media img:first-child {
    grid-row: auto;
  }

  .hero-gallery {
    height: auto;
  }

  .hero-photo,
  .wide-gallery img,
  .technical-gallery img,
  .photo-panel {
    min-height: 0;
  }

  .hero-photo img {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .materials-grid ul {
    grid-template-columns: 1fr;
  }

  .service-grid article {
    min-height: 190px;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact {
    margin-inline: 0;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
