:root {
  --red: #7b1e0e;
  --red-dark: #5d170c;
  --orange: #e69525;
  --orange-dark: #c77512;
  --text: #4f4f4f;
  --heading: #2d2d2d;
  --muted: #777;
  --line: #e5e0d8;
  --paper: #f6f3ee;
  --white: #fff;
  --black: #101010;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

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

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
}

.top-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  min-height: 96px;
  padding: 13px 48px;
}

.top-phone {
  justify-self: start;
  color: #bd8131;
  text-decoration: none;
  font-size: 1.05rem;
}

.top-phone::before {
  content: "WA";
  margin-right: 8px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--black);
  text-decoration: none;
}

.brand-mark {
  width: 98px;
  height: 61px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  color: var(--black);
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.quote-link {
  justify-self: end;
  border: 1px solid #d7aa66;
  padding: 10px 16px;
  color: #b17c36;
  text-decoration: none;
  font-size: 0.92rem;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .quote-link {
  justify-self: auto;
}

.language-switch {
  display: inline-flex;
  border: 1px solid #d7aa66;
  background: var(--white);
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 11px;
  color: #916120;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
}

.language-switch a + a {
  border-left: 1px solid #d7aa66;
}

.language-switch a:hover,
.language-switch a:focus-visible,
.language-switch a.is-active {
  color: var(--white);
  background: var(--red);
}

.quote-link:hover,
.quote-link:focus-visible {
  color: var(--white);
  background: var(--orange);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  min-height: 60px;
  background: var(--red);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 30px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
}

.main-nav a::before,
.main-nav a::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: 22px;
  background: rgba(230, 149, 37, 0.72);
  transform: translateY(-50%);
}

.main-nav a::before {
  left: 0;
}

.main-nav a::after {
  right: 0;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--red-dark);
}

.main-nav a:hover::marker {
  display: none;
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.32)),
    url("../img/hero-camino-excavadora.jpg") center / cover no-repeat;
}

.hero-copy {
  width: min(920px, calc(100% - 34px));
  padding: 70px 0;
}

.hero-copy p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.55rem;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 34px;
  color: var(--white);
  font-size: 4.7rem;
  font-weight: 600;
  line-height: 1.08;
  text-transform: uppercase;
}

.orange-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  padding: 11px 26px;
  color: var(--white);
  background: var(--orange);
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.orange-button:hover,
.orange-button:focus-visible {
  background: var(--orange-dark);
}

.orange-button.small {
  min-height: 38px;
  padding: 9px 20px;
  font-size: 0.82rem;
}

.quick-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.quick-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
}

.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.54));
}

.quick-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.quick-card span {
  position: absolute;
  right: 26px;
  bottom: 26px;
  left: 26px;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.quick-card:hover img,
.quick-card:focus-visible img {
  transform: scale(1.05);
}

.section {
  padding: 86px 0;
}

.intro-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

h2 {
  margin: 0 0 18px;
  color: #c68427;
  font-size: 2.45rem;
  font-weight: 300;
  line-height: 1.18;
  text-transform: uppercase;
}

.section-label {
  margin: 0 0 14px;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
}

.intro-text p {
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.service-rows {
  padding: 0;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  background: var(--white);
}

.service-row.reverse .service-image {
  order: 2;
}

.service-image img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.service-content {
  display: grid;
  align-content: center;
  padding: 72px clamp(32px, 6vw, 86px);
}

.service-content p:not(.section-label) {
  max-width: 660px;
}

.projects-section {
  background: var(--paper);
}

.section-heading.centered {
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading.centered p:not(.section-label) {
  margin: 0 auto;
  max-width: 620px;
}

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

.project-card {
  position: relative;
  min-height: 300px;
  border: 0;
  overflow: hidden;
  color: var(--white);
  background: var(--black);
  cursor: pointer;
  text-align: left;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.65));
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.project-card span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 1;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: scale(1.05);
}

.area-section {
  background: var(--white);
}

.area-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.area-text p {
  margin-top: 0;
}

.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.area-tags span {
  border: 1px solid var(--line);
  padding: 9px 13px;
  color: var(--red);
  background: var(--paper);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cta-section {
  padding: 70px 0;
  color: var(--white);
  background: var(--red);
}

.cta-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 34px;
  align-items: center;
}

.cta-layout h2 {
  color: var(--white);
  margin-bottom: 10px;
}

.cta-layout p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer {
  padding: 48px 0;
  color: rgba(255, 255, 255, 0.78);
  background: #282828;
}

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

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}

.footer-logo {
  width: 76px;
  height: 48px;
  padding: 4px;
  object-fit: contain;
  background: var(--white);
}

.footer-brand strong {
  line-height: 1.2;
}

.footer-contact {
  display: grid;
  gap: 4px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 28px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  width: min(940px, 100%);
  max-height: 78vh;
  object-fit: contain;
}

.lightbox p {
  width: min(940px, 100%);
  margin: 12px 0 0;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.legal-content {
  max-width: 820px;
}

.legal-content h1 {
  color: var(--heading);
  font-size: 2.3rem;
}

.legal-content h2 {
  margin-top: 34px;
  font-size: 1.35rem;
}

@media (max-width: 980px) {
  .top-header {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
    padding: 18px;
  }

  .top-phone,
  .header-actions {
    justify-self: center;
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .main-nav a {
    min-width: max-content;
    padding: 0 22px;
  }

  .quick-services,
  .intro-layout,
  .area-layout,
  .service-row,
  .cta-layout,
  .footer-layout {
    grid-template-columns: 1fr;
  }

  .service-row.reverse .service-image {
    order: 0;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .top-header {
    min-height: auto;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 84px;
    height: 52px;
  }

  .quote-link {
    padding: 9px 12px;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    padding: 5px 0;
  }

  .main-nav a {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 520px;
  }

  .hero-copy p {
    font-size: 0.96rem;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .quick-card {
    min-height: 210px;
  }

  h2 {
    font-size: 1.75rem;
  }

  .section {
    padding: 62px 0;
  }

  .service-image img {
    min-height: 330px;
  }

  .service-content {
    padding: 42px 22px;
  }

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

  .project-card {
    min-height: 260px;
  }

  .cta-layout .orange-button {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
}
