/* ========================================
   INDEPAR - Chrome del sitio (nav + footer) para páginas de molde standalone
   Extraído de styles.v5.css (secciones NAVIGATION, FOOTER, body offset y
   sus reglas responsive) para las calculadoras: solo selectores de clase
   más el offset del body — cero colisión con los estilos propios del molde.
   Única adaptación: los font-stacks usan los fallbacks del molde
   (Merriweather,Georgia,serif · Inter,-apple-system,...) del molde. Desde
   IND-0096 las calculadoras sí cargan Inter y Merriweather de Google Fonts;
   los fallbacks quedan para cuando la fuente no llegue.
   Si el nav o el footer cambian en styles.v5.css, regenera este archivo.
   Excepción deliberada (IND-0096): la regla global :focus-visible (contorno de
   2 px, solo teclado) también vale dentro del molde; los focos propios de la
   calculadora tienen más especificidad y siguen mandando.
   ======================================== */

:root {
  /* Paleta completa del logo, guinda como acento (docs/identidad/sistema-visual.md v1.0, IND-0100) */
  --marca: #6E3A46;
  --marca-oscuro: #55303A;
  --marca-profundo: #432830;
  --superficie-oscura: #2B2627;
  --superficie-oscura-2: #3A3334;
  --acento: #C1A38D;
  --acento-texto: #965A4E;
  --acento-claro: #DFB090;
  --rosa: #C08375;
  --gris-1: #888787;
  --gris-2: #4B4A4A;
  --fondo-alt: #F7F1EC;
  --fondo-alt-2: #EEEAE7;
  --linea: #E5DCD6;
  --texto: #3D3436;
  --texto-2: #6B6164;
  --blanco: #FFFFFF;
  --foco: var(--marca);
  --marca-rgb: 110 58 70;
  --marca-oscuro-rgb: 85 48 58;
  --superficie-oscura-rgb: 43 38 39;
  --acento-rgb: 193 163 141;
  --acento-claro-rgb: 223 176 144;
  /* Alias de los nombres anteriores: mismo nombre, valor nuevo.
     Desde IND-0100 --navy es el carbón de titulares y superficies (no la marca) */
  --navy: var(--texto);
  --navy-dark: var(--superficie-oscura);
  --gold: var(--acento);
  --gold-light: var(--acento-claro);
  --bg-alt: var(--fondo-alt);
  --text-primary: var(--texto);
  --text-secondary: var(--texto-2);
  --white: var(--blanco);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
  --max-width: 1140px;
}

/* Enlaces del chrome (equivalente scoped del a{} global de styles.v5.css) */
.nav a,
.footer a {
  color: inherit;
  text-decoration: none;
}

.nav img,
.footer img {
  max-width: 100%;
  display: block;
}

/* IND-0096: foco visible discreto, solo con teclado (:focus-visible no se activa con ratón ni dedo).
   Las reglas de foco propias de cada componente siguen mandando por especificidad. */
:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 2px;
}

/* IND-0100: sobre superficies oscuras (carbón) el foco usa durazno: vino sobre carbón no llega a 3:1 */
.hero :focus-visible,
.page-hero :focus-visible,
.home-cierre :focus-visible,
.footer :focus-visible {
  outline-color: var(--acento-claro);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: Merriweather, Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.nav__brand img {
  height: 44px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  display: inline-flex; /* IND-0096: área de toque ≥44 px */
  align-items: center;
  min-height: 44px;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 3px; /* IND-0096: misma posición visual del subrayado con el alto de 44 px */
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--marca);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

/* Enlace destacado del journey (IND-0022) */
.nav__link--featured {
  color: var(--marca);
  font-weight: 600;
}

.nav__link--featured::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.45rem;
  transform: translateY(-1px);
}

.nav__mobile a.nav__link--featured-mobile {
  color: var(--marca);
  font-weight: 600;
}

.nav__mobile a.nav__link--featured-mobile::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  transform: translateY(-1px);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  min-width: 44px; /* IND-0096: área de toque ≥44 px; el ícono no se mueve */
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
  border-radius: 1px;
}

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 2rem 1.5rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--transition), transform var(--transition);
}

.nav__mobile.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.nav__mobile a {
  display: block;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--bg-alt);
  text-decoration: none;
}

.nav__mobile a:hover,
.nav__mobile a.nav__link--active {
  color: var(--acento-texto);
}

/* Hamburger active state */
.nav__hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Body offset for fixed nav */
body {
  padding-top: 72px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  border-top: 3px solid var(--gold);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer__brand img {
  height: 48px;
  width: auto;
}

.footer__brand span {
  font-family: Merriweather, Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

/* Pie: palabra de marca en lugar de la ilustración (fondo oscuro; IND-0083) */
.footer__wordmark {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--acento-claro);
}

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.footer__title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--acento-claro);
  margin: 0 0 1.25rem;
}

.footer__links a {
  display: flex; /* IND-0096: área de toque ≥44 px */
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5); /* IND-0096: 0.4 → 0.5, contraste 3.6 → 4.9:1 */
}

/* ========================================
   RESPONSIVE (solo reglas del chrome)
   ======================================== */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}
