:root {
  --navy: #082b63;
  --blue: #114989;
  --blue-2: #0f66ba;
  --teal: #0aa5a8;
  --green: #46b86f;
  --ink: #101827;
  --muted: #667085;
  --line: #dce5ee;
  --paper: #f5f8fb;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(8, 43, 99, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(8,43,99,0.08);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 38px rgba(8,43,99,0.14);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 118px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.nav a:hover { color: var(--blue); }

.header-cta,
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.header-cta {
  background: var(--blue);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

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

.hero-media {
  background-image: url("../img/hero-residuos.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 31, 74, 0.94), rgba(8, 43, 99, 0.72) 48%, rgba(8, 43, 99, 0.28)),
    linear-gradient(180deg, rgba(8,43,99,0.24), rgba(8,43,99,0.74));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: 106px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: #9be7d0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 720px;
  color: rgba(255,255,255,0.78);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.6;
}

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

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

.btn.primary:hover { background: #2e9f57; }

.btn.secondary {
  border: 1px solid rgba(255,255,255,0.34);
  color: var(--white);
}

.btn.secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

.hero-panel {
  width: min(520px, 100%);
  margin-top: 46px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
}

.hero-panel strong {
  display: block;
  font-size: 18px;
}

.hero-panel span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.74);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(70px, 8vw, 108px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 54px;
  align-items: end;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

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

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(8,43,99,0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(8,43,99,0.13);
}

.service-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.service-card div {
  min-height: 226px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.service-grid span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--teal);
  font-weight: 900;
}

.service-card h3 {
  min-height: 46px;
  font-size: 17px;
  line-height: 1.32;
}

.service-card a {
  margin-top: auto;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}

.service-grid p,
.process p,
.proof p,
.contact p,
.legal-page p {
  color: var(--muted);
  line-height: 1.72;
}

.process {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  gap: 12px;
}

.steps div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 16px;
  padding: 20px;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.steps span {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #9be7d0;
  font-weight: 900;
}

.steps p {
  margin-bottom: 0;
  color: rgba(255,255,255,0.72);
}

.infrastructure {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 34px;
  align-items: start;
  padding-top: 0;
}

.infra-copy {
  position: sticky;
  top: 104px;
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(8,43,99,0.08);
}

.infra-copy p,
.infra-card p {
  color: var(--muted);
  line-height: 1.72;
}

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

.infra-visual {
  grid-column: 1 / -1;
  min-height: 280px;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 16px 44px rgba(8,43,99,0.12);
}

.infra-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: block;
  object-fit: cover;
}

.infra-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(8,43,99,0.82));
}

.infra-visual figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  z-index: 1;
  max-width: 620px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.infra-card {
  min-height: 260px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(8,43,99,0.08);
}

.infra-card.featured {
  grid-row: span 2;
  background:
    linear-gradient(135deg, rgba(70,184,111,0.18), transparent 48%),
    var(--navy);
  color: var(--white);
}

.infra-card span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.infra-card.featured span {
  color: #9be7d0;
}

.infra-card.featured p,
.infra-card.featured li {
  color: rgba(255,255,255,0.76);
}

.infra-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.infra-card li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.infra-card li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.proof {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: stretch;
}

.coverage {
  border-top: 1px solid var(--line);
}

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

.location-grid article {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(8,43,99,0.08);
}

.location-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.location-grid strong {
  color: var(--blue);
  font-size: 22px;
}

.location-grid a {
  color: var(--blue);
  font-weight: 800;
}

.proof-card,
.metrics div {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(8,43,99,0.08);
}

.proof-card {
  padding: clamp(28px, 5vw, 52px);
}

.metrics {
  display: grid;
  gap: 12px;
}

.metrics div {
  padding: 24px;
}

.metrics strong {
  display: block;
  color: var(--blue);
  font-size: 36px;
}

.metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.contact {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 42px;
  align-items: start;
  padding: clamp(34px, 6vw, 62px);
  background:
    linear-gradient(135deg, rgba(70,184,111,0.18), transparent 42%),
    var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.quick-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.quick-actions a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-weight: 800;
}

.quick-actions a:hover { background: var(--green); }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 22px 70px rgba(0,0,0,0.18);
}

.contact-form label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.contact-form textarea { resize: vertical; }

.span-2 { grid-column: 1 / -1; }

.privacy-check {
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: start;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.45;
}

.privacy-check input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.privacy-check a {
  color: var(--blue);
  font-weight: 900;
}

.site-footer {
  width: 100%;
  margin-top: 0;
  background:
    linear-gradient(135deg, rgba(10,165,168,0.12), transparent 42%),
    #071f4a;
  color: rgba(255,255,255,0.68);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(140px, 1fr));
  gap: 28px;
  align-items: start;
  padding: 40px 0;
}

.footer-inner.compact {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer-brand img {
  width: 116px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.96);
}

.legal-header .brand img {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.96);
}

.footer-brand p {
  max-width: 340px;
  margin: 16px 0 0;
  line-height: 1.65;
}

.footer-col {
  display: grid;
  gap: 9px;
}

.footer-col strong {
  color: var(--white);
  font-weight: 900;
}

.footer-col a,
.footer-col span {
  color: rgba(255,255,255,0.7);
}

.footer-col a:hover {
  color: #9be7d0;
}

.legal-body {
  background: var(--paper);
}

.legal-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: var(--navy);
}

.portal-body {
  min-height: 100vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(8,43,99,0.94), rgba(8,43,99,0.68)),
    url("../img/hero-residuos.png") center / cover;
}

.portal-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}

.portal-copy {
  color: var(--white);
}

.portal-copy h1 {
  max-width: 680px;
  font-size: clamp(34px, 4vw, 54px);
}

.portal-copy p {
  max-width: 600px;
  color: rgba(255,255,255,0.74);
  line-height: 1.7;
}

.portal-brand {
  margin-bottom: 34px;
}

.portal-brand img {
  width: 142px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--white);
}

.login-card {
  padding: 28px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(0,0,0,0.24);
}

.login-card h2 {
  margin-bottom: 22px;
  font-size: 28px;
}

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

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.login-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.legal-page {
  width: min(920px, calc(100% - 36px));
  margin: 52px auto;
  padding: clamp(28px, 5vw, 56px);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.legal-page h1 {
  margin-bottom: 22px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.legal-page h2 {
  margin: 30px 0 10px;
  font-size: 18px;
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    padding: 4px 0 2px;
    white-space: nowrap;
  }

  .hero { min-height: auto; }

  .hero-content {
    padding-top: 132px;
    padding-bottom: 70px;
  }

  .section-head,
  .process,
  .infrastructure,
  .proof,
  .contact,
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .infra-copy {
    position: static;
  }

  .service-grid,
  .location-grid,
  .footer-inner,
  .footer-inner.compact {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .brand img { width: 96px; }

  .header-cta { display: none; }

  h1 { font-size: 32px; }

  h2 { font-size: 27px; }

  .service-grid,
  .infra-grid,
  .location-grid,
  .contact-form,
  .footer-inner,
  .footer-inner.compact {
    grid-template-columns: 1fr;
  }

  .span-2 { grid-column: auto; }

  .contact { padding: 26px 18px; }

  .portal-body {
    align-items: start;
    padding: 28px 0;
  }

  .login-card {
    padding: 22px;
  }
}
