:root {
  --bg: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #dbe3ee;
  --panel: #f6f8fb;
  --dark: #0f172a;
  --dark-2: #172033;
  --blue: #2563eb;
  --blue-2: #0ea5e9;
  --accent: #d6ecff;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px clamp(20px, 4vw, 54px);
  color: #fff;
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled {
  padding-block: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

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

.brand-icon {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
}

.brand-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  margin: auto 0;
  transition: opacity 180ms ease;
}

.brand-text {
  display: grid;
  width: 184px;
  line-height: 1;
}

.brand-text strong {
  color: currentColor;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transform: scaleX(1.2);
  transform-origin: left center;
}

.brand-text small {
  margin-top: 5px;
  color: currentColor;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.brand-logo-dark {
  opacity: 0;
}

.site-header.is-scrolled .brand-logo-light {
  opacity: 0;
}

.site-header.is-scrolled .brand-logo-dark {
  opacity: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  opacity: 0.82;
}

.nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: currentColor;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 12, 24, 0.94) 0%, rgba(15, 23, 42, 0.78) 43%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 96px);
  padding-top: 132px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9bd7ff;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.hero-metrics,
.service-grid,
.group-grid {
  display: flex;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 58px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 4px;
  font-weight: 700;
}

.button.primary {
  background: #fff;
  color: #0f172a;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
}

.hero-metrics {
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
}

.hero-metrics div {
  min-width: 150px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero-metrics dt {
  font-size: 32px;
  font-weight: 800;
}

.hero-metrics dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.section-heading {
  max-width: 820px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  gap: 58px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.intro > p {
  color: var(--muted);
  font-size: 19px;
}

.services {
  padding-bottom: 74px;
}

.service-grid,
.group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.service-card,
.group-grid article {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-card {
  min-height: 270px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.service-card:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: #bfd7ff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.service-card p,
.group-grid p,
.process span,
.contact-content p {
  color: var(--muted);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-bottom: 28px;
}

.icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  opacity: 0.26;
  filter: grayscale(1) saturate(0.35) blur(0.35px);
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.service-card:hover .icon img {
  opacity: 1;
  filter: grayscale(0) saturate(1.15) blur(0);
  transform: translateY(-2px) scale(1.04);
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.75fr);
  gap: 42px;
  align-items: center;
  padding: 76px clamp(20px, 7vw, 96px);
  background: var(--dark);
  color: #fff;
}

.feature-band p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 20px;
}

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

.timeline li {
  position: relative;
  min-height: 210px;
  padding: 30px;
  background: #fff;
}

.timeline li + li {
  border-left: 1px solid var(--line);
}

.process-icon {
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 26px;
  object-fit: contain;
}

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

.timeline strong {
  margin-bottom: 10px;
  font-size: 19px;
}

.group {
  padding-top: 74px;
}

.group-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.markets {
  padding-top: 0;
}

.markets-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 46px;
  background: linear-gradient(135deg, #f7fbff, #eef4fb);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.market-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.market-list li {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dark-2);
  font-weight: 700;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 54px;
  align-items: center;
  padding: 92px clamp(20px, 7vw, 96px);
  background: #eef4fb;
}

.contact-content {
  max-width: 760px;
}

.contact-card {
  display: grid;
  gap: 16px;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-card strong {
  font-size: 22px;
}

.contact-card address {
  color: var(--muted);
  font-style: normal;
}

.contact-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.contact-item svg {
  display: block;
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  margin-top: 2px;
  color: var(--blue);
  flex: 0 0 20px;
}

.contact-card a {
  color: var(--blue);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.contact-links {
  display: grid;
  gap: 8px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 4vw, 54px);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #fff;
  font-weight: 700;
}

@media (max-width: 980px) {
  .intro,
  .feature-band,
  .markets-panel,
  .contact {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .timeline,
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

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

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 68px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    box-shadow: var(--shadow);
  }

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

  .nav a {
    padding: 14px;
  }

  .hero-content {
    width: min(100% - 32px, 760px);
    margin-inline: 16px;
    padding-top: 104px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(7, 12, 24, 0.94), rgba(15, 23, 42, 0.7));
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-metrics div {
    flex: 1 1 100%;
  }

  .section {
    width: min(100% - 32px, var(--max));
    padding: 70px 0;
  }

  .service-grid,
  .timeline,
  .group-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .timeline li,
  .group-grid article,
  .markets-panel,
  .contact-card {
    padding: 24px;
  }

  .contact {
    padding: 70px 16px;
  }

  .footer {
    flex-direction: column;
  }
}

/* Ajustes de marca y tarjetas regionales */
.brand {
  position: relative;
  width: 245px;
  height: 56px;
}

.brand-image {
  position: absolute;
  inset: 0 auto 0 0;
  width: 190px;
  height: 56px;
  object-fit: contain;
  object-position: left center;
  transition: opacity 180ms ease;
}

.brand-image-dark {
  opacity: 0;
}

.site-header.is-scrolled .brand-image-light {
  opacity: 0;
}

.site-header.is-scrolled .brand-image-dark {
  opacity: 1;
}

.contact {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.8fr);
  gap: 42px;
  align-items: stretch;
}

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

.contact-card.regional-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 390px;
  background: #fff;
}

.regional-card-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 10px;
  background: var(--dark);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.18);
}

.regional-card-brand img {
  width: 152px;
  max-width: none;
  transform: rotate(-90deg);
}

.regional-card-brand span {
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.regional-card-body {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 28px 24px;
}

.regional-card-body h3 {
  margin-bottom: 2px;
  font-size: 24px;
}

.contact-person {
  margin: -4px 0 2px;
  color: var(--muted);
  line-height: 1.4;
}

.regional-card .contact-item {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  color: var(--muted);
  font-size: 14px;
}

.regional-card .contact-item svg {
  width: 21px;
  height: 21px;
  color: var(--blue);
}

.regional-card .contact-item a {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .contact {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .contact-card.regional-card {
    min-height: 350px;
  }
}

@media (max-width: 520px) {
  .brand {
    width: 178px;
    height: 48px;
  }

  .brand-image {
    width: 160px;
    height: 48px;
  }

  .contact-card.regional-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .regional-card-brand img {
    width: 124px;
  }

  .regional-card-body {
    padding: 24px 18px;
  }
}


/* Correcciones solicitadas: logo de cabecera y alineación de tarjetas */
.brand {
  position: relative;
  width: 290px;
  height: 76px;
  flex: 0 0 290px;
}

.brand-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 230px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.brand-tagline {
  position: absolute;
  left: 2px;
  bottom: 0;
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .18em;
  white-space: nowrap;
}

.regional-card-brand {
  position: relative;
  display: block;
  padding: 0;
}

.regional-card-brand img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 172px;
  max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.regional-card-brand span {
  position: absolute;
  top: 50%;
  right: 8px;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  margin: 0;
}

@media (max-width: 520px) {
  .brand {
    width: 220px;
    height: 62px;
    flex-basis: 220px;
  }

  .brand-image {
    width: 185px;
    height: 47px;
  }

  .brand-tagline {
    font-size: 9px;
    letter-spacing: .14em;
  }

  .regional-card-brand img {
    width: 140px;
  }

  .regional-card-brand span {
    right: 5px;
    font-size: 10px;
  }
}
