/* ============================================================
   Photodocumentación · Catastro de daños
   Hoja de estilos principal
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #060b14;
  --bg-2: #0a1524;
  --ink: #0d1a28;
  --ink-soft: #2a3d51;
  --muted: #566b80;
  --paper: #f7f9fc;
  --paper-2: #eef3f9;
  --line: #dbe4ef;
  --line-soft: #e7edf5;
  --accent: #2f6f8f;
  --accent-deep: #1e4f68;
  --damage: #b6543f;
  --damage-soft: #fbe9e4;
  --ok: #2f7f6b;
  --ok-soft: #e2f2ec;
  --hero-ink: #eef5fc;
  --hero-soft: #c3d4e4;
  --radius: 22px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 720px at 82% -8%, rgba(43, 89, 128, 0.55) 0%, rgba(6, 11, 20, 0) 62%),
    radial-gradient(900px 620px at 8% 8%, rgba(28, 62, 92, 0.35) 0%, rgba(6, 11, 20, 0) 58%),
    linear-gradient(180deg, #050a12 0%, #0a1524 46%, #07101d 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

::selection {
  background: rgba(47, 111, 143, 0.25);
}

:focus-visible {
  outline: 3px solid #7fb6d6;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Fondo fijo de lluvia ---------- */
.rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.rain__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.rain::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(5, 9, 16, 0) 34%, rgba(4, 8, 14, 0.55) 100%),
    linear-gradient(180deg, rgba(4, 8, 14, 0.25) 0%, rgba(4, 8, 14, 0) 24%, rgba(4, 8, 14, 0) 76%, rgba(4, 8, 14, 0.55) 100%);
}

.hero,
.topnav,
main,
.site-footer,
.to-top {
  position: relative;
  z-index: 1;
}

/* ---------- Tipografía ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1.05em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 650;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding: 90px 0 70px;
}

.hero__inner {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8fb4d2;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: #8fb4d2;
}

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 7rem);
  line-height: 0.94;
  color: var(--hero-ink);
  text-wrap: balance;
  margin-bottom: 26px;
  text-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero__lede {
  max-width: 58ch;
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.7;
  color: var(--hero-soft);
  margin: 0 0 34px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 0 0 38px;
  padding: 0;
  list-style: none;
}

.hero__stats li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 0 24px;
  color: var(--hero-soft);
  font-size: 0.86rem;
  border-left: 1px solid rgba(197, 218, 236, 0.22);
}

.hero__stats li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero__stats b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--hero-ink);
  letter-spacing: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

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

.btn--primary {
  background: #eaf2fa;
  color: #0b1a28;
  box-shadow: 0 12px 30px rgba(3, 8, 15, 0.45);
}

.btn--primary:hover {
  background: #ffffff;
}

.btn--ghost {
  border-color: rgba(197, 218, 236, 0.34);
  color: #e4eef7;
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  border-color: rgba(197, 218, 236, 0.65);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- Navegación ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 12, 21, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.topnav.is-stuck {
  background: rgba(5, 10, 18, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.nav__inner {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e8f1f9;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(180, 212, 236, 0.4);
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: #cfe3f3;
  background: rgba(255, 255, 255, 0.04);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav__links::-webkit-scrollbar {
  display: none;
}

.nav__links a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  color: #a9c0d4;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav__links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav__links a.is-active {
  color: #0a1724;
  background: #dceaf6;
}

/* ---------- Secciones y paneles ---------- */
.section {
  padding: 34px 0;
}

.section--first {
  padding-top: 54px;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.panel {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4.2vw, 56px);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
}

.section__kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 6px;
}

.section__head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  color: var(--ink);
}

.section__head--stack {
  display: block;
}

.section__head--stack h2 {
  margin-bottom: 12px;
}

.section__intro {
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.lead {
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.68;
  color: var(--ink);
  max-width: 74ch;
}

.body-copy {
  max-width: 74ch;
  color: var(--ink-soft);
}

.body-copy strong {
  color: var(--ink);
}

/* ---------- Resumen ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 34px;
}

.stat {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat--damage b {
  color: var(--damage);
}

.stat--ok b {
  color: var(--ok);
}

.findings {
  margin: 18px 0 30px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.findings li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  max-width: 78ch;
}

.findings li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.findings strong {
  color: var(--ink);
}

.note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 82ch;
}

/* ---------- Tabla ---------- */
.table-wrap {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  padding: 13px 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #f4f8fc;
}

.cell-dept {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-name {
  color: var(--ink-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--damage {
  background: var(--damage-soft);
  color: #8c3527;
}

.badge--ok {
  background: var(--ok-soft);
  color: #1f6b58;
}

/* ---------- Gráfico ---------- */
.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin-top: 30px;
}

.donut {
  width: 100%;
  max-width: 300px;
  height: auto;
  overflow: visible;
}

.donut__track {
  stroke: #e6edf5;
}

.donut__damage {
  stroke: var(--damage);
  stroke-dasharray: 0 515.22;
  animation: draw-damage 1.5s cubic-bezier(0.22, 0.8, 0.24, 1) 0.25s forwards;
}

.donut__ok {
  stroke: var(--ok);
  stroke-dasharray: 0 515.22;
  animation: draw-ok 1.5s cubic-bezier(0.22, 0.8, 0.24, 1) 1.15s forwards;
}

@keyframes draw-damage {
  to {
    stroke-dasharray: 441.62 515.22;
  }
}

@keyframes draw-ok {
  to {
    stroke-dasharray: 73.6 515.22;
    stroke-dashoffset: -441.62;
  }
}

.donut__num {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  fill: var(--ink);
}

.donut__cap {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--muted);
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.legend li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.legend li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.legend__swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--damage);
}

.legend__swatch--ok {
  background: var(--ok);
}

.legend__label {
  font-weight: 600;
  color: var(--ink);
}

.legend__label small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0;
}

.legend__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.legend__value--damage {
  color: var(--damage);
}

.legend__value--ok {
  color: var(--ok);
}

.chart__caption {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 80ch;
}

/* ---------- Detalle por departamento ---------- */
.section--detail .section__head {
  margin-bottom: 26px;
}

/* El título del detalle va sobre el fondo oscuro, no dentro de un panel */
.section--detail .section__head h2 {
  color: var(--hero-ink);
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.section--detail .section__kicker {
  color: #8fb4d2;
}

.dept-list {
  display: grid;
  gap: 26px;
}

.dept {
  scroll-margin-top: 96px;
}

.dept__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.dept__title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  color: var(--ink);
  margin-right: auto;
}

.dept__resident {
  order: 3;
  flex-basis: 100%;
  margin: -8px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.dept__status {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.dept__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.dept__quote {
  margin: 0;
  padding: 20px 22px;
  border-left: 3px solid var(--damage);
  border-radius: 0 14px 14px 0;
  background:
    linear-gradient(90deg, rgba(182, 84, 63, 0.08) 0%, rgba(182, 84, 63, 0.02) 100%);
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 82ch;
}

.dept__empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.dept__media {
  margin-top: 30px;
}

/* Galería de fotografías */
.photo-grid {
  columns: 3 260px;
  column-gap: 14px;
  margin: 0;
}

.photo-grid--1 {
  columns: 1;
  max-width: 680px;
}

.photo-grid--2,
.photo-grid--4 {
  columns: 2 260px;
}

.photo {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #dde6f0;
  overflow: hidden;
  cursor: zoom-in;
  break-inside: avoid;
  box-shadow: 0 2px 10px rgba(13, 26, 40, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 26, 40, 0.18);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.photo:hover img {
  transform: scale(1.015);
  filter: saturate(1.04);
}

/* Videos */
.video-grid {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.video-item {
  margin: 0;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 16 / 9);
  max-height: 78vh;
  border-radius: 14px;
  overflow: hidden;
  background: #04070c;
  box-shadow: 0 18px 40px rgba(4, 9, 16, 0.28);
  isolation: isolate;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #04070c;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-overlay__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(5, 10, 18, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #ffffff;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.video-overlay:hover .video-overlay__icon {
  background: rgba(5, 10, 18, 0.72);
  transform: scale(1.04);
}

.video-overlay svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.video-shell:not(.is-paused) .video-overlay__icon {
  opacity: 0;
  transform: scale(0.9);
}

.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, rgba(3, 6, 11, 0) 0%, rgba(3, 6, 11, 0.86) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-shell:hover .video-controls,
.video-shell:focus-within .video-controls,
.video-shell.is-paused .video-controls {
  opacity: 1;
  transform: none;
}

.v-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.v-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
}

.v-btn:active {
  transform: scale(0.95);
}

.v-btn svg {
  width: 18px;
  height: 18px;
}

.v-btn .icon-pause,
.v-btn .icon-muted {
  display: none;
}

.video-shell:not(.is-paused) .icon-play {
  display: none;
}

.video-shell:not(.is-paused) .icon-pause {
  display: block;
}

.video-shell.is-muted .icon-vol {
  display: none;
}

.video-shell.is-muted .icon-muted {
  display: block;
}

.video-item.is-portrait .video-shell {
  max-width: min(100%, 440px);
  margin-inline: auto;
}

@media (hover: none) {
  .video-controls {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Documentación legal ---------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-card:hover {
  border-color: #b9cbdd;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(13, 26, 40, 0.12);
}

.doc-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e8f1f8;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.doc-card strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.doc-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.doc-card__action {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.download-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid #cfdded;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(47, 111, 143, 0.1) 0%, rgba(47, 111, 143, 0) 70%),
    #eef5fb;
}

.download-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.download-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 52ch;
}

.download-card .btn {
  background: var(--ink);
  color: #f4f8fc;
  box-shadow: 0 12px 26px rgba(13, 26, 40, 0.22);
}

.download-card .btn:hover {
  background: #1b3348;
}

/* ---------- Pie ---------- */
.site-footer {
  padding: 56px 0 40px;
  color: #8fa6bc;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(197, 218, 236, 0.16);
  padding-top: 22px;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
}

.site-footer .footer__title {
  color: #c9dcec;
  font-family: var(--font-display);
  font-size: 1rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(3, 7, 12, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- Volver arriba ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(197, 218, 236, 0.3);
  background: rgba(10, 21, 36, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #d9e8f5;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  background: rgba(25, 49, 73, 0.95);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- Animaciones de entrada ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 0.8, 0.24, 1);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: left;
  }

  .legend {
    width: 100%;
  }

  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 82svh;
    padding: 64px 0 54px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.6vw, 2.6rem);
    letter-spacing: -0.02em;
  }

  .eyebrow {
    gap: 9px;
    font-size: 0.64rem;
    letter-spacing: 0.17em;
  }

  .eyebrow::before {
    width: 16px;
  }

  .hero__inner,
  .container,
  .nav__inner {
    width: min(1120px, 100% - 32px);
  }

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .hero__stats li {
    display: block;
    padding: 0;
    border-left: 0;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .hero__stats b {
    display: block;
    margin-bottom: 2px;
  }

  .brand {
    gap: 8px;
  }

  .brand span:not(.brand__mark) {
    display: none;
  }

  .nav__inner {
    gap: 8px;
  }

  .nav__links a {
    padding: 7px 9px;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }

  .section {
    padding: 24px 0;
  }

  .panel {
    border-radius: 18px;
  }

  .section__head {
    gap: 10px;
  }

  .stat-grid {
    gap: 10px;
    margin: 24px 0 28px;
  }

  .stat {
    padding: 15px;
  }

  .photo-grid {
    columns: 2 150px;
    column-gap: 10px;
  }

  .photo-grid--1 {
    columns: 1;
    max-width: none;
  }

  .photo {
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .video-shell {
    border-radius: 12px;
  }

  .video-overlay__icon {
    width: 58px;
    height: 58px;
  }

  .video-overlay svg {
    width: 24px;
    height: 24px;
  }

  .dept__head {
    gap: 10px;
  }

  .dept__resident {
    margin-top: -4px;
  }

  .download-card {
    padding: 20px;
  }

  .download-card .btn {
    width: 100%;
    text-align: center;
  }
}

/* ---------- Impresión ---------- */
@media print {
  html,
  body {
    background: #ffffff;
  }

  .rain,
  .topnav,
  .to-top,
  .lightbox {
    display: none !important;
  }

  .hero {
    min-height: 0;
    padding: 20px 0;
  }

  .hero h1,
  .hero__lede,
  .eyebrow,
  .hero__stats li,
  .hero__stats b,
  .site-footer {
    color: #111111;
  }

  .panel {
    box-shadow: none;
    border: 1px solid #cccccc;
    break-inside: avoid;
  }

  .btn {
    display: none;
  }
}
