/* Tema oscuro (concepto "Horizonte") — obsidiana con dorado champán.
   Capa opcional: todo va bajo html[data-theme="oscuro"], así que el sitio claro no cambia.
   Se activa con el interruptor flotante Claro / Oscuro (js/theme.js) o con ?tema=oscuro. */

/* ---- Interruptor de tema flotante (abajo a la derecha; visible en ambos temas) ---- */
.theme-switch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  padding: 4px;
  gap: 2px;
  background: rgba(20, 20, 15, 0.92);
  border: 1px solid rgba(216, 190, 140, 0.35);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
.theme-switch button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(246, 242, 234, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.theme-switch button[aria-pressed="true"] {
  background: #d8be8c;
  color: #14140f;
}
/* El interruptor flotante no debe tapar el texto legal del pie */
.site-footer__bottom {
  padding-bottom: 56px;
}

/* ---- Sellos de cobertura: cada tema muestra su versión ---- */
html:not([data-theme="oscuro"]) .coverage__badge--dark,
html[data-theme="oscuro"] .coverage__badge--light {
  display: none;
}

/* ---- Paleta ---- */
html[data-theme="oscuro"] {
  color-scheme: dark;

  --bg: #0b0b09; /* obsidiana */
  --white: #13120e; /* superficies (secciones y tarjetas) */
  --sand: #1c1a14;

  --ink: #f2ecdc; /* texto principal (marfil) */
  --ink-90: #e6dfcc;
  --ink-80: #cfc8b4;
  --muted: #a49d8a;
  --muted-2: #b9b29e;
  --faint: #7d7766;

  --gold: #d3b87f; /* dorado champán */
  --gold-light: #c9ab73;
  --gold-lighter: #e6d2a6;

  --line-soft: rgba(242, 236, 220, 0.08);
  --line: rgba(242, 236, 220, 0.12);
  --line-2: rgba(242, 236, 220, 0.15);
  --line-strong: rgba(242, 236, 220, 0.2);
  --line-strong-2: rgba(242, 236, 220, 0.26);

  --danger: #e2735f;
}

/* ---- Encabezado y navegación ---- */
html[data-theme="oscuro"] .site-header {
  background: rgba(11, 11, 9, 0.9);
  box-shadow: none;
}
html[data-theme="oscuro"] .lang__sep {
  color: rgba(242, 236, 220, 0.25);
}
html[data-theme="oscuro"] .menu-toggle {
  border-color: rgba(242, 236, 220, 0.22);
}
html[data-theme="oscuro"] .drawer__link {
  border-bottom-color: rgba(242, 236, 220, 0.1);
}

/* ---- Botones ---- */
html[data-theme="oscuro"] .btn--dark {
  background: var(--gold-light);
  color: #0b0b09;
}
html[data-theme="oscuro"] .btn--dark:hover {
  background: var(--gold-lighter);
}
html[data-theme="oscuro"] .btn--ghost {
  border-color: rgba(242, 236, 220, 0.3);
}
html[data-theme="oscuro"] .btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
html[data-theme="oscuro"] .btn--gold {
  color: #0b0b09;
}

/* ---- Secciones que en el tema claro eran oscuras (ahora se distinguen del fondo) ---- */
html[data-theme="oscuro"] .hero,
html[data-theme="oscuro"] .mtl-hero {
  background: #060605;
}
html[data-theme="oscuro"] .mtl-hero__title {
  color: var(--ink);
}
html[data-theme="oscuro"] .about-hero {
  background: #100f0b;
  color: var(--ink);
}
html[data-theme="oscuro"] .welcome {
  background: #15130e;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
html[data-theme="oscuro"] .site-footer {
  background: #060605;
  border-top: 1px solid var(--line);
}
html[data-theme="oscuro"] .site-footer__social a {
  border-color: rgba(242, 236, 220, 0.24);
}

/* ---- Fondos con textura: en negro, plano ---- */
html[data-theme="oscuro"] .stats,
html[data-theme="oscuro"] .industries {
  background-image: none;
  background-color: var(--bg);
}

/* ---- Carrusel, huecos de imagen ---- */
html[data-theme="oscuro"] .hero__dot {
  background: rgba(242, 236, 220, 0.25);
}
html[data-theme="oscuro"] .hero__dot:hover {
  background: rgba(242, 236, 220, 0.45);
}
html[data-theme="oscuro"] .media:empty::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 46%);
}

/* ---- Formularios ---- */
html[data-theme="oscuro"] .form__track {
  background: rgba(242, 236, 220, 0.12);
}
html[data-theme="oscuro"] .field input,
html[data-theme="oscuro"] .field select,
html[data-theme="oscuro"] .field textarea {
  color: var(--ink);
}
html[data-theme="oscuro"] .inquiry__opt {
  border-color: rgba(242, 236, 220, 0.18);
}
html[data-theme="oscuro"] .inquiry__opt:has(input:checked) {
  background: rgba(201, 171, 115, 0.1);
}
html[data-theme="oscuro"] .inquiry__dot {
  border-color: rgba(242, 236, 220, 0.35);
}
html[data-theme="oscuro"] .chip {
  border-color: rgba(242, 236, 220, 0.22);
}
html[data-theme="oscuro"] .chip:has(input:checked),
html[data-theme="oscuro"] .chip.is-active {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #0b0b09;
}

