:root {
  --header-text: #24303a;
  --header-accent: #d88721;
  --header-border: #e9edf0;
  --hero-accent: #f2a025;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  color: var(--header-text);
  font-family: Arial, Helvetica, sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid var(--header-border);
}

.section { scroll-margin-top: 112px; }

.section-container {
  width: min(100% - 48px, 1200px);
  margin: 0 auto;
}

.section-kicker {
  margin: 0 0 18px;
  color: #d8781c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.2vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.about-section { padding: 120px 0; background: #f4f1eb; }
.about-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(50px, 8vw, 120px); }
.about-copy { padding-top: 45px; color: #59636b; font-size: 1rem; line-height: 1.75; }
.about-copy .lead { margin-top: 0; color: #23303a; font-size: 1.3rem; line-height: 1.55; }
.purpose-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 38px; }
.purpose-grid article { padding: 28px; background: rgba(255, 255, 255, 0.62); border-top: 3px solid #d8781c; }
.purpose-grid h3 { margin: 0 0 12px; color: #23303a; font-size: 1.15rem; }
.purpose-grid p { margin: 0; font-size: 0.92rem; line-height: 1.65; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 45px; padding-top: 30px; border-top: 1px solid #cfd0cc; }
.stats strong, .stats span { display: block; }
.stats strong { color: #d8781c; font-size: clamp(2rem, 3vw, 3rem); }
.stats span { margin-top: 6px; color: #59636b; font-size: 0.8rem; }

.services-section { padding: 120px 0; color: #fff; background: #101f2c; }
.section-kicker-light { color: #f2a025; }
.services-intro { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 70px; align-items: end; }
.services-intro > p { margin: 0 0 8px; color: #aebbc4; line-height: 1.7; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 70px; border-top: 1px solid #40505d; border-bottom: 1px solid #40505d; }
.service-card { min-height: 315px; padding: 34px 28px; border-right: 1px solid #40505d; transition: background-color 200ms ease, transform 200ms ease; }
.service-card:first-child { border-left: 1px solid #40505d; }
.service-card:hover { background: #182c3c; transform: translateY(-6px); }
.service-card span { color: #f2a025; font-size: 0.76rem; font-weight: 800; }
.service-card h3 { margin: 65px 0 18px; font-size: 1.35rem; }
.service-card p { margin: 0; color: #9eacb6; font-size: 0.92rem; line-height: 1.65; }
.service-card ul { margin: 18px 0 0; padding-left: 20px; color: #9eacb6; font-size: 0.88rem; line-height: 1.55; }
.service-card li + li { margin-top: 8px; }
.service-card li::marker { color: #f2a025; }

.projects-section { padding: 120px 0; background: #fff; }
.projects-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(50px, 9vw, 130px); }
.project-highlight { position: sticky; top: 165px; align-self: start; }
.project-highlight > p:not(.section-kicker) { margin: 28px 0; color: #65717a; line-height: 1.7; }
.text-link { color: #d8781c; font-weight: 700; text-decoration: none; }
.text-link span { margin-left: 8px; transition: margin-left 180ms ease; }
.text-link:hover span { margin-left: 14px; }
.project-list article { display: grid; grid-template-columns: 70px 1fr; gap: 24px; padding: 38px 0; border-bottom: 1px solid #dfe3e5; }
.project-list article:first-child { border-top: 1px solid #dfe3e5; }
.project-list article > span { color: #d8781c; font-size: 0.8rem; font-weight: 800; }
.project-list h3 { margin: 0 0 10px; color: #1b2b38; font-size: clamp(1.35rem, 2vw, 1.85rem); }
.project-list p { margin: 0; color: #76818a; }

.contact-section { padding: 110px 0; background: #dcebf1; }
.contact-layout { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(50px, 10vw, 150px); align-items: center; }
.contact-layout > div:first-child > p:last-child { max-width: 590px; color: #52636d; line-height: 1.7; }
.contact-card { padding: 16px 38px; background: #fff; box-shadow: 0 25px 65px rgba(20, 43, 57, 0.12); }
.contact-card > * { display: block; padding: 25px 0; color: #20323f; text-decoration: none; border-bottom: 1px solid #e2e8eb; }
.contact-card > *:last-child { border-bottom: 0; }
.contact-card small, .contact-card strong { display: block; }
.contact-card small { margin-bottom: 7px; color: #d8781c; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-card strong { font-size: 1rem; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px max(24px, calc((100% - 1200px) / 2)); color: #aab3ba; font-size: 0.82rem; background: #101f2c; }
.site-footer a { color: #fff; text-decoration: none; }

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1200px);
  min-height: 112px;
  margin: 0 auto;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: block;
  width: auto;
  max-width: 230px;
  height: auto;
  max-height: 94px;
  object-fit: contain;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation a {
  position: relative;
  display: block;
  padding: 10px 24px;
  color: var(--header-text);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.main-navigation li + li { border-left: 1px solid #d8dde1; }

.main-navigation a::after {
  position: absolute;
  right: 24px;
  bottom: 3px;
  left: 24px;
  height: 2px;
  background-color: var(--header-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  background: url("../img/hero-desierto-estrellas.png") center / cover no-repeat;
  isolation: isolate;
}

.hero-overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 15, 30, 0.88), rgba(3, 15, 30, 0.63) 38%, rgba(3, 15, 30, 0.12) 72%);
}

.hero-content {
  align-self: center;
  width: min(100% - 48px, 1200px);
  margin: 0 auto;
  padding: 72px 0 110px;
  color: #fff;
}

.hero-eyebrow {
  margin: 0 0 18px;
  color: var(--hero-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-description {
  max-width: 590px;
  margin: 26px 0 34px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

.hero-cta {
  display: inline-flex;
  padding: 15px 24px;
  color: #101b27;
  font-weight: 700;
  text-decoration: none;
  background: var(--hero-accent);
  border-radius: 2px;
  transition: background-color 180ms ease, transform 180ms ease;
}

.hero-cta:hover, .hero-cta:focus-visible { background: #ffb43f; transform: translateY(-2px); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 28px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 4px;
  transform: translateX(-50%);
}

.main-navigation a:hover,
.main-navigation a:focus-visible,
.main-navigation a.is-active {
  color: var(--header-accent);
}

.main-navigation a:hover::after,
.main-navigation a:focus-visible::after,
.main-navigation a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background-color: var(--header-text);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--header-accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .section { scroll-margin-top: 88px; }
  .header-container {
    width: min(100% - 32px, 1200px);
    min-height: 88px;
  }

  .logo {
    max-width: 178px;
    max-height: 72px;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background-color: #ffffff;
    border-bottom: 1px solid var(--header-border);
    opacity: 0;
    transition: max-height 250ms ease, opacity 180ms ease, visibility 250ms;
  }

  .main-navigation ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    width: min(100% - 32px, 1200px);
    margin: 0 auto;
    padding: 10px 0 20px;
  }

  .main-navigation a {
    padding: 13px 4px;
  }

  .main-navigation li + li { border-top: 1px solid var(--header-border); border-left: 0; }

  .main-navigation a::after {
    right: auto;
    left: 4px;
    width: 32px;
    transform-origin: left;
  }

  .hero { min-height: calc(100svh - 88px); background-position: 67% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(3, 15, 30, 0.9), rgba(3, 15, 30, 0.56) 80%, rgba(3, 15, 30, 0.3)); }
  .hero-content { width: min(100% - 32px, 1200px); padding: 60px 0 100px; }

  .section-container { width: min(100% - 32px, 1200px); }
  .about-section, .services-section, .projects-section, .contact-section { padding: 80px 0; }
  .about-layout, .services-intro, .projects-layout, .contact-layout { grid-template-columns: 1fr; gap: 38px; }
  .about-copy { padding-top: 0; }
  .purpose-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats div { display: grid; grid-template-columns: 90px 1fr; align-items: center; }
  .stats span { margin-top: 0; }
  .service-grid { grid-template-columns: 1fr; margin-top: 45px; }
  .service-card, .service-card:first-child { min-height: 0; border-right: 1px solid #40505d; border-bottom: 1px solid #40505d; border-left: 1px solid #40505d; }
  .service-card h3 { margin-top: 32px; }
  .project-highlight { position: static; }
  .contact-card { padding: 10px 24px; }
  .site-footer { flex-direction: column; padding: 28px 16px; }

  .site-header.menu-open .main-navigation {
    max-height: 320px;
    visibility: visible;
    opacity: 1;
  }

  .site-header.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
