:root {
  --blue: #011627;
  --blue-soft: #082337;
  --red: #e12934;
  --red-dark: #ba1822;
  --text: rgba(1, 22, 39, 0.78);
  --muted: rgba(255, 255, 255, 0.78);
  --light: #f9f8f8;
  --white: #ffffff;
  --line: rgba(1, 22, 39, 0.12);
  --shadow: 0 18px 45px rgba(1, 22, 39, 0.18);
  --container: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--light);
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

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

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

p {
  margin: 0 0 18px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(1, 22, 39, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-size: 19px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.main-nav a {
  padding: 30px 13px;
  transition: color 160ms ease, background 160ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(225, 41, 52, 0.92);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  content: "";
}

.hero {
  position: relative;
  min-height: 550px;
  padding: 112px 0 44px;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.54)),
    url("../img/automatizacion-plantas.jpg") center/cover no-repeat;
  color: var(--white);
}

.hero h1,
.hero h2,
.section-title,
.dark-title,
.card-title,
.feature-title {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 890px;
  margin: 0 0 16px;
  color: #f0e5e5;
  font-size: 39px;
  line-height: 1.16;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid var(--red);
  background: var(--red);
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  color: var(--white);
}

.button.secondary {
  background: rgba(1, 22, 39, 0.34);
  color: var(--white);
}

.button.secondary:hover {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

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

.solution-tile {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow);
  background: var(--blue);
}

.solution-tile img {
  width: 100%;
  height: 100%;
  min-height: 176px;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 220ms ease, opacity 220ms ease;
}

.solution-tile:hover img {
  transform: scale(1.045);
  opacity: 0.68;
}

.tile-label {
  position: absolute;
  inset: auto 0 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(1, 22, 39, 0.92));
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.section {
  padding: 78px 0;
}

.section.dark {
  position: relative;
  background:
    linear-gradient(rgba(1, 22, 39, 0.76), rgba(1, 22, 39, 0.76)),
    url("../img/fondo-eficiencia.jpg") center/cover fixed no-repeat;
  color: var(--white);
}

.section.cta {
  background:
    linear-gradient(rgba(1, 22, 39, 0.82), rgba(1, 22, 39, 0.82)),
    url("../img/proyecto-industrial.jpg") center/cover no-repeat;
  color: var(--white);
  text-align: center;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--red);
  font-family: Roboto, Arial, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 35px;
  line-height: 1.18;
}

.dark .section-title,
.cta .section-title {
  color: var(--white);
}

.section-intro {
  max-width: 840px;
  margin-bottom: 36px;
  color: var(--text);
}

.dark .section-intro,
.cta .section-intro {
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}

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

.feature {
  color: var(--white);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.62);
}

.feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.feature-title {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 23px;
  line-height: 1.2;
}

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

.card {
  min-height: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(1, 22, 39, 0.08);
}

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

.card-body {
  padding: 24px;
}

.card-title {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 21px;
  line-height: 1.25;
}

.card ul,
.content-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.card li,
.content-list li {
  margin-bottom: 8px;
}

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

.split-image {
  min-height: 410px;
  background: url("../img/transformacion-digital.png") center/cover no-repeat;
  box-shadow: var(--shadow);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.metric {
  padding: 18px;
  background: var(--blue);
  color: var(--white);
}

.metric strong {
  display: block;
  color: var(--red);
  font-family: Roboto, Arial, sans-serif;
  font-size: 24px;
  line-height: 1.1;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-item {
  padding: 24px;
  border-left: 5px solid var(--red);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(1, 22, 39, 0.07);
}

.service-item h3 {
  margin: 0 0 8px;
  color: var(--blue);
  font-family: Roboto, Arial, sans-serif;
  font-size: 21px;
}

.page-hero {
  padding: 92px 0 72px;
  background:
    linear-gradient(rgba(1, 22, 39, 0.78), rgba(1, 22, 39, 0.78)),
    url("../img/automatizacion-plantas.jpg") center/cover no-repeat;
  color: var(--white);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  color: #f0e5e5;
  font-family: Roboto, Arial, sans-serif;
  font-size: 39px;
  line-height: 1.14;
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--white);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 46px;
  align-items: start;
}

.panel {
  padding: 28px;
  background: var(--blue);
  color: var(--white);
}

.panel h2,
.panel h3 {
  margin-top: 0;
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--blue);
  font: inherit;
  padding: 13px 14px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.site-footer {
  background: var(--blue);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--white);
  font-family: Roboto, Arial, sans-serif;
  font-size: 20px;
}

.footer-nav {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.li-counter {
  padding: 0 0 14px;
  text-align: center;
}

.li-counter a {
  display: inline-block;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--blue);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .feature-grid,
  .footer-grid,
  .split,
  .content-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-image {
    min-height: 320px;
  }
}

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

  .hero,
  .page-hero {
    padding-top: 72px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 30px;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-grid,
  .cards,
  .service-list,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    gap: 26px;
  }
}
