:root {
  --ink: #191a1c;
  --muted: #5f6268;
  --line: #d8dade;
  --paper: #f4f5f6;
  --white: #ffffff;
  --yellow: #f7c600;
  --yellow-dark: #a87900;
  --red: #d62822;
  --red-dark: #941f1a;
  --steel: #355c63;
  --charcoal: #1b1d1f;
  --shadow: 0 22px 70px rgba(25, 26, 28, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(25, 26, 28, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup {
  display: block;
  width: 260px;
  height: 52px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: cover;
  background: var(--white);
  border: 2px solid rgba(214, 40, 34, 0.18);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.brand-copy {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--red);
  font-size: 1.02rem;
}

.brand small {
  color: var(--yellow-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.main-nav a:not(.nav-cta) {
  color: #45484d;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-cta {
  color: #141414;
  background: var(--yellow);
  box-shadow: 0 12px 28px rgba(249, 198, 22, 0.24);
}

.button.primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 12px 28px rgba(194, 44, 38, 0.26);
}

.button.secondary {
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--red);
}

.button.slim {
  min-height: 42px;
  align-self: flex-start;
}

.button,
.nav-cta,
.equipment-item,
.main-nav a {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.nav-cta:hover {
  transform: translateY(-1px);
}

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

.button:focus-visible,
.nav-cta:focus-visible,
.equipment-item:focus-visible,
.nav-toggle:focus-visible,
.main-nav a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--charcoal);
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--ink);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/portfolio/hero-operacion-real.webp");
  background-size: cover;
  background-position: 54% center;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 36%, rgba(255, 255, 255, 0.28) 74%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0) 44%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin: 0 0 clamp(28px, 8vh, 88px) clamp(18px, 6vw, 86px);
  padding-top: 96px;
}

.eyebrow {
  margin: 0 0 12px;
  padding-left: 10px;
  color: var(--red);
  border-left: 4px solid var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-positioning {
  max-width: 650px;
  margin-bottom: 10px;
  color: var(--red);
  font-size: clamp(1.08rem, 2vw, 1.4rem);
  font-weight: 850;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  color: #41454a;
  font-size: clamp(1.02rem, 2vw, 1.28rem);
}

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

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics span {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 40, 34, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #4f5358;
}

.hero-metrics strong {
  display: block;
  color: var(--red);
  font-size: 1.22rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  padding: 24px clamp(18px, 4vw, 54px);
  background: var(--white);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  color: var(--muted);
}

.section {
  padding: clamp(64px, 9vw, 116px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.compact {
  margin-bottom: 24px;
}

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

.service-grid article {
  min-height: 250px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 8px;
}

.values-section {
  background: #eceeef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.values-grid article {
  min-height: 238px;
  padding: 24px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 8px;
}

.values-grid article:nth-child(even) {
  border-top-color: var(--yellow);
}

.values-grid span {
  display: block;
  margin-bottom: 34px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
}

.values-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.service-grid p,
.portfolio-card p,
.catalog-detail p,
.steps span,
.coverage p,
.quote-copy p,
.site-footer span {
  color: var(--muted);
}

.icon {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--red);
  font-weight: 900;
}

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

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

.portfolio-card {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 8px;
}

.portfolio-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #ecebed;
}

.portfolio-card figcaption {
  display: grid;
  gap: 7px;
  padding: 22px;
}

.portfolio-card figcaption span {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portfolio-card figcaption strong {
  font-size: 1.18rem;
}

.portfolio-card figcaption p {
  margin: 0;
}

.field-section {
  color: var(--ink);
  background: #f0f2f3;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.field-section .section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.field-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  grid-auto-flow: dense;
}

#operation-gallery:not(.is-expanded) .field-card:nth-child(n + 9) {
  display: none;
}

.field-card {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
}

.field-card-wide {
  grid-column: span 2;
}

.field-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  background: #d6d7d8;
}

.field-card-wide img {
  aspect-ratio: 4 / 3;
}

.field-card figcaption {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 17px 18px 19px;
}

.field-card figcaption span {
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-card figcaption strong {
  font-size: 1.02rem;
}

.gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.gallery-toggle {
  width: auto;
  background: var(--white) !important;
}

.catalog {
  background: var(--white);
  color: var(--ink);
  border-top: 6px solid var(--yellow);
}

.catalog .section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.catalog-list {
  display: grid;
  gap: 10px;
}

.equipment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  color: var(--ink);
  background: #f7f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.equipment-item span {
  font-weight: 850;
}

.equipment-item small {
  color: var(--muted);
  font-size: 0.86rem;
}

.equipment-item.is-active {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.equipment-item:not(.is-active):hover {
  background: #fff8d4;
  border-color: var(--yellow);
}

.equipment-item.is-active small {
  color: rgba(17, 24, 39, 0.68);
}

.catalog-detail {
  display: flex;
  min-height: 540px;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  position: sticky;
  top: 98px;
  padding: 28px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.catalog-detail .label {
  margin-bottom: 16px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-count {
  margin: 10px 0 4px;
  color: var(--red) !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}

.inventory-list li {
  position: relative;
  padding: 9px 0 9px 19px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.inventory-list li::before {
  position: absolute;
  top: 16px;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--red);
}

.catalog-detail .button {
  margin-top: auto;
}

.process {
  background: var(--white);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.steps li {
  position: relative;
  min-height: 220px;
  padding: 26px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.steps li:last-child {
  border-right: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 54px;
  color: var(--yellow-dark);
  font-weight: 900;
}

.steps strong,
.steps span {
  display: block;
}

.coverage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 72px);
  color: var(--ink);
  background: #fff6c9;
  border-top: 6px solid var(--red);
  border-bottom: 1px solid #eadb8e;
}

.coverage-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.coverage-panel span {
  min-height: 68px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid #e2cf70;
  font-weight: 800;
  text-align: center;
}

.coverage-panel span:first-child {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.location-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.68fr) minmax(520px, 1.32fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 72px);
  background: #f2f4f5;
  border-bottom: 1px solid var(--line);
}

.location-copy {
  max-width: 540px;
}

.location-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.location-address {
  display: grid;
  gap: 4px;
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--white);
  border-left: 6px solid var(--yellow);
  border-bottom: 2px solid var(--red);
  font-style: normal;
}

.location-address strong {
  color: var(--red);
  font-size: 1.2rem;
}

.location-address span {
  color: var(--muted);
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-button {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 12px 28px rgba(247, 198, 0, 0.22);
}

.map-button:hover {
  background: #e8bb00;
  border-color: #e8bb00;
}

.map-frame {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: var(--white);
  border: 4px solid var(--yellow);
  border-left-color: var(--red);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-canvas {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #dfe7db;
}

.map-canvas:focus-visible {
  outline: 4px solid var(--red);
  outline-offset: -8px;
}

.map-tiles {
  position: absolute;
  top: calc(50% - 250px);
  left: calc(50% - 511px);
  display: grid;
  grid-template-columns: repeat(4, 256px);
  grid-template-rows: repeat(2, 256px);
  width: 1024px;
  height: 512px;
}

.map-tiles img {
  display: block;
  width: 256px;
  height: 256px;
}

.map-marker {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  background: var(--red);
  border: 4px solid var(--white);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(25, 26, 28, 0.3);
  transform: translate(-50%, -100%) rotate(-45deg);
}

.map-marker::after {
  position: absolute;
  inset: 9px;
  content: "";
  background: var(--yellow);
  border-radius: 50%;
}

.map-label {
  position: absolute;
  z-index: 2;
  top: calc(50% + 10px);
  left: 50%;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(25, 26, 28, 0.2);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
  transform: translateX(-50%);
}

.map-attribution {
  position: absolute;
  z-index: 3;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  color: #36393d;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  font-size: 0.68rem;
}

.quote-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: clamp(26px, 6vw, 76px);
  padding: clamp(64px, 9vw, 116px) clamp(18px, 5vw, 72px);
  background: var(--paper);
}

.quote-copy {
  align-self: center;
}

.fine-print {
  font-size: 0.88rem;
}

.quote-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(18px, 4vw, 30px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quote-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid #ccd3df;
  border-radius: 6px;
  font: inherit;
}

.quote-form textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(18px, 5vw, 72px);
  color: var(--ink);
  background: var(--white);
  border-top: 6px solid var(--yellow);
}

.site-footer div {
  display: grid;
  gap: 6px;
}

.footer-brand {
  display: flex !important;
  align-items: center;
  max-width: 650px;
}

.footer-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  background: var(--white);
  border-radius: 6px;
}

.footer-lockup {
  width: 230px;
  height: 58px;
  flex: 0 0 230px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--white);
  border-radius: 6px;
}

.footer-contact {
  text-align: right;
}

.site-footer a {
  color: var(--red);
  font-weight: 750;
}

.site-version {
  margin-top: 4px;
  font-size: 0.72rem;
}

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

  .main-nav {
    position: absolute;
    top: 75px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
  }

  .service-grid,
  .values-grid,
  .portfolio-grid,
  .field-gallery,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps li:nth-child(2) {
    border-right: 0;
  }

  .catalog-layout,
  .coverage,
  .location-section,
  .quote-section {
    grid-template-columns: 1fr;
  }

  .catalog-detail {
    position: static;
  }

  .location-copy {
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .brand small {
    font-size: 0.68rem;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-media {
    background-position: 55% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 62%, rgba(255, 255, 255, 0.46) 100%),
      linear-gradient(0deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.08) 50%);
  }

  .hero-content {
    width: calc(100% - 28px);
    margin: 0 14px 26px;
  }

  .button,
  .nav-cta {
    width: 100%;
    padding-inline: 14px;
  }

  .hero-metrics span {
    width: 100%;
  }

  .trust-strip,
  .service-grid,
  .values-grid,
  .portfolio-grid,
  .field-gallery,
  .steps,
  .quote-form,
  .coverage-panel {
    grid-template-columns: 1fr;
  }

  .steps li,
  .steps li:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .steps li:last-child {
    border-bottom: 0;
  }

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

  .field-card-wide {
    grid-column: auto;
  }

  .site-footer {
    flex-direction: column;
  }

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

  .footer-lockup {
    width: 222px;
    height: 52px;
    flex-basis: 52px;
  }

  .footer-contact {
    text-align: left;
  }

  .map-frame {
    min-height: 360px;
    height: 360px;
  }
}
