/* ════════════════════════════════════════════════════════════════
 * TLG · BASE CSS
 * Estilo común a todas las páginas (home, equipo, programas, etc.)
 * Importar como <link rel="stylesheet" href="/tlg-base.css">
 * ════════════════════════════════════════════════════════════════ */

:root {
  --tinta:  #0E0D0B;
  --arena:  #F5F1EB;
  --oro:    #C9A96E;
  --marino: #1A2E42;
  --piedra: #8A8278;
  --hueso:  #E8E2D9;
  --alerta: #B85C5C;
  --cian:   #7BCFCF;
  --borde:  rgba(201,169,110,0.18);
  --mono:   'IBM Plex Mono', 'Courier New', monospace;
  --sans:   'Figtree', sans-serif;
  --serif:  'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  background: var(--tinta);
  color: var(--arena);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(201,169,110,.05) 0%, transparent 45%),
    radial-gradient(circle at 82% 100%, rgba(123,207,207,.03) 0%, transparent 45%);
  background-attachment: fixed;
}
::selection { background: var(--oro); color: var(--tinta); }

/* Hilo dorado vertical de continuidad */
body::before {
  content: ''; position: fixed; left: 40px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent 0%, rgba(201,169,110,0) 5%, rgba(201,169,110,.25) 20%, rgba(201,169,110,.25) 80%, rgba(201,169,110,0) 95%, transparent 100%);
  z-index: 999; pointer-events: none;
}
@media (max-width: 900px) { body::before { display: none; } }

/* Magnetic cursor desactivado — el cursor nativo se mantiene siempre */

/* ── NAV ── */
nav#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 56px;
  transition: padding .3s ease;
  background: transparent;
}
nav#navbar.scrolled { padding: 14px 56px; }
.logo {
  font-family: var(--serif); font-size: 22px; color: var(--arena);
  text-decoration: none; letter-spacing: -0.01em;
}
.logo em { font-style: italic; color: var(--oro); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--arena); text-decoration: none; font-family: var(--mono);
  font-weight: 400; transition: color .25s ease; opacity: .85;
}
.nav-links a:hover, .nav-links a.active { color: var(--oro); opacity: 1; }
.nav-pill {
  font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--tinta); background: var(--oro); padding: 11px 22px;
  border-radius: 999px; text-decoration: none; font-family: var(--mono);
  font-weight: 500; transition: transform .2s ease, background .2s ease;
}
.nav-pill:hover { transform: translateY(-1px); background: #d6b77a; }
@media (max-width: 900px) {
  nav#navbar { padding: 16px 24px; }
  .nav-links {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(14,13,11,.97); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 28px; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 18px; letter-spacing: .12em; }
  .nav-pill { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    width: 30px; height: 24px; justify-content: center; z-index: 101;
    background: none; border: 0; padding: 0;
  }
  .nav-burger span {
    display: block; width: 100%; height: 1.5px; background: var(--arena);
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav-burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger.active span:nth-child(2) { opacity: 0; }
  .nav-burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
@media (min-width: 901px) { .nav-burger { display: none; } }

/* ── REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── PAGE HEADER (común a páginas internas) ── */
.page-hero {
  position: relative; min-height: 70vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 56px 80px; overflow: hidden;
  background: linear-gradient(135deg, var(--tinta) 0%, var(--marino) 100%);
}
.page-hero::before {
  /* Mesh gradient animado */
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(at 20% 30%, rgba(201,169,110,.18) 0px, transparent 50%),
    radial-gradient(at 80% 20%, rgba(26,46,66,.45) 0px, transparent 50%),
    radial-gradient(at 60% 80%, rgba(123,207,207,.10) 0px, transparent 50%);
  animation: meshShift 18s ease-in-out infinite alternate;
}
.page-hero::after {
  /* Scan line + grain */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 48%, rgba(201,169,110,.06) 50%, transparent 52%);
  background-size: 100% 6px;
  animation: scanMove 8s linear infinite;
  mix-blend-mode: overlay;
}
.page-hero > * { position: relative; z-index: 2; }
.page-hero video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: 0;
  transition: opacity 1.5s ease;
}
.page-hero video.loaded { opacity: .35; }
.page-hero .page-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  color: var(--oro); text-transform: uppercase; margin-bottom: 24px;
}
.page-hero h1 {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(48px, 7vw, 88px); line-height: 1.05; letter-spacing: -0.025em;
  max-width: 980px; color: var(--arena);
}
.page-hero h1 em { font-style: italic; color: var(--oro); }
.page-hero p.lead {
  font-family: var(--sans); font-size: 18px; color: rgba(245,241,235,.75);
  max-width: 620px; margin-top: 28px; line-height: 1.65;
}
@media (max-width: 720px) {
  .page-hero { padding: 110px 20px 50px; min-height: 50vh; }
  .page-hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .page-hero p.lead { font-size: 16px; }
  .crumb { font-size: 10px; margin-bottom: 20px; }
}

/* ── BREADCRUMB ── */
.crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  color: var(--piedra); text-transform: uppercase; margin-bottom: 32px;
}
.crumb a { color: var(--piedra); text-decoration: none; }
.crumb a:hover { color: var(--oro); }
.crumb span { color: var(--oro); margin: 0 8px; }

/* ── FOOTER (común) ── */
footer.tlg-footer {
  background: var(--tinta); border-top: 1px solid var(--borde);
  padding: 80px 56px 32px; color: var(--piedra); font-size: 14px;
}
.tlg-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: 1280px; margin: 0 auto;
}
.tlg-footer h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--oro); margin-bottom: 18px;
}
.tlg-footer ul { list-style: none; }
.tlg-footer li { margin-bottom: 10px; }
.tlg-footer a { color: var(--piedra); text-decoration: none; transition: color .2s ease; }
.tlg-footer a:hover { color: var(--arena); }
.tlg-footer-bottom {
  max-width: 1280px; margin: 56px auto 0; padding-top: 32px;
  border-top: 1px solid var(--borde); display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--piedra);
}
@media (max-width: 720px) {
  .tlg-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  footer.tlg-footer { padding: 60px 24px 24px; }
  .tlg-footer-bottom { flex-direction: column; gap: 12px; }
}

/* ── BUTTONS comunes ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--oro); color: var(--tinta);
  padding: 18px 32px; border: none; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); background: #d6b77a; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: var(--arena);
  padding: 18px 32px; border: 1px solid var(--borde); border-radius: 999px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.btn-ghost:hover { border-color: var(--oro); color: var(--oro); }

/* ── HUD CARDS ── */
.hud-card {
  background: rgba(245,241,235,.02);
  border: 1px solid var(--borde);
  border-radius: 6px; padding: 36px;
  position: relative; transition: border-color .3s ease, transform .3s ease;
}
.hud-card:hover { border-color: var(--oro); transform: translateY(-4px); }
.hud-card::before, .hud-card::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--oro); opacity: .6;
}
.hud-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ── Page content wrapper ── */
.page-content {
  max-width: 1180px; margin: 0 auto; padding: 100px 56px;
}
@media (max-width: 720px) {
  .page-content { padding: 60px 20px; }
  .hud-card { padding: 28px 24px; }
  .hud-card h2, .hud-card h3 { font-size: 24px !important; }
  /* Grids 2-columnas → 1 columna */
  .page-content section > div[style*="grid-template-columns:1fr 1.4fr"],
  .page-content section > div[style*="grid-template-columns:1.4fr 1fr"],
  .page-content section > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Timeline en proceso.html (ya tiene su propia rule, esto es backup) */
  .timeline-step { gap: 20px !important; }
  /* Stats 3-columnas → 1 columna */
  div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}
