/* Diseño limpio inspirado en la referencia, con tonos azules/teal */
:root {
  --bg: #f6f8fa;
  --panel: #ffffff;
  --text: #1f2a37;
  --muted: #5b6b7a;
  --primary: #2d7d88;
  /* teal */
  --primary-600: #256873;
  --primary-100: #e7f3f5;
  --accent: #7cc2cc;
  --shadow: 0 10px 30px rgba(24, 39, 75, 0.1);
  --radius: 14px;
  /* Control del hero */
  --hero-x: 75%;
  --hero-y: center;
  --hero-zoom: 1;
  /* CTA gradient palette */
  --cta-start: #1f9bb5;
  /* teal sky */
  --cta-end: #147a8b;
  /* deep teal */
  --cta-hover: #0f6a79;
  --cta-shadow: 0 10px 18px rgba(20, 122, 139, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid #e9eef2;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text {
  font-weight: 700;
}

.brand-sub {
  grid-column: 2;
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

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

/* Buttons */
.btn {
  display: inline-block;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(92deg, var(--cta-start) 0%, var(--cta-end) 100%);
  background-size: 200% auto;
  box-shadow: var(--cta-shadow);
  transition: background-position .25s ease, transform .08s ease, box-shadow .2s ease, filter .2s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn:hover {
  background-position: right center;
  filter: saturate(1.05);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 6px 12px rgba(20, 122, 139, 0.25);
}

.btn:focus-visible {
  outline: 3px solid rgba(124, 194, 204, 0.5);
  outline-offset: 2px;
}

.btn-small {
  padding: 9px 14px;
  font-size: 14px;
}

.link {
  margin-left: 10px;
  color: var(--primary-600);
  font-weight: 600;
}

/* Optional alternative gradient: use class="btn btn-alt" */
.btn.btn-alt {
  --cta-start: #7c9cf0;
  --cta-end: #5670d7;
  box-shadow: 0 10px 18px rgba(86, 112, 215, .22);
}

/* Hero */
.hero {
  position: relative;
  overflow: visible;
  /* Full viewport height */
  min-height: 100vh;
  /* fallback */
  min-height: 100svh;
  /* better on mobile, if supported */
  display: flex;
  align-items: center;
  padding: 72px 0;
}

/* Capa de imagen y overlay */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-x) var(--hero-y);
  transform: scale(var(--hero-zoom));
  transform-origin: var(--hero-x) var(--hero-y);
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(90deg, rgba(10, 22, 34, 0.55) 0%, rgba(10, 22, 34, 0.35) 35%, rgba(10, 22, 34, 0.10) 60%, rgba(10, 22, 34, 0) 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-copy {
  max-width: 620px;
  color: #fff;
}

.hero-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 14px;
  color: #fff;
  font-weight: 800;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 18px;
  font-size: clamp(16px, 2.4vw, 18px);
}

.trust-bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.trust-bullets li::before {
  content: '✓';
  color: #bfe7ec;
  margin-right: 8px;
}

/* Ocultamos el contenedor de imagen del hero, ya no se usa */
.hero-media {
  display: none;
}

/* Certificaciones */
.certs {
  padding: 28px 0 12px;
}

.cert-gallery {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cert-fig {
  background: var(--panel);
  border: 1px solid #e7edf2;
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  align-content: start;
}

.cert-fig a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

.cert-fig img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform .2s ease;
}

.cert-fig a:hover img {
  transform: scale(1.02);
}

.cert-fig figcaption {
  display: grid;
  gap: 2px;
}

.cert-fig strong {
  font-size: 14px;
}

.cert-fig span {
  color: var(--muted);
  font-size: 12px;
}

.issuer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.issuer img {
  height: 22px;
  width: auto;
  filter: grayscale(.1);
}

.issuer em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

/* Brand strip (logos) as hero */
.brand-strip {
  position: relative;
  min-height: 100vh;
  /* fallback */
  min-height: 100svh;
  /* mobile safe */
  display: flex;
  align-items: center;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(124, 194, 204, .18), transparent 60%),
    radial-gradient(50% 50% at 10% 80%, rgba(45, 125, 136, .10), transparent 60%),
    #ffffff;
  z-index: 2;
}

.brand-strip .container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 3;
}

.brand-lead {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  font-size: clamp(22px, 4.5vw, 36px);
  letter-spacing: .2px;
}

.brand-sublead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 2.6vw, 18px);
}

.brand-logos {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 26px 34px;
  align-items: center;
  width: min(980px, 92vw);
}

.brand-logos li {
  display: grid;
  place-items: center;
  position: relative;
}

.brand-logos img {
  max-height: 150px;
  width: auto;
  height: auto;
  filter: grayscale(1) contrast(.9) opacity(.8);
  transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.brand-logos li:hover img,
.brand-logos li:focus-within img {
  filter: grayscale(.1) opacity(1);
  transform: translateY(-2px);
}

/* Tooltip con el nombre de la empresa al pasar el mouse */
.brand-item::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.brand-item::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.92);
  opacity: 0;
  transition: opacity .2s ease;
}

.brand-item:hover::after,
.brand-item:focus-within::after,
.brand-item:hover::before,
.brand-item:focus-within::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Small metrics under heading */
.brand-metrics {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-weight: 600;
}

.brand-metrics li {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f7f9;
  border: 1px solid #e1eef1;
}

/* Cards */
.intro-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin: 28px auto 8px;
}

/* Título dentro del grid de servicios */
.intro-cards .section-title {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  color: var(--text);
}

/* Servicios a pantalla completa como hero */
#servicios .intro-cards {
  min-height: 100vh;
  /* fallback */
  min-height: 100svh;
  /* mejor en mobile */
  align-content: center;
  /* centra verticalmente el grid */
  padding: 48px 0;
  /* respiro superior/inferior */
}

.card {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  transition: transform .12s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(24, 39, 75, 0.16);
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.card.highlight {
  background: var(--primary-100);
  border: 1px solid #cfe7ea;
}

/* Icono para cada servicio */
.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  color: #0f5b66;
  background: linear-gradient(140deg, #e7f4f7 0%, #d4edf2 100%);
  border: 1px solid #bfe1e8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
  position: relative;
  overflow: hidden;
}

.card-icon::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(191, 225, 232, .7);
}

.card-icon svg {
  display: block;
  width: 42px;
  height: 42px;
  shape-rendering: geometricPrecision;
}

.card-icon svg *,
.card-icon svg {
  vector-effect: non-scaling-stroke;
}

.highlight .card-icon {
  background: linear-gradient(140deg, #eaf7f9 0%, #d7eef2 100%);
  color: #0f5b66;
}

/* Cómo funciona */
.how-it-works {
  padding: 40px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 14px;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--panel);
  padding: 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.step-badge {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.benefits {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.feature-list li::before {
  content: '•';
  color: var(--primary);
  margin-right: 8px;
  font-weight: 700;
}

/* Testimonios */
.testimonials {
  padding: 32px 0;
}

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

.testimonial {
  background: var(--panel);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.testimonial p {
  margin: 0 0 8px;
}

.testimonial footer {
  color: var(--muted);
  font-size: 14px;
}

/* Contacto */
.contact {
  padding: 40px 0 64px;
}

.contact-highlights {
  list-style: none;
  padding: 0;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.contact-form {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #d5dee6;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  color: inherit;
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

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

/* Footer */
.site-footer {
  border-top: 1px solid #e9eef2;
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 14px;
}

.footer-nav a {
  color: inherit;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--primary-600);
}

section {
  height: auto;
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    padding: 56px 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .intro-cards {
    grid-template-columns: 1fr 1fr;
  }

  .testimonial-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {

  /* Servicios: quepa todo, legible y ordenado */
  #servicios .intro-cards {
    min-height: auto;
    padding: 24px 28px;
  }

  #servicios .card {
    padding: 16px;
  }

  #servicios .card-head {
    gap: 12px;
  }

  #servicios .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  #servicios .card-icon svg {
    width: 36px;
    height: 36px;
  }

  #servicios .card h3 {
    font-size: 20px;
  }

  #servicios .card p {
    font-size: 14px;
  }

  #servicios .section-title {
    text-align: center;
    margin-bottom: 8px;
  }

  .brand-lead {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 14px;
  }

  html,
  body {
    width: 100vw;
    overflow-x: hidden;
  }

  .site-header,
  .hero,
  .brand-strip,
  .testimonials,
  .contact,
  .how-it-works {
    max-width: 100vw;
  }

  .container {
    width: 100vw;
    max-width: 100vw;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav a:not(.btn) {
    display: none;
  }

  .intro-cards,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 100svh;
    padding: 32px 0 36px;
  }

  /* foco y zoom para móvil */
  :root {
    --hero-x: 66%;
    --hero-zoom: 1.02;
  }

  /* overlay un poco más fuerte a la izquierda */
  .hero::after {
    background: linear-gradient(90deg, rgba(10, 22, 34, 0.70) 0%, rgba(10, 22, 34, 0.48) 50%, rgba(10, 22, 34, 0.14) 70%, rgba(10, 22, 34, 0) 88%);
  }

  /* Área segura a la derecha para no tapar a Marisol */
  .hero .container {
    width: 100vw;
    max-width: 100vw;
    padding-left: 12px;
    padding-right: min(42vw, 280px);
  }

  .hero .hero-inner {
    margin: 0;
  }

  .hero-copy h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .hero .btn {
    font-size: 16px;
    padding: 12px 16px;
  }

  .brand-sublead {
    text-align: center;
  }

  .brand-logos {
    margin-bottom: 3rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 16px;
    width: 94vw;
  }

  .brand-logos img {
    max-height: 200px;
    max-width: 100%;
    height: auto;
  }

  .brand-metrics {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .cert-gallery {
    grid-template-columns: 1fr 1fr;
  }

  #servicios {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .hero {
    min-height: min(74vh, 560px);
  }

  .hero .container {
    padding-right: clamp(160px, 54vw, 340px);
  }

  .trust-bullets {
    display: none;
  }
}

.hero,
#servicios,
.how-it-works,
.certs,
.testimonials,
.contact {
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
}

/* Centra el contenido dentro del contenedor cuando la sección ocupa 100vh */
.hero>.container,
#servicios>.container,
.how-it-works>.container,
.certs>.container,
.testimonials>.container,
.contact>.container {
  margin-left: auto;
  margin-right: auto;
}

/* Decor sutil para evitar secciones vacías */
.how-it-works::before,
.certs::before,
.testimonials::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(124, 194, 204, .22), rgba(124, 194, 204, 0) 70%);
  filter: blur(6px);
  transform: translate(20%, -10%);
}

.certs::before {
  inset: auto auto -20% -10%;
  transform: translate(-10%, 20%);
}

/* Tipografías de apoyo para subtítulos */
.section-lead {
  color: var(--muted);
  font-size: 18px;
  margin: 6px 0 16px;
}