/* =========================================================================
   GEM-MARE, S.C. — Hoja de estilos principal
   Identidad 2026: Azul Profundo, Azul Marea y Ámbar Solar sobre Bruma.
   Titulares en Archivo, texto en Manrope, datos en JetBrains Mono.
   ========================================================================= */

:root {
  /* Marca GEM-MARE 2026: los nombres heredados (navy/teal/sand/ink) apuntan a la
     paleta nueva para que todas las reglas existentes cambien de golpe. */
  --profundo: #0B2545;   /* Azul Profundo, principal */
  --abisal: #04121F;     /* fondo oscuro digital */
  --marea: #1FA7C9;      /* Azul Marea */
  --marea-lum: #4FD1E3;  /* Marea sobre fondo oscuro */
  --solar: #F2A93B;      /* Ámbar Solar, acento */
  --solar-lum: #FFB627;  /* Solar sobre fondo oscuro */
  --bruma: #E8EEF4;      /* Gris Bruma, fondos */
  --pizarra: #55677A;    /* Gris Pizarra, texto secundario */
  --grafito: #13202C;    /* texto */
  --litoral: #5E9E3E;    /* verde, solo contexto tierra y estados de éxito */

  --navy-900: var(--abisal);
  --navy-800: var(--profundo);
  --navy-700: #143A63;
  --teal-600: #12758A;
  --teal-500: var(--marea);
  --teal-400: var(--marea-lum);
  --green-600: #2F6B1E;
  --green-500: var(--litoral);
  --sand-50: #F4F7FA;
  --sand-100: var(--bruma);
  --ink-900: var(--grafito);
  --ink-700: #3B4A58;
  --ink-500: var(--pizarra);
  --white: #ffffff;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 6px 18px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 10px 28px rgba(11, 37, 69, 0.10);
  --shadow-lg: 0 20px 50px rgba(11, 37, 69, 0.16);

  --container: 1180px;
  --header-h: 84px;

  --font-head: "Archivo", "Arial Black", "Segoe UI", Arial, sans-serif;
  --font-body: "Manrope", "Segoe UI", Calibri, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-800);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-700); }

ul { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-700);
  background: rgba(11, 37, 69, 0.05);
  border: 1px solid rgba(11, 37, 69, 0.14);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.section-tag.on-dark {
  color: var(--marea-lum);
  background: rgba(79, 209, 227, 0.12);
  border-color: rgba(79, 209, 227, 0.32);
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p.lead { font-size: 1.08rem; color: var(--ink-700); }

/* Sobre fondos oscuros, el lead del section-head necesita texto claro.
   Specificity (3 clases + elemento) a propósito para ganarle a la regla
   de arriba sin usar !important. */
.bg-navy .section-head p.lead,
.dna-section .section-head p.lead { color: rgba(234, 243, 250, 0.85); }

.bg-alt { background: var(--sand-50); }
.bg-navy { background: var(--navy-800); color: var(--sand-100); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: rgba(234, 243, 250, 0.82); }

/* ---------------------------------------------------------------- Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--solar-lum);
  color: var(--abisal);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 182, 39, 0.28);
}
.btn-primary:hover { background: var(--solar); box-shadow: 0 12px 28px rgba(242, 169, 59, 0.36); }

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-800);
}
.btn-outline-dark:hover { background: var(--navy-800); color: var(--white); }

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ------------------------------------------------------------------ Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  /* Nota: a propósito NO usa backdrop-filter/filter/transform. Cualquiera de
     esas propiedades en un ancestro crea un nuevo "containing block" para
     descendientes position:fixed (rompe el menú móvil) y puede generar
     capas de composición que no respetan z-index frente a otros elementos
     fixed (como el lightbox de la galería) en algunos motores. Un fondo
     sólido semitransparente da un resultado visual casi idéntico sin ese
     riesgo. */
  background: rgba(4, 18, 31, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 46px; width: auto; display: block; }
.brand-text { font-family: var(--font-head); line-height: 1.1; }
.brand-text strong { display: block; color: var(--white); font-size: 1.05rem; letter-spacing: 0.02em; }
.brand-text span { display: block; color: var(--teal-400); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.main-nav a.active { background: rgba(245, 247, 250, 0.1); color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Oculto por defecto (incluso en pantallas anchas); la media query de abajo
   lo activa solo en móvil/tablet. Sin esta regla base el panel se renderiza
   como bloque normal dentro del <header> flex y rompe el layout de escritorio. */
.mobile-menu { display: none; }

/* -------------------------------------------------------------------- Hero */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 24, 40, 0.86) 0%, rgba(9, 24, 40, 0.72) 40%, rgba(9, 24, 40, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 120px 0 60px;
}

.hero-eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-400);
  margin-bottom: 20px;
}

.hero h1 { color: var(--white); }
.hero .lead { font-size: 1.15rem; color: rgba(234, 243, 250, 0.88); max-width: 620px; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

.hero-strip {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 56px;
}
.hero-strip .container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-family: var(--font-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: rgba(234, 243, 250, 0.75);
}
.hero-strip .dot { color: var(--teal-400); margin: 0 4px; }

/* -------------------------------------------------------------- Page hero (páginas internas) */

.page-hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  padding: 150px 0 70px;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 158, 213, 0.35), transparent 70%);
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero .lead { max-width: 680px; color: rgba(234, 243, 250, 0.85); font-size: 1.05rem; margin: 0; }
.breadcrumb {
  position: relative; z-index: 2;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------ Cards */

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 31, 51, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 209, 227, 0.14);
  color: var(--teal-600);
  margin-bottom: 20px;
  flex-shrink: 0;
}
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge.green { background: rgba(78, 167, 46, 0.12); color: var(--green-600); }
.icon-badge.navy { background: rgba(14, 40, 65, 0.08); color: var(--navy-800); }
.icon-badge.on-dark { background: rgba(79, 209, 227, 0.16); color: var(--marea-lum); }
.icon-badge.solar { background: rgba(255, 182, 39, 0.18); color: #8A6008; }

.pillar-card { text-align: left; }
.pillar-card .icon-badge { background: rgba(255, 255, 255, 0.12); color: var(--teal-400); }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(10, 31, 51, 0.1);
  color: var(--ink-700);
}
.check-list li:last-child { border-bottom: none; }
.check-list li svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--teal-500); }

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--navy-800);
  border: 1px solid rgba(14, 40, 65, 0.08);
}

/* ------------------------------------------------------------- Value strip */

.value-strip {
  background: var(--navy-800);
  color: var(--sand-100);
  padding: 18px 0;
}
.value-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
.value-strip .sep { color: var(--teal-400); }

/* ----------------------------------------------------------------- Tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tab-btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(14, 40, 65, 0.12);
  background: var(--white);
  color: var(--navy-800);
  cursor: pointer;
  transition: all 0.18s ease;
}
.tab-btn.active, .tab-btn:hover { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.service-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 28px;
}
.service-block .service-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.service-block .service-media img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------------------------------------------------- Timeline */

.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(15, 158, 213, 0.25);
}
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal-500);
  border: 4px solid var(--sand-100);
  box-shadow: 0 0 0 2px rgba(15, 158, 213, 0.3);
}
.timeline-item h4 { margin-bottom: 4px; }
.timeline-year {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal-600);
  margin-bottom: 6px;
}

/* --------------------------------------------------------------- Gallery */

.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--navy-800);
  box-shadow: var(--shadow-sm);
}
.gallery-item img, .gallery-item video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.06); }
.gallery-item .gi-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(9,24,40,0.85), rgba(9,24,40,0) 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; color: var(--white);
}
.gallery-item .gi-cat {
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 4px;
}
.gallery-item .gi-title { font-family: var(--font-head); font-size: 0.92rem; font-weight: 600; }
.gallery-item .gi-play {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(9,24,40,0.65); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.gallery-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(14,40,65,0.2);
  border-radius: var(--radius-md);
  color: var(--ink-500);
}

.lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6, 15, 26, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
  isolation: isolate;
}
.lightbox.open { display: flex; }
.lightbox-box { max-width: 960px; width: 100%; max-height: 85vh; }
.lightbox-box img, .lightbox-box video { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-md); background: #000; }
.lightbox-caption { color: var(--white); font-family: var(--font-head); margin-top: 16px; text-align: center; }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ----------------------------------------------------------------- Forms */

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(14, 40, 65, 0.15);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--ink-900);
  background: var(--sand-50);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(15, 158, 213, 0.14);
  background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form-note { font-size: 0.85rem; color: var(--ink-500); margin-top: 14px; }
.form-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}
.form-alert.success { display: block; background: rgba(78, 167, 46, 0.12); color: var(--green-600); }
.form-alert.error { display: block; background: rgba(217, 60, 60, 0.12); color: #b83232; }

/* ------------------------------------------------------------- Contacto */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info-card {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-info-card h3 { color: var(--white); }
.contact-line { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.contact-line .icon-badge { margin-bottom: 0; }
.contact-line strong { display: block; color: var(--white); font-family: var(--font-head); font-size: 0.95rem; }
.contact-line span, .contact-line a { color: rgba(234, 243, 250, 0.82); font-size: 0.92rem; }
.contact-line a:hover { color: var(--teal-400); }
.social-row { display: flex; gap: 12px; margin-top: 28px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.15s ease;
}
.social-btn:hover { background: var(--teal-500); }
.map-frame { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); margin-top: 26px; border: none; }
.map-frame iframe { width: 100%; height: 260px; border: 0; display: block; }

/* ------------------------------------------------------------------ CTA */

.cta-band {
  background: var(--profundo);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------------------------------------------------------------- Footer */

.site-footer { background: var(--navy-900); color: rgba(234, 243, 250, 0.75); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.footer-brand img { height: 42px; }
.footer-brand strong { color: var(--white); font-family: var(--font-head); font-size: 1.05rem; }
.site-footer h4 { color: var(--white); font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links li { margin-bottom: 10px; list-style: none; }
.footer-links a:hover { color: var(--teal-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(234, 243, 250, 0.55);
}
.footer-bottom a { color: rgba(234, 243, 250, 0.85); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--teal-400); }

/* ------------------------------------------------------------------ Misc */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card { text-align: center; }
.stat-card .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; color: var(--profundo); }
.stat-card .label { font-size: 0.85rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; }

.about-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse { grid-template-columns: 1fr 1fr; }
.split.reverse .split-media { order: 2; }

.dna-section { position: relative; color: var(--white); background: var(--navy-900); overflow: hidden; }
.dna-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.28; }
.dna-section::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,31,51,0.96), rgba(10,31,51,0.75)); }
.dna-section .container { position: relative; z-index: 2; }

.acronym-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
}
.acronym-letter {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--teal-500);
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(15, 158, 213, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* [data-reveal] es visible por defecto: si JS no corre (bloqueado, error,
   navegador antiguo) el contenido nunca queda oculto. Solo cuando main.js
   confirma que el observer quedó armado añade "js-reveal" a <html>, y ahí
   sí se anima de opacidad 0 a 1 al entrar en pantalla. */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js-reveal [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--teal-500); color: var(--white);
  padding: 12px 20px; border-radius: 0 0 10px 0; z-index: 1000;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------------------------------------------------------------- Admin */

.admin-shell { min-height: 100vh; background: var(--sand-50); }
.admin-login { max-width: 420px; margin: 12vh auto; padding: 0 20px; }
.admin-topbar {
  background: var(--navy-800); color: var(--white);
  padding: 18px 0; display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar .container { display: flex; align-items: center; justify-content: space-between; }
.admin-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 30px; padding: 40px 0; }
.upload-list { display: flex; flex-direction: column; gap: 14px; }
.upload-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border-radius: 14px; padding: 14px;
  box-shadow: var(--shadow-sm);
}
.upload-row .thumb { width: 74px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--navy-800); flex-shrink: 0; }
.upload-row .thumb img, .upload-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.upload-row .meta { flex: 1; }
.upload-row .meta strong { display: block; font-family: var(--font-head); font-size: 0.9rem; }
.upload-row .meta span { font-size: 0.78rem; color: var(--ink-500); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: rgba(217, 60, 60, 0.1); color: #b83232;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: rgba(217, 60, 60, 0.2); }

/* ------------------------------------------------------------- Utilidades */

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-500); }

/* ----------------------------------------------------------- Responsivo */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  /* El botón "Contáctanos" del header y el ícono de menú no caben juntos en
     pantallas angostas; el menú móvil ya trae su propio botón de contacto,
     así que en este punto de quiebre solo mostramos el ícono de menú. */
  .header-actions .btn-primary { display: none; }
  .service-block, .split, .contact-grid, .admin-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .form-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .mobile-menu {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 400;
    background: var(--navy-900);
    padding: 20px 24px 40px;
    overflow-y: auto;
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a {
    display: block; font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
    color: var(--white); padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-menu .btn { margin-top: 24px; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 34px; flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; padding-bottom: 30px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding-top: 100px; }
  .form-card, .contact-info-card { padding: 26px; }
}

/* ==========================================================================
   WhatsApp — botón de contacto y burbuja flotante
   Verdes de marca WhatsApp en su versión oscura: el verde brillante (#25D366)
   con glifo blanco da 1.98:1 y no alcanza el mínimo de 3:1 que la WCAG pide
   para gráficos no textuales, así que se usa la familia oscura.
   ========================================================================== */

:root {
  --wa-500: #128c7e;
  --wa-600: #0e7a6e;
  --wa-700: #0b6157;
}

.btn-whatsapp {
  background: var(--wa-600);
  color: var(--white);
}
.btn-whatsapp:hover { background: var(--wa-700); }

.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  /* Debajo del menú móvil (400) y del lightbox (900): no debe taparlos. */
  z-index: 350;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--wa-500);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(10, 31, 51, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.wa-float:hover {
  background: var(--wa-600);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(10, 31, 51, 0.36);
}
.wa-float svg { width: 30px; height: 30px; display: block; }

/* Foco visible: el sitio no tenía ninguno en enlaces ni botones. */
.wa-float:focus-visible,
.btn:focus-visible,
.main-nav a:focus-visible,
.mobile-menu a:focus-visible,
.footer-links a:focus-visible,
.social-btn:focus-visible,
.tab-btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--marea);
  outline-offset: 3px;
  border-radius: 6px;
}
.bg-navy .btn:focus-visible, .site-header .btn:focus-visible, .main-nav a:focus-visible,
.site-footer a:focus-visible, .cta-band .btn:focus-visible { outline-color: var(--solar-lum); }

@media (max-width: 640px) {
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-float svg { width: 27px; height: 27px; }
}

/* ------------------------------------------------- Movimiento reducido */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-float,
  .wa-float:hover,
  .card:hover,
  .gallery-item:hover img { transition: none; transform: none; }
  .tab-panel.active { animation: none; }
}

/* ==========================================================================
   Identidad 2026 — componentes nuevos
   ========================================================================== */


.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 15px;
  background: rgba(79, 209, 227, 0.12);
  border: 1px solid rgba(79, 209, 227, 0.32);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--marea-lum); margin-bottom: 26px;
}
.eyebrow-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--marea-lum); }

.mono-label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--marea-lum);
}

/* ------------------------------------------------------------- Hero partido */

.hero-split {
  position: relative;
  background: var(--abisal);
  color: var(--white);
  padding: 120px 0 72px;
  overflow: hidden;
}
.hero-split::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(56% 46% at 16% 26%, rgba(79, 209, 227, 0.13), rgba(4, 18, 31, 0) 72%);
}
.hero-split .container { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.hero-split h1 { color: var(--white); font-size: clamp(2.4rem, 4.8vw, 4.2rem); line-height: 1; letter-spacing: -0.04em; margin-bottom: 22px; text-wrap: pretty; }
.hero-split .lead { font-size: 1.12rem; line-height: 1.62; color: #A9BDCE; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-stats .stat { display: flex; flex-direction: column; gap: 3px; }
.hero-stats .stat b { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--white); }
.hero-stats .stat span { font-size: 0.82rem; color: #8FA6BA; }
.hero-stats .sep { width: 1px; height: 42px; background: rgba(245, 247, 250, 0.14); }

.hero-media { position: relative; padding-bottom: 130px; }
.hero-media .main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; display: block; }
.hero-media .tag {
  position: absolute; top: 20px; right: 20px;
  display: inline-flex; align-items: center; height: 34px; padding: 0 15px;
  background: rgba(4, 18, 31, 0.74); border: 1px solid rgba(245, 247, 250, 0.22);
  border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--white);
}
.hero-media .inset {
  position: absolute; left: 26px; bottom: 0;
  width: 44%; aspect-ratio: 6 / 5; object-fit: cover;
  border-radius: 16px; border: 5px solid var(--abisal);
}
.hero-media .datacard {
  position: absolute; right: 0; bottom: 18px; width: 48%;
  padding: 18px 20px; box-sizing: border-box;
  background: rgba(10, 30, 48, 0.92); border: 1px solid rgba(245, 247, 250, 0.12);
  border-radius: 16px; display: flex; flex-direction: column; gap: 6px;
}
.hero-media .datacard .mono-label { color: var(--solar-lum); }
.hero-media .datacard strong { font-size: 0.92rem; color: var(--white); }
.hero-media .datacard span { font-size: 0.8rem; color: #8FA6BA; }

/* ------------------------------------------------------------- Alianzas */

.alliance-strip { background: var(--abisal); border-top: 1px solid rgba(245,247,250,0.08); border-bottom: 1px solid rgba(245,247,250,0.08); padding: 28px 0; }
.alliance-strip .container { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.alliance-strip .mono-label { color: #8FA6BA; flex-shrink: 0; }
.alliance-strip ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; flex: 1; min-width: 280px; list-style: none; }
.alliance-strip li {
  height: 52px; display: flex; align-items: center; justify-content: center; padding: 0 14px; text-align: center;
  background: rgba(245,247,250,0.04); border: 1px solid rgba(245,247,250,0.1); border-radius: 12px;
  font-size: 0.86rem; font-weight: 600; color: #D7E2EB;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.alliance-strip li:has(a:hover), .alliance-strip li:has(a:focus-visible) { border-color: var(--marea); background: rgba(31,167,201,0.12); }
.alliance-strip li a { color: inherit; text-decoration: none; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ------------------------------------------------------ Tarjetas oscuras */

.card.dark { background: rgba(245,247,250,0.045); border-color: rgba(245,247,250,0.1); box-shadow: none; }
.card.dark h3, .card.dark h4 { color: var(--white); }
.card.dark p { color: #A9BDCE; }
.card .mono-label { display: block; margin-bottom: 10px; }
.card .mono-label.solar { color: var(--solar-lum); }
.card .card-foot { display: block; margin-top: 18px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: #6E5410; }

/* ------------------------------------------------------ Lista de proyectos */

.project-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.project-list li {
  display: flex; gap: 22px; align-items: center; padding: 17px 20px;
  background: rgba(245,247,250,0.04); border: 1px solid rgba(245,247,250,0.09); border-radius: 14px;
}
.project-list .when { width: 172px; flex-shrink: 0; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--solar-lum); }
.project-list .what { font-size: 0.95rem; line-height: 1.45; color: #E6EDF3; }

.photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.photo-strip img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 14px; }

.value-strip { background: var(--profundo); }
.page-hero { background: var(--abisal); }
.page-hero::after { background: radial-gradient(circle, rgba(79, 209, 227, 0.28), transparent 70%); }
.breadcrumb { font-family: var(--font-mono); letter-spacing: 0.12em; color: #8FA6BA; }
.hero-eyebrow { color: var(--marea-lum); }
.footer-brand img { height: 42px; width: auto; }

@media (max-width: 1080px) {
  .alliance-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .hero-split { padding-top: 96px; }
  .hero-split .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { padding-bottom: 96px; }
  .hero-media .inset { width: 40%; }
  .hero-media .datacard { width: 54%; }
  .project-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .project-list .when { width: auto; }
}
@media (max-width: 640px) {
  .hero-split { padding: 84px 0 56px; }
  .hero-split h1 { font-size: 2.4rem; }
  .hero-media { padding-bottom: 0; }
  .hero-media .inset, .hero-media .datacard { position: static; width: 100%; margin-top: 12px; border: none; }
  .hero-media .datacard { box-sizing: border-box; }
  .hero-stats .sep { display: none; }
  .photo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .alliance-strip ul { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Manual de marca 3.2 · jerarquía web y acabados
   ========================================================================== */

h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 2rem); line-height: 1.15; }
h4 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em; }
.card h4 { font-size: 1.2rem; }
p, li { font-size: 1.02rem; }
.lead { font-size: 1.12rem; }

.page-hero { padding: 140px 0 64px; }
.page-hero::after { display: none; }
.page-hero .lead { color: #A9BDCE; }

.value-strip .container { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; }
.value-strip .sep { color: var(--solar-lum); }

.timeline-year, .gallery-item .gi-cat, .badge { font-family: var(--font-mono); letter-spacing: 0.08em; }
.badge { font-size: 0.72rem; font-weight: 500; background: var(--white); }
.timeline::before { background: rgba(31, 167, 201, 0.3); }
.timeline-item::before { background: var(--marea); border-color: var(--bruma); box-shadow: 0 0 0 2px rgba(31, 167, 201, 0.35); }
.check-list li svg { color: var(--marea); }
.tab-btn { border-radius: var(--radius-pill); font-family: var(--font-body); font-weight: 700; }
.tab-btn.active, .tab-btn:hover { background: var(--profundo); border-color: var(--profundo); }
.service-block { border-radius: var(--radius-lg); }

.contact-info-card { background: var(--profundo); }
.contact-line strong { font-family: var(--font-body); }

.site-footer { background: var(--abisal); }
.site-footer h4 { font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; color: #8FA6BA; }
.footer-bottom { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em; }
.footer-bottom a { color: #8FA6BA; text-decoration: underline; text-underline-offset: 3px; }

/* Fichas de proyecto (página Proyectos) */
.project-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(11, 37, 69, 0.06);
  display: flex; flex-direction: column; gap: 10px; min-height: 250px;
}
.project-card.featured { grid-column: span 2; background: var(--profundo); color: var(--white); position: relative; overflow: hidden; }
.project-card.featured h3, .project-card.featured p { color: var(--white); }
.project-card.featured p { color: #D7E2EB; }
.project-card .when { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: #6E5410; }
.project-card.featured .when { color: var(--solar-lum); }
.project-card h3 { font-size: 1.3rem; margin: 0; }
.project-card p { margin: 0; font-size: 0.95rem; color: var(--ink-700); }
.project-card .tags { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.project-card .tags span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--bruma); font-size: 0.76rem; font-weight: 600; color: var(--profundo); }
.project-card.featured .tags span { background: rgba(245,247,250,0.12); color: var(--white); }

.platform-card { background: rgba(245,247,250,0.045); border: 1px solid rgba(245,247,250,0.1); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.platform-card .mono-label { color: var(--solar-lum); }
.platform-card h3 { color: var(--white); margin: 0; }
.platform-card p { color: #A9BDCE; margin: 0; }
.platform-card .partners { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.platform-card .partners span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: rgba(245,247,250,0.08); font-size: 0.76rem; font-weight: 600; color: var(--white); }


@media (max-width: 920px) {
  .project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .project-cards { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }
}
@media (max-width: 640px) {
  .hero-stats { gap: 18px; }
  .hero-stats .stat b { font-size: 1.7rem; }
  .hero-stats .stat span { font-size: 0.74rem; }
}

/* Tarjetas con fotografía (áreas y cursos en inicio) */
.card.card-photo { padding-top: 0; overflow: hidden; }
.card.card-photo .card-img { width: calc(100% + 64px); max-width: none; margin: 0 -32px 22px; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.card.card-photo .icon-badge { margin-top: -4px; }
.service-block .service-media img { aspect-ratio: 4 / 5; }
.service-block .service-media img[height="875"] { aspect-ratio: 16 / 10; }
