@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   CV ILUMINACIÓN — DOSSIER CORPORATIVO
   Dirección visual: "Teatro de Luz"
   Oscuridad teatral + focos ámbar + documentos iluminados
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Tipografía — serif editorial para display, grotesca humanista para texto y datos */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Papel y tinta — para páginas A4 */
  --ink: #1a1510;
  --muted: #7c7269;
  --line: #d4cbbf;
  --hairline: #ece5db;
  --paper: #faf6ef;
  --white: #ffffff;
  --lumen: #fffbeb;

  /* Acento principal — latón cálido refinado (luz LED, sin saturación de naranja) */
  --copper: #c9962f;
  --copper-dark: #8f6914;

  /* Acento secundario — luz fría LED técnica */
  --teal: #0ea5e9;

  /* Fondo tonal — tinte ámbar suave */
  --sage: #fef3c7;

  /* Oscuridad total — para callouts y contextos dark */
  --graphite: #120e09;

  /* Entorno: el void donde flotan los documentos */
  --void: #060504;
  --void-mid: #0e0b08;
  --void-card: #161109;

  /* Glows — contenidos: un solo acento sutil, sin neón */
  --glow-amber: rgba(201, 150, 47, 0.20);
  --glow-amber-soft: rgba(201, 150, 47, 0.10);
  --glow-electric: rgba(14, 165, 233, 0.16);

  /* Sistema A4 */
  --page-w: 210mm;
  --page-h: 297mm;
  --safe-bottom: 22mm;
  --shadow:
    0 0 0 1px rgba(201, 150, 47, 0.1),
    0 50px 120px rgba(0, 0, 0, 0.62),
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(201, 150, 47, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ─── CUERPO: entorno oscuro con halo teatral ─── */
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 75% 60% at 50% 35%, rgba(201, 150, 47, 0.07) 0%, transparent 62%),
    radial-gradient(ellipse 110% 75% at 50% -8%, rgba(201, 150, 47, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(14, 165, 233, 0.02) 0%, transparent 50%),
    var(--void);
  font-family: var(--font-body);
  line-height: 1.5;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

/* Sistema tipográfico: serif editorial + sans para información y números */
.topbar,
.brand,
.topnav,
.kicker,
.section-label,
.project-quick-facts,
.technical-grid,
.compact-pills,
.project-pill,
.status,
.metric,
.tile,
.history-table,
.page-footer {
  font-family: var(--font-ui);
}

.project-quick-facts,
.technical-grid,
.metric,
.history-table,
.page-footer {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

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

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

.site-shell {
  min-height: 100vh;
}

/* ─── TOPBAR: barra oscura con glow ámbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(6, 5, 4, 0.94);
  border-bottom: 1px solid rgba(201, 150, 47, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--lumen);
  letter-spacing: 0.01em;
  font-size: 14px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--void);
  background: var(--copper);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px var(--glow-amber), 0 0 30px rgba(201, 150, 47, 0.16);
  flex-shrink: 0;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 251, 235, 0.4);
}

.topnav a {
  padding: 6px 10px;
  border: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--lumen);
  border-color: rgba(201, 150, 47, 0.32);
  background: rgba(201, 150, 47, 0.07);
}

/* ─── CONTENEDOR DE DOCUMENTOS ─── */
.doc-wrap {
  width: min(100%, calc(var(--page-w) + 48px));
  margin: 28px auto 80px;
}

/* ─── PÁGINA A4: documento iluminado flotando en la oscuridad ─── */
.a4-page {
  position: relative;
  width: var(--page-w);
  height: auto;
  min-height: var(--page-h);
  padding: 15mm 16mm var(--safe-bottom);
  margin: 0 auto 28px;
  background:
    linear-gradient(110deg, rgba(201, 150, 47, 0.14) 0%, rgba(201, 150, 47, 0.05) 22%, transparent 52%) 0 0 / 100% 9mm no-repeat,
    var(--paper);
  box-shadow: var(--shadow);
  overflow: visible;
}

/* Borde interior — tono cálido suave */
.a4-page::before {
  content: "";
  position: absolute;
  inset: 9mm;
  border: 0.35mm solid rgba(212, 203, 191, 0.65);
  pointer-events: none;
}

/* Acento lateral — haz de luz ámbar que se convierte en azul frío */
.a4-page::after {
  content: "";
  position: absolute;
  top: 15mm;
  bottom: var(--safe-bottom);
  left: 9mm;
  width: 0.5mm;
  background: linear-gradient(to bottom, var(--copper) 0%, rgba(14, 165, 233, 0.45) 65%, transparent 100%);
  pointer-events: none;
  box-shadow: 0 0 8px var(--glow-amber);
}

/* ─── GRID DE PÁGINA ─── */
.page-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 12mm;
  min-height: 0;
}

.page-grid.single {
  grid-template-columns: 1fr;
}

/* ─── TIPOGRAFÍA ─── */
.kicker {
  margin: 0 0 5mm;
  color: var(--copper);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-ui);
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
  font-weight: 400;
}

h3 {
  margin: 0;
  line-height: 1.1;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 170mm;
  font-size: 52pt;
  font-weight: 500;
}

h2 {
  max-width: 168mm;
  font-size: 29pt;
  font-weight: 500;
}

.lede {
  margin: 7mm 0 0;
  max-width: 158mm;
  color: #2a2018;
  font-family: var(--font-body);
  font-size: 11pt;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.copy {
  margin: 0;
  color: var(--muted);
  font-size: 9.6pt;
  line-height: 1.58;
}

/* ─── HERO (portada) ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7mm;
}

.hero-image {
  height: 92mm;
  overflow: hidden;
  border-radius: 1px;
  position: relative;
}

/* Veladura de luz sobre imagen hero */
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(201, 150, 47, 0.1) 0%,
    transparent 45%,
    rgba(14, 165, 233, 0.05) 100%
  );
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── MÉTRICAS / FOLIO ─── */
.folio {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3.2mm;
  margin-top: 5mm;
}

.metric,
.tile {
  padding: 4.2mm;
  border: 1px solid rgba(212, 203, 191, 0.45);
  background: rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

/* Línea de luz superior en cada métrica */
.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--copper), transparent);
  opacity: 0.55;
}

.metric strong {
  display: block;
  margin-bottom: 1.8mm;
  color: var(--copper-dark);
  font-size: 25pt;
  line-height: 0.95;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.metric span,
.tile span {
  color: var(--muted);
  font-size: 7pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-ui);
}

/* ─── REGLA DECORATIVA ─── */
.rule {
  width: 28mm;
  height: 0.6mm;
  margin: 7mm 0;
  background: linear-gradient(to right, var(--copper), rgba(201, 150, 47, 0.22), transparent);
  box-shadow: 0 0 7px rgba(201, 150, 47, 0.22);
}

/* ─── LISTAS ─── */
.list {
  display: grid;
  gap: 2.4mm;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 2.4mm 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 9.5pt;
  line-height: 1.42;
}

/* ─── PASOS / SERVICIOS / SECTORES ─── */
.numbered {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3mm;
  margin-top: 7mm;
}

.step,
.service,
.sector {
  min-height: 31mm;
  padding: 4mm;
  border: 1px solid rgba(212, 203, 191, 0.55);
  background: rgba(255, 255, 255, 0.48);
  position: relative;
}

/* Acento ámbar superior en pasos y servicios */
.step::before,
.service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10mm;
  height: 0.6mm;
  background: var(--copper);
}

.step b {
  display: block;
  margin-bottom: 4mm;
  color: var(--copper);
  font-size: 8pt;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-family: var(--font-ui);
}

/* ─── SERVICE GRID ─── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3mm;
  margin-top: 7mm;
}

/* ─── SECTOR GRID ─── */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3mm;
  margin-top: 7mm;
}

.sector small {
  display: block;
  margin-top: 2.5mm;
  color: var(--muted);
  font-size: 8.3pt;
  line-height: 1.4;
}

/* ─── NUBE DE CLIENTES (legacy) ─── */
.client-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 2mm;
  margin-top: 6mm;
}

.client-cloud span {
  padding: 1.8mm 2.4mm;
  border: 1px solid rgba(201, 150, 47, 0.2);
  background: rgba(254, 243, 199, 0.38);
  color: var(--ink);
  font-size: 8.5pt;
}

/* ─── GRILLA DE LOGOS DE CLIENTES ─── */
.client-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.2mm;
  margin-top: 0;
}

.logo-cell {
  height: 14mm;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2mm 2.5mm;
  border: 1px solid rgba(212, 203, 191, 0.45);
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.logo-cell img {
  max-width: 100%;
  max-height: 9mm;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%) opacity(0.85);
}

/* Logos blancos: requieren fondo oscuro — chip cálido intencional, no hueco negro */
.logo-cell--dark {
  background: linear-gradient(160deg, #2a2114 0%, #1c160d 100%);
  border-color: rgba(201, 150, 47, 0.35);
}

.logo-cell--dark img {
  filter: none;
}

/* Clientes sin logo: texto compacto */
.logo-cell--text {
  background: rgba(254, 243, 199, 0.3);
  border-color: rgba(201, 150, 47, 0.18);
}

.logo-cell--text span {
  font-size: 6pt;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
}

@media print {
  .logo-cell img {
    filter: grayscale(15%) opacity(0.9);
  }
  .logo-cell--dark {
    background: #1a1410;
  }
}

/* ─── PROYECTO ─── */
.project-page {
  padding-top: 11mm;
}

/* ─── SEGUNDA HOJA: REGISTRO VISUAL ─── */
.project-gallery {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5mm;
  height: calc(297mm - 15mm - var(--safe-bottom));
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6mm;
  padding-bottom: 3mm;
  border-bottom: 1px solid rgba(212, 203, 191, 0.72);
}

.gallery-head .kicker {
  margin: 0;
  color: var(--copper-dark);
}

.gallery-head h2 {
  max-width: 120mm;
  font-size: 20pt;
  line-height: 1;
  text-align: right;
}

.gallery-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 2.6mm;
}

.gallery-grid figure {
  position: relative;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--graphite);
  border: 1px solid rgba(212, 203, 191, 0.55);
}

.gallery-grid figure.gallery-feature {
  grid-column: 1 / -1;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4mm 3mm 2.2mm;
  color: var(--lumen);
  font-family: var(--font-ui);
  font-size: 6.6pt;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(6, 5, 4, 0.82) 0%, rgba(6, 5, 4, 0.32) 55%, transparent 100%);
}

.project-detail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 3.2mm;
  min-height: 0;
}

.project-hero-banner {
  position: relative;
  height: 48mm;
  overflow: hidden;
  background: var(--graphite);
  border: 1px solid rgba(26, 21, 16, 0.12);
}

.project-hero-banner::before {
  display: none;
}

.project-hero-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 0.65mm;
  background: linear-gradient(90deg, var(--copper) 0%, rgba(14, 165, 233, 0.75) 72%, transparent 100%);
  box-shadow: 0 -8px 28px rgba(201, 150, 47, 0.14);
  pointer-events: none;
}

.project-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58mm;
  gap: 5.2mm;
  align-items: end;
  padding-bottom: 3mm;
  border-bottom: 1px solid rgba(212, 203, 191, 0.72);
}

.project-hero-copy .kicker {
  margin-bottom: 1.8mm;
  color: var(--copper-dark);
}

.project-hero-copy h2 {
  max-width: 112mm;
  color: var(--ink);
  font-size: 23pt;
  line-height: 1;
  text-shadow: none;
}

.project-hero-copy p:not(.kicker) {
  margin: 2.4mm 0 0;
  max-width: 112mm;
  color: #3a3028;
  font-family: var(--font-body);
  font-size: 8.8pt;
  font-weight: 400;
  line-height: 1.46;
}

.project-quick-facts {
  display: grid;
  gap: 1.4mm;
}

.project-quick-facts span {
  display: grid;
  grid-template-columns: 19mm minmax(0, 1fr);
  gap: 2mm;
  align-items: center;
  min-height: 6.4mm;
  padding: 1.3mm 2mm;
  border: 1px solid rgba(212, 203, 191, 0.62);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-size: 6.9pt;
  line-height: 1.18;
}

.project-quick-facts b {
  color: var(--copper-dark);
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58mm;
  gap: 5.2mm;
  align-items: start;
}

.project-main-panel,
.project-side-panel {
  min-width: 0;
}

.project-main-panel {
  display: grid;
  gap: 3.2mm;
}

.project-section {
  padding-top: 2.8mm;
  border-top: 1px solid rgba(212, 203, 191, 0.72);
}

.section-label {
  margin: 0 0 2mm;
  color: var(--copper-dark);
  font-size: 6.8pt;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-section .copy {
  font-size: 8.4pt;
  line-height: 1.36;
}

.project-technical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4mm;
  align-items: start;
  padding-top: 0;
  border-top: 0;
}

.project-technical > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5mm;
  padding-bottom: 1.8mm;
  border-bottom: 1px solid rgba(212, 203, 191, 0.72);
}

.project-technical > div:first-child .section-label {
  margin-bottom: 0;
}

.project-technical h3,
.side-panel-head h3 {
  font-family: var(--font-ui);
  font-size: 11.2pt;
  line-height: 1.18;
}

.project-technical h3 {
  max-width: 82mm;
  font-size: 10.6pt;
  text-align: right;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8mm;
}

.technical-grid article {
  min-height: 10.8mm;
  padding: 1.8mm;
  border: 1px solid rgba(212, 203, 191, 0.62);
  background: rgba(255, 255, 255, 0.48);
}

.technical-grid span {
  display: block;
  margin-bottom: 1mm;
  color: var(--copper-dark);
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.technical-grid strong {
  display: block;
  color: var(--ink);
  font-size: 7pt;
  font-weight: 500;
  line-height: 1.22;
}

.project-insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
}

.project-insight-grid .list {
  margin-top: 0;
}

.project-insight-grid .list li {
  font-size: 7.6pt;
  line-height: 1.28;
}

.project-side-panel {
  padding: 3.8mm;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(250, 246, 239, 0.92) 100%);
  border: 1px solid rgba(212, 203, 191, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  color: var(--ink);
}

.side-panel-head {
  padding-bottom: 3.4mm;
  border-bottom: 1px solid rgba(212, 203, 191, 0.72);
}

.side-panel-head .section-label,
.project-side-panel .section-label {
  color: var(--copper-dark);
}

.side-panel-head h3 {
  color: var(--ink);
}

.side-panel-head .status {
  margin-top: 3mm;
  border-left: 0;
  background: rgba(254, 243, 199, 0.62);
  color: var(--ink);
}

.compact-pills,
.project-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8mm;
}

.compact-pills {
  margin-top: 3.2mm;
}

.compact-pills span,
.project-pill {
  display: inline-flex;
  align-items: center;
  min-height: 6.6mm;
  border: 1px solid rgba(212, 203, 191, 0.82);
  background: rgba(255, 255, 255, 0.56);
  color: #2a2018;
  line-height: 1.22;
}

.compact-pills span {
  padding: 1.3mm 2.2mm;
  border-radius: 999px;
  font-size: 6.7pt;
}

.project-pill-group {
  margin-top: 4mm;
}

.project-pill {
  width: 100%;
  padding: 1.55mm 2mm;
  border-radius: 7px;
  border-left: 2px solid rgba(201, 150, 47, 0.72);
  font-size: 6.8pt;
}

.project-side-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2mm;
  margin-top: 3.2mm;
}

.project-side-gallery figure {
  height: 24mm;
  margin: 0;
  overflow: hidden;
}

.project-side-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-dossier-contact {
  position: relative;
  z-index: 2;
  max-width: 72mm;
  margin-top: -15mm;
  padding-top: 3mm;
  border-top: 1px solid rgba(212, 203, 191, 0.72);
}

/* ─── TABLA DE DATOS / LÍNEA DE TIEMPO (quiénes somos, contacto) ─── */
.fact-table {
  width: 100%;
  margin-top: 5mm;
  border-collapse: collapse;
  font-family: var(--font-ui);
}

.fact-table th,
.fact-table td {
  padding: 2.8mm 0;
  border-top: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.fact-table tr:last-child th,
.fact-table tr:last-child td {
  border-bottom: 1px solid var(--hairline);
}

.fact-table th {
  width: 1%;
  padding-right: 6mm;
  white-space: nowrap;
  color: var(--copper-dark);
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.fact-table td {
  color: var(--ink);
  font-size: 8.8pt;
  line-height: 1.42;
}

/* ─── HISTORIAL FORMATO CV — entradas por trabajo ─── */
.cv-list {
  margin-top: 4mm;
  font-family: var(--font-ui);
}

.cv-head,
.cv-entry {
  display: grid;
  grid-template-columns: 13mm minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 4mm;
  align-items: baseline;
}

.cv-head {
  padding-bottom: 2.2mm;
  border-bottom: 1px solid var(--copper-dark);
}

.cv-head span {
  color: var(--copper-dark);
  font-size: 6.6pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-entry {
  padding: 2.1mm 0;
  border-bottom: 1px solid var(--hairline);
}

.cv-year {
  color: var(--copper-dark);
  font-size: 9pt;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.cv-trabajo {
  color: var(--ink);
  font-size: 9pt;
  font-weight: 600;
  line-height: 1.28;
}

.cv-cliente {
  color: var(--muted);
  font-size: 8.2pt;
  line-height: 1.3;
}

.cv-what {
  color: #4a4038;
  font-size: 8.2pt;
  line-height: 1.3;
}

/* ─── TABLA DE HISTORIAL — reglas horizontales, lenguaje editorial ─── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6mm;
  font-family: var(--font-ui);
  font-size: 8.5pt;
}

.history-table th,
.history-table td {
  padding: 3mm 4mm 3mm 0;
  text-align: left;
  vertical-align: top;
}

.history-table thead th {
  padding-top: 0;
  padding-bottom: 2.2mm;
  color: var(--copper-dark);
  font-size: 6.8pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--copper-dark);
}

.history-table tbody td {
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  line-height: 1.42;
}

.history-table tbody td:first-child {
  width: 34mm;
  padding-right: 6mm;
  color: var(--copper-dark);
  font-weight: 600;
}

/* ─── DOS COLUMNAS ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm;
}

/* ─── CALLOUT (caja de énfasis — misma superficie que los demás módulos) ─── */
.callout {
  position: relative;
  padding: 6mm;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(212, 203, 191, 0.55);
  box-shadow: none;
}

/* Acento ámbar superior, como en las tarjetas de diferenciadores y servicios */
.callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8mm;
  height: 0.6mm;
  background: var(--copper);
}

.callout h3 {
  color: var(--copper-dark);
}

.callout .copy {
  color: #3a3028;
}

/* ─── PÁGINA DE PROPUESTA DE VALOR ─── */
.value-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8mm;
}

.value-head {
  max-width: 170mm;
}

.value-head h2 {
  max-width: 150mm;
  font-size: 27pt;
}

.value-head .lede {
  max-width: 150mm;
  font-size: 11.4pt;
}

.value-metrics .folio {
  grid-template-columns: 1.25fr 0.9fr 1.1fr 0.72fr;
  margin-top: 0;
}

.value-metrics .metric {
  min-height: 28mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.value-metrics .metric strong {
  font-size: 16pt;
  line-height: 1.05;
}

.value-body {
  display: grid;
  grid-template-columns: 1fr 52mm;
  gap: 7mm;
  align-items: stretch;
}

.value-differentiators {
  min-width: 0;
}

.value-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
  margin-top: 4mm;
}

.value-list article {
  min-height: 27mm;
  padding: 3.6mm;
  border: 1px solid rgba(212, 203, 191, 0.48);
  background: rgba(255, 255, 255, 0.5);
  position: relative;
}

/* Acento ámbar en tarjetas de diferenciadores */
.value-list article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8mm;
  height: 0.6mm;
  background: var(--copper);
}

.value-list b {
  display: block;
  margin-bottom: 2.5mm;
  color: var(--copper);
  font-size: 7.5pt;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-family: var(--font-ui);
}

.value-list p {
  margin: 0;
  color: var(--ink);
  font-size: 8.8pt;
  line-height: 1.37;
}

.value-callout {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
}

/* ─── HERO ÍNDICE ─── */
.index-hero {
  padding: 14mm;
  color: var(--lumen);
  background:
    linear-gradient(108deg, rgba(6, 5, 4, 0.88), rgba(6, 5, 4, 0.38)),
    var(--cover) center / cover;
  min-height: 148mm;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.index-hero .kicker {
  color: var(--copper);
}

.index-hero h1,
.index-hero h2 {
  color: var(--lumen);
}

.index-panel {
  padding: 9mm;
  background: var(--void-mid);
  border: 1px solid rgba(201, 150, 47, 0.13);
  color: var(--lumen);
}

.index-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 6mm;
  margin-top: 6mm;
}

.nav-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2mm;
  margin-top: 5mm;
}

.nav-list a {
  display: flex;
  justify-content: space-between;
  gap: 4mm;
  padding: 3.5mm 4mm;
  border: 1px solid rgba(201, 150, 47, 0.12);
  background: rgba(255, 251, 235, 0.03);
  color: rgba(255, 251, 235, 0.68);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-list a:hover {
  border-color: rgba(201, 150, 47, 0.42);
  background: rgba(201, 150, 47, 0.07);
  color: var(--lumen);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — SALA DE CONTROL
   ═══════════════════════════════════════════════════════════════ */
.dashboard {
  width: min(1440px, calc(100vw - 36px));
  height: calc(100vh - 96px);
  min-height: 650px;
  margin: 18px auto;
  display: grid;
  grid-template-rows: 148px 86px 1fr;
  gap: 14px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  color: var(--lumen);
  background:
    linear-gradient(108deg, rgba(6, 5, 4, 0.9), rgba(6, 5, 4, 0.44)),
    var(--cover) center 52% / cover;
  border: 1px solid rgba(201, 150, 47, 0.18);
  position: relative;
  overflow: hidden;
}

/* Rayo de luz diagonal en hero del dashboard */
.dashboard-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 30%;
  height: 200%;
  background: linear-gradient(
    108deg,
    transparent 0%,
    rgba(201, 150, 47, 0.045) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* Línea de luz ámbar en borde superior del dashboard-hero */
.dashboard-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 1px;
  background: linear-gradient(to right, var(--copper), transparent);
  opacity: 0.7;
}

.dashboard-hero .kicker {
  color: var(--copper);
  margin-bottom: 6px;
}

.dashboard-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.94;
  color: var(--lumen);
  font-family: var(--font-display);
  font-weight: 500;
}

.dashboard-hero p:not(.kicker) {
  margin: 10px 0 0;
  max-width: 560px;
  color: rgba(255, 251, 235, 0.58);
  font-size: 14.5px;
  line-height: 1.52;
}

.dashboard-cta {
  min-width: 200px;
  padding: 16px 20px;
  background: var(--copper);
  color: var(--void);
  border: none;
  box-shadow: 0 0 22px var(--glow-amber), 0 0 48px rgba(201, 150, 47, 0.14);
  cursor: pointer;
  display: block;
  flex-shrink: 0;
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.dashboard-cta:hover {
  box-shadow: 0 0 36px var(--glow-amber), 0 0 72px rgba(201, 150, 47, 0.2);
  transform: translateY(-2px);
}

.dashboard-cta span {
  display: block;
  color: rgba(6, 5, 4, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--font-ui);
}

.dashboard-cta strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  color: var(--void);
  font-family: var(--font-display);
  font-weight: 400;
}

/* ─── TIRA DE MÉTRICAS ─── */
.dashboard-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dashboard-strip article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--void-card);
  border: 1px solid rgba(201, 150, 47, 0.11);
  position: relative;
  overflow: hidden;
}

/* Línea de luz en borde superior de cada métrica */
.dashboard-strip article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--copper), transparent);
  opacity: 0.45;
}

.dashboard-strip strong {
  color: var(--copper);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.dashboard-strip span {
  color: rgba(255, 251, 235, 0.42);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
}

/* ─── GRID DEL DASHBOARD ─── */
.dashboard-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.dashboard-grid--full {
  grid-template-columns: 1fr;
}

.dashboard-panel {
  min-height: 0;
  padding: 18px;
  background: var(--void-card);
  border: 1px solid rgba(201, 150, 47, 0.09);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head h2 {
  max-width: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--lumen);
  letter-spacing: 0;
}

.panel-head .kicker {
  color: var(--copper);
  margin-bottom: 4px;
}

.panel-head span {
  color: rgba(255, 251, 235, 0.28);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ─── LINKS DE PÁGINAS ─── */
.page-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-grid--full .page-links {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.page-links a {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 5px 10px;
  align-items: start;
  padding: 11px 12px;
  background: rgba(255, 251, 235, 0.02);
  border: 1px solid rgba(201, 150, 47, 0.09);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.page-links a:hover {
  border-color: rgba(201, 150, 47, 0.42);
  transform: translateY(-2px);
  background: rgba(201, 150, 47, 0.055);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32), 0 0 18px rgba(201, 150, 47, 0.07);
}

.page-links small {
  grid-row: 1 / span 2;
  color: var(--copper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.page-links strong {
  color: rgba(255, 251, 235, 0.82);
  font-size: 13px;
  line-height: 1.15;
  font-family: var(--font-ui);
  font-weight: 500;
}

.page-links em {
  align-self: end;
  color: rgba(255, 251, 235, 0.28);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── PANEL OPS ─── */
.ops-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.panel-head.compact {
  margin-bottom: 0;
}

.work-files {
  display: grid;
  gap: 8px;
}

.work-files a {
  display: block;
  padding: 11px 12px;
  background: rgba(255, 251, 235, 0.02);
  border: 1px solid rgba(201, 150, 47, 0.08);
  transition: border-color 160ms ease, background 160ms ease;
}

.work-files a:hover {
  border-color: rgba(201, 150, 47, 0.3);
  background: rgba(201, 150, 47, 0.04);
}

.work-files strong,
.work-files span {
  display: block;
}

.work-files strong {
  font-size: 13px;
  color: rgba(255, 251, 235, 0.8);
  font-weight: 500;
}

.work-files span {
  margin-top: 3px;
  color: rgba(255, 251, 235, 0.32);
  font-size: 11px;
  line-height: 1.35;
}

.ops-note {
  padding: 14px;
  background: rgba(201, 150, 47, 0.07);
  border: 1px solid rgba(201, 150, 47, 0.2);
  border-left: 3px solid var(--copper);
}

.ops-note strong {
  font-size: 13px;
  color: var(--copper);
  font-weight: 600;
}

.ops-note p {
  margin: 7px 0 0;
  color: rgba(255, 251, 235, 0.48);
  font-size: 11.5px;
  line-height: 1.45;
}

/* ─── PIE DE PÁGINA A4 ─── */
.page-footer {
  position: absolute;
  left: 16mm;
  right: 16mm;
  bottom: 12mm;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: rgba(124, 114, 105, 0.65);
  font-size: 7pt;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* ─── BADGE DE ESTATUS ─── */
.status {
  display: inline-block;
  margin-top: 5mm;
  padding: 2mm 2.8mm;
  border-left: 3px solid var(--copper);
  background: var(--sage);
  color: var(--ink);
  font-size: 8.3pt;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════════ */
@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 0 0 14px rgba(201, 150, 47, 0.22);
  }
  50% {
    text-shadow:
      0 0 24px rgba(201, 150, 47, 0.5),
      0 0 44px rgba(201, 150, 47, 0.18);
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Primera pasada (vistas fluidas)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .topbar,
  .index-grid,
  .dashboard-grid,
  .page-grid,
  .project-content,
  .project-technical,
  .project-insight-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .dashboard {
    width: calc(100vw - 24px);
    height: auto;
    min-height: 0;
    grid-template-rows: auto;
  }

  .dashboard-hero {
    display: grid;
  }

  .dashboard-hero h1 {
    font-size: 42px;
  }

  .dashboard-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .topnav {
    justify-content: flex-start;
  }

  .a4-page {
    width: calc(100vw - 24px);
    height: auto;
    min-height: calc((100vw - 24px) * 1.414);
    padding: 30px;
  }

  .a4-page::before {
    inset: 12px;
  }

  .page-grid,
  .project-detail {
    min-height: auto;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 34px;
  }

  .lede {
    font-size: 18px;
  }

  .folio,
  .service-grid,
  .sector-grid,
  .numbered,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .hero-image,
  .project-hero-banner {
    height: 320px;
  }

  .page-footer {
    position: static;
    margin-top: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Segunda pasada (A4 escalado en pantalla pequeña)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .doc-wrap {
    width: var(--screen-doc-width, calc(100vw - 32px));
  }

  .a4-page {
    width: var(--page-w);
    height: var(--page-h);
    min-height: 0;
    padding: 15mm 16mm var(--safe-bottom);
    zoom: var(--screen-scale, 1);
  }

  .page-grid {
    grid-template-columns: 0.92fr 1.08fr;
    min-height: 0;
  }

  .page-grid.single {
    grid-template-columns: 1fr;
  }

  .project-content {
    grid-template-columns: minmax(0, 1fr) 58mm;
  }

  .project-technical {
    grid-template-columns: 36mm minmax(0, 1fr);
  }

  .project-insight-grid,
  .technical-grid {
    grid-template-columns: 1fr 1fr;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .folio {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .sector-grid,
  .numbered,
  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: 54pt;
  }

  h2 {
    font-size: 30pt;
  }

  .lede {
    font-size: 12.2pt;
  }

  .hero-image {
    height: 92mm;
  }

  .project-hero-banner {
    height: 94mm;
  }

  .page-footer {
    position: absolute;
    margin-top: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   IMPRESIÓN — páginas limpias sobre blanco
   ═══════════════════════════════════════════════════════════════ */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body {
    background: var(--white);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar {
    display: none;
  }

  .doc-wrap {
    width: 100%;
    margin: 0;
  }

  .a4-page {
    width: 210mm;
    height: 297mm;
    min-height: 0;
    padding: 15mm 16mm 22mm;
    margin: 0;
    box-shadow: none;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    /* Franja ámbar suave visible en impresión color */
    background:
      linear-gradient(110deg, rgba(200, 140, 0, 0.08) 0%, transparent 35%) 0 0 / 100% 8mm no-repeat,
      var(--white);
  }

  .a4-page::before {
    inset: 8mm 9mm 20mm;
  }

  .a4-page::after {
    box-shadow: none;
  }

  .metric strong {
    text-shadow: none;
  }

  .rule {
    box-shadow: none;
  }

  .metric::before,
  .step::before,
  .service::before,
  .value-list article::before {
    /* Los acentos ámbar se imprimen bien en color */
  }

  .hero-image::after {
    display: none;
  }

  .page-footer {
    bottom: 12mm;
  }

  .a4-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════
   INDEX — TEMA CLARO "GALERÍA DE LUZ"
   Hub corporativo luminoso, elegante y editorial.
   Alcance limitado a body[data-page="index"] — no afecta las hojas A4.
   ═══════════════════════════════════════════════════════════════ */
body[data-page="index"] {
  color: var(--ink);
  background:
    radial-gradient(115% 70% at 50% -12%, rgba(232, 160, 32, 0.16) 0%, rgba(232, 160, 32, 0.05) 30%, transparent 62%),
    radial-gradient(70% 50% at 100% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #fcfaf5 0%, #f3ede2 100%);
  background-attachment: fixed;
}

/* Grano sutil sobre el fondo claro */
body[data-page="index"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ─── Topbar claro ─── */
body[data-page="index"] .topbar {
  background: rgba(252, 250, 245, 0.82);
  border-bottom: 1px solid rgba(184, 118, 18, 0.18);
}

body[data-page="index"] .brand {
  color: var(--ink);
}

body[data-page="index"] .brand-mark {
  color: #fff;
  background: var(--copper);
  box-shadow: 0 2px 12px rgba(232, 160, 32, 0.42);
}

body[data-page="index"] .topnav {
  color: rgba(26, 21, 16, 0.5);
}

body[data-page="index"] .topnav a:hover,
body[data-page="index"] .topnav a.active {
  color: var(--ink);
  border-color: rgba(184, 118, 18, 0.35);
  background: rgba(232, 160, 32, 0.09);
}

/* ─── Contenedor: página editorial, no dashboard fijo ─── */
body[data-page="index"] .dashboard {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 56px));
  height: auto;
  min-height: 0;
  margin: 46px auto 88px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* ─── Hero claro ─── */
body[data-page="index"] .dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding: 4px 0 34px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(184, 118, 18, 0.22);
  color: var(--ink);
  overflow: visible;
}

body[data-page="index"] .dashboard-hero::before,
body[data-page="index"] .dashboard-hero::after {
  display: none;
}

body[data-page="index"] .dashboard-hero .kicker {
  margin-bottom: 14px;
  color: var(--copper-dark);
  animation: idx-rise 0.6s ease both;
}

body[data-page="index"] .dashboard-hero h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(46px, 6.2vw, 88px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.015em;
  animation: idx-rise 0.7s ease both 0.06s;
}

body[data-page="index"] .dashboard-hero p:not(.kicker) {
  margin-top: 16px;
  max-width: 480px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  animation: idx-rise 0.7s ease both 0.12s;
}

/* CTA: joya oscura sobre fondo claro */
body[data-page="index"] .dashboard-cta {
  min-width: 210px;
  padding: 18px 22px;
  background: linear-gradient(150deg, #1c160d 0%, #100c07 100%);
  color: var(--lumen);
  border-radius: 3px;
  box-shadow: 0 14px 34px rgba(26, 21, 16, 0.2), 0 0 0 1px rgba(184, 118, 18, 0.28);
  animation: idx-rise 0.7s ease both 0.18s;
}

body[data-page="index"] .dashboard-cta span {
  color: var(--copper);
}

body[data-page="index"] .dashboard-cta strong {
  color: var(--lumen);
}

body[data-page="index"] .dashboard-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(26, 21, 16, 0.26), 0 0 34px rgba(232, 160, 32, 0.3);
}

/* ─── Tira de estadísticas: tarjetas claras con número serif ─── */
body[data-page="index"] .dashboard-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

body[data-page="index"] .dashboard-strip article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 24px 24px 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(212, 203, 191, 0.6);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(26, 21, 16, 0.03), 0 16px 34px rgba(26, 21, 16, 0.045);
  animation: idx-rise 0.6s ease both 0.2s;
}

body[data-page="index"] .dashboard-strip article::before {
  background: linear-gradient(to right, var(--copper), transparent);
  opacity: 0.75;
}

body[data-page="index"] .dashboard-strip strong {
  color: var(--copper-dark);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  line-height: 0.95;
  text-shadow: none;
  animation: none;
}

body[data-page="index"] .dashboard-strip span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-align: left;
}

/* ─── Panel de páginas ─── */
body[data-page="index"] .dashboard-grid {
  display: block;
}

body[data-page="index"] .dashboard-panel {
  padding: 0;
  background: none;
  border: 0;
  overflow: visible;
}

body[data-page="index"] .panel-head {
  align-items: flex-end;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(212, 203, 191, 0.7);
}

body[data-page="index"] .panel-head .kicker {
  color: var(--copper-dark);
}

body[data-page="index"] .panel-head h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
}

body[data-page="index"] .panel-head span {
  color: var(--muted);
  font-variant-numeric: lining-nums tabular-nums;
}

/* ─── Tarjetas de página ─── */
body[data-page="index"] .page-links {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="index"] .page-links a {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 104px;
  padding: 16px 16px 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(212, 203, 191, 0.6);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(26, 21, 16, 0.03);
  overflow: hidden;
  animation: idx-rise 0.5s ease both;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

/* Línea de luz superior que crece en hover */
body[data-page="index"] .page-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--copper), rgba(232, 160, 32, 0.2));
  transition: right 260ms ease;
}

body[data-page="index"] .page-links a:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 118, 18, 0.5);
  background: #fff;
  box-shadow: 0 18px 36px rgba(26, 21, 16, 0.09), 0 0 24px rgba(232, 160, 32, 0.1);
}

body[data-page="index"] .page-links a:hover::before {
  right: 0;
}

body[data-page="index"] .page-links small {
  color: var(--copper-dark);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

body[data-page="index"] .page-links strong {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.28;
}

body[data-page="index"] .page-links em {
  margin-top: auto;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Stagger de aparición de las tarjetas */
body[data-page="index"] .page-links a:nth-child(1) { animation-delay: 0.24s; }
body[data-page="index"] .page-links a:nth-child(2) { animation-delay: 0.27s; }
body[data-page="index"] .page-links a:nth-child(3) { animation-delay: 0.30s; }
body[data-page="index"] .page-links a:nth-child(4) { animation-delay: 0.33s; }
body[data-page="index"] .page-links a:nth-child(5) { animation-delay: 0.36s; }
body[data-page="index"] .page-links a:nth-child(6) { animation-delay: 0.39s; }
body[data-page="index"] .page-links a:nth-child(7) { animation-delay: 0.42s; }
body[data-page="index"] .page-links a:nth-child(8) { animation-delay: 0.45s; }
body[data-page="index"] .page-links a:nth-child(9) { animation-delay: 0.48s; }
body[data-page="index"] .page-links a:nth-child(10) { animation-delay: 0.51s; }
body[data-page="index"] .page-links a:nth-child(n+11) { animation-delay: 0.54s; }

@keyframes idx-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="index"] .dashboard-hero .kicker,
  body[data-page="index"] .dashboard-hero h1,
  body[data-page="index"] .dashboard-hero p:not(.kicker),
  body[data-page="index"] .dashboard-cta,
  body[data-page="index"] .dashboard-strip article,
  body[data-page="index"] .page-links a {
    animation: none;
  }
}

@media (max-width: 900px) {
  body[data-page="index"] .dashboard {
    width: calc(100vw - 28px);
  }
  body[data-page="index"] .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  body[data-page="index"] .dashboard-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  body[data-page="index"] .page-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   MENÚ DE PÁGINAS EN EL HEADER (desplegable, todas las hojas)
   ═══════════════════════════════════════════════════════════════ */
.page-menu {
  position: relative;
}

.page-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  list-style: none;
  cursor: pointer;
  color: var(--lumen);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid rgba(232, 160, 32, 0.34);
  border-radius: 999px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.page-menu summary::-webkit-details-marker { display: none; }
.page-menu summary::marker { content: ""; }

.page-menu summary:hover,
.page-menu[open] summary {
  border-color: rgba(232, 160, 32, 0.62);
  background: rgba(232, 160, 32, 0.13);
}

.page-menu-bars {
  width: 15px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  flex-shrink: 0;
}

.page-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 346px;
  max-width: calc(100vw - 32px);
  max-height: 76vh;
  overflow-y: auto;
  padding: 12px;
  background: rgba(252, 250, 245, 0.98);
  border: 1px solid rgba(212, 203, 191, 0.85);
  border-radius: 8px;
  box-shadow: 0 28px 66px rgba(10, 8, 4, 0.34), 0 6px 16px rgba(10, 8, 4, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 60;
  animation: pm-drop 180ms ease both;
}

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

.page-menu-head {
  margin: 4px 8px 10px;
  color: var(--copper-dark);
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-menu-list {
  display: grid;
  gap: 2px;
}

.pm-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 8px 9px;
  border-radius: 5px;
  color: var(--ink);
  transition: background 140ms ease;
}

.pm-item:hover { background: rgba(232, 160, 32, 0.1); }
.pm-item.active { background: rgba(232, 160, 32, 0.16); }
.pm-item.active .pm-l { color: var(--copper-dark); }

.pm-n {
  color: var(--copper-dark);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}

.pm-n--sym { font-size: 11px; }

.pm-l {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.22;
}

.pm-t {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* El disparador del menú sobre el header claro del index */
body[data-page="index"] .page-menu summary {
  color: var(--ink);
  border-color: rgba(184, 118, 18, 0.4);
}

body[data-page="index"] .page-menu summary:hover,
body[data-page="index"] .page-menu[open] summary {
  background: rgba(232, 160, 32, 0.12);
  border-color: rgba(184, 118, 18, 0.62);
}
