/* ===========================================================
   biomás · consultoría ambiental — Design tokens
   Paleta tomada directamente del logo: negro tinta + verde
   biomás (#6BAF3E). El verde brillante del logo se reserva para
   gráficos, 3D y realces; para botones y texto se usa una versión
   más oscura que sí pasa contraste AA. Light por defecto, dark
   soportado vía prefers-color-scheme.
   =========================================================== */
:root {
  /* --- colores de marca (del logo) --- */
  --lime: #6baf3e;         /* verde exacto del logo: gráficos y realces */
  --lime-bright: #7fc94b;  /* variante luminosa para 3D / glow */
  --ink: #141414;          /* negro del logo */

  --bg: #f8f9f6;
  --bg-alt: #eef1e9;
  --surface: #ffffff;
  --border: #e2e6dc;
  --text: #141414;
  --text-muted: #555c4e;

  --accent: #4c8429;       /* verde oscuro: botones/enlaces (AA) */
  --accent-dark: #3a681e;
  --accent-soft: #eaf4e2;
  --accent-contrast: #ffffff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.06), 0 1px 1px rgba(20, 20, 20, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(20, 20, 20, 0.18);

  --font-display: "Nunito", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --nav-h: 72px;
  --container: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lime: #7fc94b;
    --lime-bright: #97e05f;
    --ink: #f2f5ee;

    --bg: #0e1109;
    --bg-alt: #141810;
    --surface: #171c12;
    --border: #2a3122;
    --text: #eef2e7;
    --text-muted: #a3ab97;

    --accent: #7fc94b;
    --accent-dark: #6baf3e;
    --accent-soft: #1b2615;
    --accent-contrast: #0b1006;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.55);
  }
}

/* Alias: el resto de la hoja usaba --clay como segundo color.
   Ahora ese rol lo cumple el verde brillante del logo, para que
   toda la página hable el idioma de la marca. */
:root {
  --clay: var(--lime);
  --clay-dark: var(--accent-dark);
  --clay-soft: var(--accent-soft);
  --clay-contrast: #10240a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  /* Sin esto el navegador pinta el texto de los <button> en su color
     por defecto (casi negro), que en modo oscuro queda ilegible. */
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-actions .btn-primary {
    padding: 10px 18px;
    font-size: 0.88rem;
  }
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  background: var(--bg);
  padding: 28px 24px;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Section scaffolding ---------- */
section {
  position: relative;
}

.section-pad {
  padding: 96px 0;
}

@media (max-width: 720px) {
  .section-pad {
    padding: 64px 0;
  }
}

.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 88px;
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 940px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero {
    padding-top: 40px;
    min-height: auto;
  }
}

/* En celular el hero medía 1.7 pantallas: la foto vertical 4:5 se
   comía media pantalla y los 3 datos iban uno debajo del otro.
   Foto apaisada + datos en fila = el hero entra casi completo. */
@media (max-width: 640px) {
  .hero {
    padding: 28px 0 48px;
  }
  .hero .container {
    gap: 28px;
  }
  .hero-visual {
    aspect-ratio: 16 / 11;
  }
  .hero-copy .lede {
    margin-top: 14px;
    font-size: 1rem;
  }
  .hero-actions {
    margin-top: 24px;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 140px;
  }
  /* Dos columnas, no tres: en 360px cada celda quedaba en 85px y
     palabras como "Instrumentos" no entraban, desbordando la página. */
  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 28px;
    gap: 16px 14px;
  }
  .hero-meta div {
    min-width: 0;
    padding-left: 10px;
    overflow-wrap: anywhere;
  }
  .hero-meta strong {
    font-size: 0.95rem;
  }
  .hero-meta span {
    font-size: 0.76rem;
  }
  .hero-badge {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    padding: 11px 14px;
    font-size: 0.78rem;
  }
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 700;
  max-width: 15ch;
}

.hero-copy .lede {
  margin-top: 20px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 44px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-meta div {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.hero-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.hero-meta span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-md);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 17, 9, 0.55) 100%);
}

.hero-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  background: rgba(17, 21, 13, 0.72);
  color: #fff;
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  max-width: 260px;
}

.hero-badge svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Logo strip ---------- */
.sectors-strip {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sectors-strip .container {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.sectors-strip-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sector-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--surface);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.25s ease;
}

.service-card:hover {
  background: var(--accent-soft);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- About / split ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 940px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.about-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 18px;
}

.about-copy > p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 54ch;
  margin-bottom: 30px;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.about-value {
  border-top: 3px solid var(--border);
  padding-top: 14px;
}

.about-value h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.about-value p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Lista de tipos de monitoreo ---------- */
.tipos-wrap {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

@media (max-width: 560px) {
  .tipos-wrap {
    padding: 24px 20px;
  }
}

.tipos-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.tipos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 28px;
}

@media (max-width: 860px) {
  .tipos-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .tipos-list {
    grid-template-columns: 1fr;
  }
}

.tipos-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tipos-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lime);
}

/* ---------- Cifras (contadores animados) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 56px;
}

@media (max-width: 820px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stat {
  background: var(--surface);
  padding: 30px 24px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Por qué elegirnos ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 820px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.why-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 16px 0 8px;
}

.why-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.why-card:nth-child(even) .service-icon {
  background: var(--accent-soft);
  color: var(--lime);
}

/* ---------- Clientes ---------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .clients-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .clients-grid {
    grid-template-columns: 1fr;
  }
}

.client-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease;
}

.client-card:hover {
  border-color: var(--lime);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* El lienzo del logo va siempre en blanco: muchos logos vienen con
   fondo blanco y en modo oscuro quedarían recortados en un cuadro. */
.client-card img {
  width: 100%;
  aspect-ratio: 420 / 220;
  object-fit: contain;
  background: #fff;
  display: block;
}

.client-card figcaption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
}

.client-card figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--text);
}

.client-card figcaption span {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ---------- Process (full width, breaks zigzag pattern) ---------- */
.process {
  background: var(--accent-dark);
  color: #fff;
}

.process .section-head h2,
.process .eyebrow {
  color: #fff;
}

.process .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .process-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .process-row {
    grid-template-columns: 1fr;
  }
}

.process-step {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 18px;
}

.process-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 940px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Los hijos de un grid no encogen por debajo de su contenido salvo
   que se les diga explícitamente. Sin esto, un solo elemento ancho
   adentro estira toda la sección y rompe el ancho de la página. */
.contact-grid > *,
.about-grid > *,
.hero .container > * {
  min-width: 0;
}

.contact-info h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 44ch;
}

.contact-line {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.contact-line:last-of-type {
  border-bottom: 1px solid var(--border);
}

.contact-line svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-line strong {
  display: block;
  font-size: 0.92rem;
}

.contact-line span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
  .contact-form {
    padding: 24px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field-error {
  font-size: 0.8rem;
  color: #c14646;
  min-height: 1em;
}

.form-status {
  margin-top: 4px;
  font-size: 0.9rem;
  min-height: 1.3em;
}

.form-status.is-success {
  color: var(--accent);
  font-weight: 600;
}

.form-status.is-error {
  color: #c14646;
  font-weight: 600;
}

.contact-form button[type="submit"] {
  width: 100%;
  margin-top: 4px;
}

.contact-form button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.85fr 0.85fr;
  gap: 40px;
  padding-bottom: 40px;
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-legal {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-legal p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 90ch;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.92rem;
  padding: 6px 0;
  color: var(--text);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ---------- Reveal on scroll ----------
   El CSS deja el contenido VISIBLE siempre. Quien lo esconde por un
   instante para animarlo es GSAP (con estilos inline). Así, si GSAP
   falla o no carga, la página se ve completa igual: nunca quedan
   secciones en blanco. */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Service card icon micro-interaction ---------- */
.service-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--accent);
  color: var(--accent-contrast);
}

.service-card:nth-child(even) .service-icon {
  background: var(--clay-soft);
  color: var(--clay);
}

.service-card:nth-child(even):hover .service-icon {
  background: var(--clay);
  color: var(--clay-contrast);
}

.sector-pill:nth-child(even) i {
  color: var(--clay);
}

.hero-meta div:nth-child(even) {
  border-left-color: var(--clay);
}

.about-value:nth-child(odd) {
  border-top-color: var(--accent);
}

.about-value:nth-child(even) {
  border-top-color: var(--clay);
}

.gallery-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  background: rgba(69, 163, 116, 0.9);
  color: #fff;
}

.gallery-card:nth-child(even) .gallery-tag {
  background: rgba(221, 154, 84, 0.95);
  color: #241a0e;
}

/* ---------- Gallery: trabajo en campo ---------- */
.gallery-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

@media (max-width: 640px) {
  .gallery-scroller {
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

.gallery-card {
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 13, 7, 0.78) 100%);
  pointer-events: none;
}

.gallery-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.gallery-caption .gallery-tag {
  display: inline-flex;
}

.gallery-caption .gallery-detail {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.gallery-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gallery-hint i {
  font-size: 1rem;
}

/* ---------- Contact form: multi-step wizard ---------- */
.form-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.form-step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-step-dot .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.form-step-dot.is-active .num,
.form-step-dot.is-done .num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.form-step-dot.is-active {
  color: var(--text);
}

.form-step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* En pantallas muy angostas (320px) los rótulos "Servicio / Sobre ti
   / Contacto" no dejaban encoger el formulario y empujaban toda la
   sección fuera del ancho. Se quedan solo los círculos numerados. */
@media (max-width: 430px) {
  .form-step-dot {
    font-size: 0;
    gap: 0;
  }
  .form-step-dot .num {
    font-size: 0.78rem;
  }
  .form-steps {
    gap: 10px;
  }
}

.step-panel {
  display: none;
}

.step-panel.is-active {
  display: block;
  animation: stepIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-panel.is-active {
    animation: none;
  }
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.step-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.option-card:hover {
  border-color: var(--accent);
}

.option-card:active {
  transform: scale(0.98);
}

.option-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-card .icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.option-card.is-selected .icon {
  background: var(--accent);
  color: var(--accent-contrast);
}

.option-card .label {
  font-size: 0.9rem;
  font-weight: 700;
}

.option-card .check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s ease;
}

.option-card.is-selected .check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.conditional-field {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 10px;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.conditional-field.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.conditional-field > .field {
  overflow: hidden;
  min-height: 0;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.form-nav .btn {
  flex: 1;
}

.form-nav.is-first .btn-ghost {
  visibility: hidden;
}

/* ===========================================================
   LOGOTIPO biomás — reconstruido en texto para poder animarlo
   letra por letra (un PNG no se puede animar así).
   "bio" en negro tinta + "más" en verde de marca.
   =========================================================== */
.logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 900;
  /* Agrandado a pedido del cliente: la marca tiene que leerse de
     lejos en la barra superior. */
  font-size: 2rem;
  letter-spacing: -0.035em;
  display: flex;
  color: var(--ink);
  white-space: nowrap;
}

.logo-word .lime {
  color: var(--lime);
}

.logo-word span {
  display: inline-block;
}

.logo-tag {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
}

/* En celular el descriptor del logo quedaba en 7px (ilegible).
   En la barra superior se oculta y queda solo la marca; en el
   preloader y el footer sí hay espacio, ahí se mantiene. */
@media (max-width: 560px) {
  .nav .logo-tag {
    display: none;
  }
  .nav .logo-word {
    font-size: 1.7rem;
  }
}

@media (max-width: 380px) {
  .nav .logo-word {
    font-size: 1.5rem;
  }
}

.footer .logo-tag,
.pl-logo .logo-tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

/* En superficies oscuras (footer 3D, preloader) el "bio" va claro */
.on-dark .logo-word {
  color: #f4f7f0;
}

.on-dark .logo-tag {
  color: rgba(244, 247, 240, 0.55);
}

/* ===========================================================
   PRELOADER — secuencia de entrada (contador + cortina)
   =========================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #050805;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preloader.is-done {
  pointer-events: none;
}

.pl-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 0 24px;
  text-align: center;
}

/* El logo del preloader es el mismo lockup, a gran escala */
.pl-logo .logo-word {
  font-size: clamp(2.6rem, 11vw, 6rem);
  overflow: hidden;
}

.pl-logo .logo-word span {
  transform: translateY(115%);
}

.pl-logo .logo-tag {
  font-size: clamp(0.52rem, 1.6vw, 0.78rem);
  letter-spacing: 0.34em;
  margin-top: 10px;
  opacity: 0;
  align-self: center;
}

/* Línea que se dibuja bajo el logo */
.pl-rule {
  width: min(320px, 62vw);
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  margin-top: 4px;
}

.pl-counter {
  position: absolute;
  right: 30px;
  bottom: 26px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: rgba(240, 244, 239, 0.14);
  font-variant-numeric: tabular-nums;
}

.pl-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.pl-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1f6e4c, #45a374, #dd9a54);
}

/* Cortina: paneles que suben al terminar */
.pl-panels {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.pl-panel {
  background: #050805;
  transform-origin: top center;
}

body.is-loading {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .preloader {
    display: none;
  }
  .pl-word span {
    transform: none;
  }
}

/* ===========================================================
   TEXT REVEAL — líneas enmascaradas
   =========================================================== */
.line-mask {
  display: block;
  overflow: hidden;
}

.line-mask > span {
  display: block;
  will-change: transform;
}

/* ===========================================================
   GALERÍA WEBGL — planos curvados por velocidad de scroll
   =========================================================== */
.webgl-gallery {
  position: relative;
  background: #050805;
}

.wg-sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}

.wg-sticky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Poster detrás del canvas: una foto de campo desenfocada y muy
   apagada. Da fondo cinematográfico y garantiza que la sección
   nunca se vea como un rectángulo negro si WebGL falla o tarda. */
.wg-poster {
  position: absolute;
  /* Se agranda con inset negativo (no con scale): el scale seguía
     contando en el ancho del documento y generaba scroll lateral
     en celular, aunque visualmente estuviera recortado. */
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(18px) saturate(0.7);
  z-index: 0;
}

.webgl-gallery.is-fallback .wg-poster {
  display: none;
}

.wg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 64px);
  z-index: 2;
}

/* Velo oscuro arriba y abajo: las fotos 3D pasan por detrás del
   título y del pie, y sin esto el texto se perdía sobre la imagen. */
.wg-overlay::before,
.wg-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: -1;
}

.wg-overlay::before {
  top: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(4, 7, 4, 0.9) 0%, rgba(4, 7, 4, 0.55) 45%, transparent 100%);
}

.wg-overlay::after {
  bottom: 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(4, 7, 4, 0.92) 0%, rgba(4, 7, 4, 0.5) 50%, transparent 100%);
}

.wg-head h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  font-weight: 700;
  max-width: 16ch;
  line-height: 1.05;
}

.wg-head p {
  color: rgba(240, 244, 239, 0.72);
  font-size: 0.95rem;
  /* Angosto a propósito: la foto 3D entra por la derecha y antes se
     montaba encima de la última palabra de esta línea. */
  max-width: 30ch;
  margin-top: 12px;
}

.wg-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.wg-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: #fff;
}

.wg-index {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.wg-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
}

.wg-info span {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: rgba(240, 244, 239, 0.6);
}

.wg-progress {
  width: min(280px, 40vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.wg-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--clay));
}

/* Overlay de la galería en celular: el título y el pie competían
   por el mismo espacio sobre la foto. Se achica y se aprieta. */
@media (max-width: 640px) {
  .wg-overlay {
    padding: 22px 18px 26px;
  }
  .wg-head h2 {
    font-size: 1.5rem;
    max-width: 14ch;
  }
  .wg-head p {
    font-size: 0.85rem;
    margin-top: 8px;
  }
  .wg-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .wg-index {
    font-size: 1.8rem;
  }
  .wg-info strong {
    font-size: 0.98rem;
  }
  .wg-info span {
    font-size: 0.78rem;
  }
  .wg-progress {
    width: 100%;
  }
}

.wg-fallback {
  display: none;
}

.webgl-gallery.is-fallback .wg-sticky canvas {
  display: none;
}

.webgl-gallery.is-fallback .wg-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 96px 24px;
  align-items: center;
}

.webgl-gallery.is-fallback .wg-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  scroll-snap-align: center;
}

/* ---------- Red de monitoreo 3D (WebGL) ---------- */
.network {
  position: relative;
  min-height: 90dvh;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #10241a 0%, #050805 60%, #030403 100%);
  display: flex;
  align-items: flex-end;
}

.network-stage {
  position: absolute;
  inset: 0;
}

.network-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.network-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.net-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -130%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(6, 12, 8, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  color: #eef4ee;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.net-label.is-visible {
  opacity: 1;
}

/* En pantallas chicas las etiquetas se amontonan sobre el terreno:
   se ocultan y la información queda en el texto de la sección. */
@media (max-width: 760px) {
  .net-label {
    display: none;
  }
}

.net-label .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* Igual que en la galería: foto de fondo apagada para que el
   terreno 3D nunca aparezca sobre un vacío negro. */
.network-stage {
  overflow: hidden;
}

.network-fallback {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
  /* La foto va escalada 1.08 para tapar el desenfoque de los bordes;
     sin este recorte se salía del ancho y creaba scroll horizontal. */
  overflow: hidden;
}

.network-fallback img {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(14px) saturate(0.6);
}

.network.is-fallback .network-fallback img {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  filter: none;
}

.network-stage canvas {
  z-index: 1;
}

.network.is-fallback canvas,
.network.is-fallback .network-labels {
  display: none;
}

.network-copy {
  position: relative;
  z-index: 2;
  padding: 56px 24px 64px;
  background: linear-gradient(0deg, rgba(3, 4, 3, 0.88) 0%, rgba(3, 4, 3, 0.4) 60%, transparent 100%);
  width: 100%;
}

.network-copy h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  max-width: 18ch;
  margin-bottom: 14px;
}

.network-copy p {
  color: rgba(238, 244, 238, 0.72);
  font-size: 1rem;
  max-width: 52ch;
}

@media (max-width: 720px) {
  .network {
    min-height: 78dvh;
  }
}

/* ---------- Tilt 3D (gallery / servicios) ---------- */
.gallery-card,
.service-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}

.wa-float:hover {
  transform: scale(1.06);
}

.wa-float svg {
  width: 26px;
  height: 26px;
}
