*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0f14;
  --bg-raise: #11161c;
  --bg-raise2: #161d25;
  --teal: #5aa9ae;
  --teal-dim: #3f7e83;
  --teal-wash: rgba(90, 169, 174, 0.1);
  --ink: #eef1f2;
  --slate: #8c98a1;
  --slate-dim: #525e67;
  --line: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.04);
  --font-display: "Cormorant Garamond", serif;
  --font-body: "DM Sans", sans-serif;
  --ease: 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(
      ellipse 80% 50% at 50% -10%,
      rgba(90, 169, 174, 0.07),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 100% 100%,
      rgba(90, 169, 174, 0.04),
      transparent
    );
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 6%;
  background: rgba(11, 15, 20, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-logo img {
  height: 64px;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
}

/* CTA: contorno fino, mayúsculas amplias — lenguaje de consultora */
.nav-cta {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-soft);
  padding: 0.6rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color var(--ease),
    color var(--ease),
    background var(--ease);
}
.nav-cta:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-wash);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--slate);
  font-size: 1.4rem; 
  transition: color var(--ease);
}

.hamburger:hover {
  color: var(--teal);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: rgba(11, 15, 20, 0.98);
  padding: 2.4rem 6%;
  border-bottom: 1px solid var(--line);
  z-index: 99;
  flex-direction: column;
  gap: 1.4rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  color: var(--slate);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  transition: color var(--ease);
}
.mobile-menu a:hover {
  color: var(--teal);
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* Mejor centrado para videos */
  filter: saturate(0.85) brightness(0.95);
  pointer-events: none; /* Evita que el usuario pause el video por error al hacer clic */
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(11, 15, 20, 0.55) 0%,
      rgba(11, 15, 20, 0.15) 45%,
      transparent 75%
    ),
    linear-gradient(
      to bottom,
      rgba(11, 15, 20, 0.35) 0%,
      rgba(11, 15, 20, 0.6) 45%,
      rgba(11, 15, 20, 0.97) 88%,
      var(--bg) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 6% 8rem;
  max-width: 980px;
}

/* Kicker editorial generado vía CSS, sin tocar el HTML */
.hero-content::before {
  content: "ClearComex Consulting — Santiago de Chile";
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 2rem;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 2.2rem;
  max-width: 18ch;
}

.hero-content h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
}

.hero-sub {
  font-size: 1rem;
  color: var(--slate);
  max-width: 480px;
  line-height: 1.85;
  margin-bottom: 3rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* CTA principal — sólido, máximo contraste */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--teal);
  color: #08120f;
  padding: 1rem 2.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background var(--ease),
    transform var(--ease),
    letter-spacing var(--ease);
}
.btn-primary:hover {
  background: #6fc0c5;
  transform: translateY(-2px);
  letter-spacing: 0.24em;
}

/* Secundario — discreto, solo texto subrayado */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--line-soft);
  padding: 1rem 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    border-color var(--ease),
    color var(--ease),
    gap var(--ease);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  gap: 1rem;
}

/* ── SECCIÓN BASE ── */
section {
  padding: 8.5rem 6%;
  position: relative;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.4rem;
  font-weight: 400;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
  max-width: 16ch;
}

.section-body {
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 300;
  max-width: 540px;
  line-height: 1.9;
  margin-bottom: 5rem;
}

/* ── NOSOTROS ── */
#nosotros {
  background: var(--bg-raise);
}

.nosotros-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 5rem;
  align-items: center;
  max-width: 1000px;
}

.nosotros-img-wrapper {
  position: relative;
  padding-right: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Efecto decorativo detrás de la imagen */
.nosotros-img-wrapper::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80%;
  height: 80%;
  border: 1px solid var(--teal);
  z-index: 1;
}

.nosotros-img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  z-index: 2;
  filter: grayscale(100%) contrast(1.1);
  transition:
    filter var(--ease),
    transform var(--ease);
}

.nosotros-img:hover {
  filter: grayscale(0%);
  transform: translate(-4px, -4px);
}

.nosotros-content .section-body {
  margin-bottom: 0;
}

.nosotros-stats {
  display: flex;
  gap: 3.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-desc {
  font-size: 0.72rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* ── QUÉ HACEMOS — formato editorial numerado ── */
#que-hacemos {
  background: var(--bg);
}

.que-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 1000px;
  counter-reset: que;
  border-top: 1px solid var(--line);
}

.que-item {
  position: relative;
  padding: 2.8rem 3rem 2.8rem 4.6rem;
  border-bottom: 1px solid var(--line);
  transition: background var(--ease);
  counter-increment: que;
}

.que-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.que-item::before {
  content: "0" counter(que);
  position: absolute;
  left: 0;
  top: 2.8rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--teal);
  line-height: 1;
}

.que-icon {
  display: none;
}

.que-item h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.que-item p {
  font-size: 0.86rem;
  color: var(--slate);
  line-height: 1.85;
  max-width: 32ch;
}

/* ── SERVICIOS ── */
#servicios {
  background: var(--bg-raise);
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.servicio-card {
  background: var(--bg-raise);
  padding: 3.2rem 2.6rem;
  display: flex;
  flex-direction: column;
  transition:
    background var(--ease),
    box-shadow var(--ease);
}

.servicio-card:hover {
  background: var(--bg-raise2);
  box-shadow: inset 0 2px 0 0 var(--teal);
}

/* Placa oscura que enmarca el logo */
.servicio-logo {
  width: 180px;        /* Controlamos el tamaño por el ancho para logos horizontales */
  height: auto;        /* El alto se ajusta solo proporcionalmente */
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.5rem; /* Reducimos drásticamente el espacio para compensar el aire de la imagen */
  background: transparent;
  padding: 0;
  filter: none;
  opacity: 1;
}
.servicio-slug {
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.8rem;
}

.servicio-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  max-width: 22ch;
}

.servicio-card p {
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.85;
  flex: 1;
  margin-bottom: 2.2rem;
}

/* ── FORMULARIO SERVICIOS ── */
.servicio-form {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.servicio-form input,
.servicio-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  padding: 0.6rem 0;
  outline: none;
  transition: border-color var(--ease);
  resize: none;
}

.servicio-form input::placeholder,
.servicio-form textarea::placeholder {
  color: var(--slate-dim);
}

.servicio-form input:focus,
.servicio-form textarea:focus {
  border-color: var(--teal);
}

.servicio-form textarea {
  height: 64px;
}

.servicio-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal-dim);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease);
  width: 100%;
  margin-top: 0.6rem;
}

.servicio-form button:hover {
  background: var(--teal);
  color: #08120f;
  border-color: var(--teal);
}

/* ── DIFERENCIADORES — lista editorial ── */
#diferenciadores {
  background: var(--bg);
}

.dif-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 980px;
  border-top: 1px solid var(--line);
}

.dif-item {
  background: transparent;
  padding: 2.4rem 0;
  display: grid;
  grid-template-columns: 5rem 1fr 2fr;
  gap: 2rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  transition: background var(--ease);
}

.dif-item:hover {
  background: rgba(255, 255, 255, 0.012);
}

.dif-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0;
}

.dif-item h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.dif-item p {
  font-size: 0.84rem;
  color: var(--slate);
  line-height: 1.85;
}

/* ── CONTACTO ── */
#contacto {
  background: var(--bg-raise);
}

.contacto-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6rem;
  align-items: end;
  max-width: 1000px;
}

.contacto-left .section-body {
  margin-bottom: 0;
}

.contacto-items {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-top: 2.6rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
}

.contacto-item {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-size: 0.88rem;
  color: var(--slate);
}

.contacto-item i {
  display: none;
}

.contacto-item a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 2px;
  transition:
    color var(--ease),
    border-color var(--ease);
}
.contacto-item a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.contacto-right {
  padding-top: 0;
}

.contacto-box {
  background: transparent;
  border: 1px solid var(--line);
  padding: 3rem;
}

.contacto-box p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 2.4rem;
}

/* CTA WhatsApp — mismo lenguaje del botón principal */
.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: var(--teal);
  color: #08120f;
  padding: 1rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background var(--ease),
    letter-spacing var(--ease);
  width: 100%;
}
.btn-wa:hover {
  background: #6fc0c5;
  letter-spacing: 0.24em;
}

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 2.8rem 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer img {
  height: 64px;
  opacity: 0.5;
}

footer p {
  font-size: 0.7rem;
  color: var(--slate-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── RESPONSIVE TABLETS ── */
@media (max-width: 900px) {
  .nosotros-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .nosotros-img-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }
  .nosotros-stats {
    gap: 2rem;
  }
  .servicios-grid {
    grid-template-columns: 1fr;
  }
  .que-grid {
    grid-template-columns: 1fr;
  }
  .que-item:nth-child(odd) {
    border-right: none;
  }
  .dif-item {
    grid-template-columns: 3.5rem 1fr;
  }
  .dif-item p {
    grid-column: 2;
  }
  .contacto-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}

/* ── RESPONSIVE MÓVILES ── */
@media (max-width: 640px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  section {
    padding: 5.5rem 6%;
  }
  .hero-content::before {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
  }
  .hero-sub {
    padding-left: 1rem;
  }
  .nav-logo img { 
    height: 60px; 
  }
  nav { 
    padding: 0.8rem 6%; 
  }
  .hero-content {
    padding-top: 2rem;
  }
  .hero-video {
    /* 50% es el centro. Usa 10% o 20% para mover a la izquierda, y 80% o 90% para la derecha */
    object-position: 75% center; 
  }
}