/* Archivo generado desde componentes/empresa/docs/marca/css/marca.css: NO editar aquí.
   Ejecutar componentes/empresa/docs/marca/sincronizar_marca.sh --aplicar para actualizar. */

/* Hipódamo — Copyright 2026 Hipódamo
   Hoja de marca común a todas las aplicaciones Hipódamo.
   Fuente: componentes/empresa/docs/marca/css/marca.css
   Las copias en static/marca/ son generadas: NO editar directamente.
   Tras cambiar este archivo: componentes/empresa/docs/marca/sincronizar_marca.sh --aplicar
   Luego confirmar los cambios en el git de cada proyecto afectado. */

/* ── Fuentes autoalojadas (sin peticiones a Google Fonts) ────────────────── */

/* Source Sans 3 — latin-ext (incluye á é í ó ú ü ñ y más) */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fuentes/SourceSans3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fuentes/SourceSans3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Source Sans 3 — latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fuentes/SourceSans3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fuentes/SourceSans3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Source Code Pro 400 — latin-ext */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fuentes/SourceCodePro-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Source Code Pro 400 — latin */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fuentes/SourceCodePro-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Variables de color y tipografía ─────────────────────────────────────── */

:root {
  /* Colores principales de marca */
  --azul-oscuro:   #0F1A4F;  /* Azul noche: titulares, botones al pasar */
  --azul-medio:    #2F48C4;  /* Botones principales, enlaces, foco */
  --azul-claro:    #E3E8FA;  /* Fondo de avisos informativos */
  --gris-carbon:   #3A3F47;  /* Cabecera y pie */
  --naranja-marca: #FF6A13;  /* Naranja Hipódamo: solo acentos, no texto pequeño */
  /* Colores de estado */
  --rojo:          #DC2626;
  --rojo-claro:    #FEE2E2;
  --naranja:       #D97706;
  --naranja-claro: #FEF3C7;
  --verde:         #15803D;
  /* Colores de interfaz */
  --gris-fondo:    #F5F7FA;  /* Fondo de tarjetas y zonas neutras */
  --fondo-pagina:  #ECEEF1;  /* Fondo de página con rejilla */
  --gris-borde:    #D1D5DB;
  --texto:         #1F2937;
  --texto-suave:   #6B7280;
  --blanco:        #FFFFFF;
}

/* ── Reinicio de caja ────────────────────────────────────────────────────── */

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

/* ── Base tipográfica ────────────────────────────────────────────────────── */

/* Escala base: todos los rem dependen de este valor */
html {
  font-size: 120%;
}

body {
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  color: var(--texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Fondo claro con rejilla grafito (web y herramientas) */
  background-color: var(--fondo-pagina);
  background-image:
    linear-gradient(rgba(95, 100, 107, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 100, 107, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
}

code, pre, .codigo {
  font-family: "Source Code Pro", ui-monospace, monospace;
}

/* ── Fondo oscuro del panel de administración ───────────────────────────── */

/* Aplica cuando el <body> lleva la clase tema-admin */
body.tema-admin {
  background-color: var(--azul-oscuro);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Cabecera ────────────────────────────────────────────────────────────── */

header {
  background: var(--gris-carbon);
  color: var(--blanco);
  border-bottom: 3px solid var(--naranja-marca);
}

.cabecera-contenido {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-enlace {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.logo {
  height: 4.5rem;
  width: auto;
  display: block;
}

/* ── Pie ─────────────────────────────────────────────────────────────────── */

footer {
  background: var(--gris-carbon);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* ── Botones base ───────────────────────────────────────────────────────── */

.btn-principal {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--azul-medio);
  color: var(--blanco);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-principal:hover { background: var(--azul-oscuro); }

.btn-principal:focus-visible {
  outline: 2px solid var(--azul-oscuro);
  outline-offset: 2px;
}

.btn-principal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secundario {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--blanco);
  color: var(--texto);
  border: 1px solid var(--gris-borde);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-secundario:hover { background: var(--gris-fondo); }

/* ── Cabecera y pie fijos al desplazar ──────────────────────────────────── */

/* Solo con espacio suficiente: en móvil o pantallas bajas taparían el contenido */
@media (min-width: 769px) and (min-height: 600px) {
  header {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
  }

  /* Los saltos a anclas no quedan bajo la cabecera */
  html {
    scroll-padding-top: 8rem;
    scroll-padding-bottom: 5rem;
  }
}

/* ── Logo reducido en móvil ─────────────────────────────────────────────── */

@media (max-width: 480px) {
  .logo { height: 3.25rem; }
}
