/* Fundación EMI — Premium 2026 cinematic experience */
:root {
  --bg: #050d18;
  --bg-elev: rgba(12, 28, 48, 0.55);
  --text: #f4fbff;
  --muted: #9ec0d8;
  --blue: #1d6fff;
  --cyan: #00d4c8;
  --green: #22c55e;
  --yellow: #fbbf24;
  --orange: #f97316;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.14);
  --radius: 24px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", "DM Sans", system-ui, sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --cta-grad: linear-gradient(135deg, #1d6fff, #00d4c8 50%, #22c55e);
  --warm-grad: linear-gradient(135deg, #f97316, #fbbf24);
  --max: 1240px;
  --nav-h: 76px;
  --cursor: 0;
}

html[data-theme="light"] {
  --bg: #f3faf8;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #0a1a28;
  --muted: #3d5a70;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(10, 40, 70, 0.1);
  --shadow: 0 24px 60px rgba(20, 60, 100, 0.12);
}

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

html {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

body.touch-device {
  cursor: auto;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

#liquid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  display: block;
  /* GPU composite — solo atmósfera, no afecta UI */
  transform: translateZ(0);
  will-change: contents;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* grano muy sutil sobre el cielo */
  opacity: 0.018;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom cursor — GPU, sigue al mouse sin lag */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  will-change: transform;
  transform: translate3d(-100px, -100px, 0);
}
.cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: #e8f6ff;
  box-shadow: 0 0 10px rgba(126, 232, 224, 0.85);
}
.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid rgba(126, 232, 224, 0.7);
  background: transparent;
  transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: #7ee8e0;
  background: rgba(0, 212, 200, 0.12);
}
body.touch-device .cursor-dot,
body.touch-device .cursor-ring {
  display: none;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 100;
  background: var(--cta-grad);
  box-shadow: 0 0 20px rgba(0, 212, 200, 0.6);
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg-elev);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--glass-border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  z-index: 2;
}
.nav-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--cta-grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 30px rgba(29, 111, 255, 0.4);
}
.nav-logo,
img.cms-logo {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 111, 255, 0.38);
  flex-shrink: 0;
}
.footer-logo,
img.cms-logo-footer {
  height: 92px;
  width: 92px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  margin: 0 auto 1.25rem;
  display: block;
  box-shadow: 0 16px 44px rgba(29, 111, 255, 0.4);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-radius: 999px;
  transition: 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--glass);
}
.nav-links a.cta {
  background: var(--cta-grad);
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 8px 28px rgba(0, 180, 160, 0.35);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  cursor: none;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
body.touch-device .icon-btn {
  cursor: pointer;
}
.icon-btn:hover {
  transform: scale(1.06);
  border-color: var(--cyan);
}
.burger {
  display: none;
}
.nav-drawer {
  display: none;
}

/* Floating CTA rail */
.cta-rail {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cta-rail a {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-elev);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: 0.25s;
  white-space: nowrap;
}
.cta-rail a:hover {
  transform: translateX(-4px) scale(1.03);
}
.cta-rail a.primary {
  background: var(--cta-grad);
  border: none;
  color: #fff;
}

/* Layout helpers */
.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Vistas independientes (no landing larga) */
.view {
  display: none;
  position: relative;
  z-index: 2;
  min-height: calc(100dvh - var(--nav-h) - 8.5rem);
  padding: calc(var(--nav-h) + 1.6rem) 0 2rem;
  animation: viewIn 0.45s ease;
}
.view.is-active {
  display: block;
}
.view.hero.is-active {
  display: grid;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.view.is-active .reveal {
  opacity: 1;
  transform: none;
}
.nav-links a.on {
  color: var(--text);
  background: var(--glass);
}
.section {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-h) + 1.6rem) 0 2rem;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}
.section-label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cta-grad);
  border-radius: 2px;
}
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: 0;
}
.display-xl {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
}
.display-lg {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
}
.display-md {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}
.lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.6;
}
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-weight: 700;
  cursor: none;
  transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
body.touch-device .btn {
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px) scale(1.03);
}
.btn-primary {
  background: var(--cta-grad);
  border: none;
  color: #fff;
  box-shadow: 0 14px 40px rgba(29, 111, 255, 0.35);
}
.btn-warm {
  background: var(--warm-grad);
  border: none;
  color: #1a1000;
  box-shadow: 0 14px 40px rgba(249, 115, 22, 0.35);
}
.btn-ghost {
  background: transparent;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* HERO */
.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100dvh - var(--nav-h) - 8.5rem);
  display: grid;
  align-items: end;
  padding: calc(var(--nav-h) + 2rem) 0 2.5rem;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroKen 18s ease-in-out infinite alternate;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
}
@keyframes heroKen {
  from {
    transform: scale(1.08) translate(0, 0);
  }
  to {
    transform: scale(1.16) translate(-1.5%, -1%);
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 10, 20, 0.35) 0%, rgba(4, 10, 20, 0.2) 40%, rgba(4, 10, 20, 0.85) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(0, 212, 200, 0.2), transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(29, 111, 255, 0.25), transparent 45%);
}
html[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.2) 0%, rgba(4, 20, 40, 0.15) 35%, rgba(4, 20, 40, 0.78) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(0, 212, 200, 0.2), transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
}
.hero-content .lead {
  color: rgba(255, 255, 255, 0.82);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-scroll i {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, #fff, transparent);
  animation: scrollLine 1.8s infinite;
}
@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* Phrase full-bleed */
.phrase {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.25rem;
  position: relative;
  z-index: 2;
}
.phrase p {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 16ch;
  margin: 0;
  white-space: pre-line;
  background: linear-gradient(135deg, #fff 0%, #7ee8e0 40%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .phrase p {
  background: linear-gradient(135deg, #0a2a4a 0%, #0d9488 45%, #ea580c 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 3rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--blue), var(--orange));
  opacity: 0.5;
}
@media (min-width: 800px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}
.tl-item {
  position: relative;
  padding: 0 0 3rem 3rem;
  max-width: 520px;
}
@media (min-width: 800px) {
  .tl-item {
    width: 50%;
    padding: 0 3rem 4rem;
  }
  .tl-item:nth-child(odd) {
    margin-left: 0;
    text-align: right;
    padding-right: 3.5rem;
    padding-left: 1rem;
  }
  .tl-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 3.5rem;
  }
}
.tl-dot {
  position: absolute;
  left: 0.45rem;
  top: 0.35rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cta-grad);
  box-shadow: 0 0 0 6px rgba(0, 212, 200, 0.2);
}
@media (min-width: 800px) {
  .tl-item:nth-child(odd) .tl-dot {
    left: auto;
    right: -9px;
  }
  .tl-item:nth-child(even) .tl-dot {
    left: -9px;
  }
}
.tl-year {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--yellow);
  margin-bottom: 0.35rem;
}
.tl-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.tl-item p {
  margin: 0;
  color: var(--muted);
}

/* Impact grid */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.impact-card {
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: 0.35s;
}
.impact-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0, 212, 200, 0.4);
}
.impact-n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  letter-spacing: -0.03em;
  background: var(--cta-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.impact-l {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Map */
.map-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
}
.map-svg-wrap {
  padding: 1.25rem;
  min-height: 420px;
}
.map-svg-wrap svg {
  width: 100%;
  height: auto;
  max-height: 520px;
}
.province {
  fill: rgba(29, 111, 255, 0.15);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.2;
  transition: 0.3s;
  cursor: none;
}
body.touch-device .province {
  cursor: pointer;
}
.province.active {
  fill: url(#emiGrad);
  filter: drop-shadow(0 0 12px rgba(0, 212, 200, 0.55));
  stroke: #7ee8e0;
}
.province:hover {
  fill: rgba(0, 212, 200, 0.45);
}
.province.dim {
  opacity: 0.25;
}
.map-panel {
  padding: 1.5rem;
  min-height: 320px;
}
.map-panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.6rem;
}
.map-panel p {
  color: var(--muted);
}
.map-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}
.map-thumbs img {
  border-radius: 14px;
  height: 120px;
  width: 100%;
  object-fit: cover;
}
.province-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: none;
  transition: 0.2s;
}
body.touch-device .chip {
  cursor: pointer;
}
.chip.on {
  background: var(--cta-grad);
  border: none;
  color: #fff;
}

/* Gallery masonry */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.5rem 0;
}
.masonry {
  columns: 3 260px;
  column-gap: 0.85rem;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 0.85rem;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--glass-border);
  cursor: none;
  transition: 0.3s;
}
body.touch-device .masonry-item {
  cursor: pointer;
}
.masonry-item:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
}
.masonry-item .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* Stories */
.stories-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 380px);
  gap: 1.1rem;
  overflow-x: auto;
  padding: 1rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.story-card {
  scroll-snap-align: start;
  overflow: hidden;
  min-height: 480px;
  position: relative;
  transition: 0.35s;
}
.story-card:hover {
  transform: translateY(-8px) rotateX(2deg);
}
.story-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-card .body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(4, 12, 24, 0.92));
  color: #fff;
}
.story-card .role {
  font-size: 0.78rem;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.story-card h3 {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.45rem;
}

/* Videos */
.video-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--glass-border);
  background: #000;
  margin-top: 1.5rem;
}
.video-main iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-rail {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  margin-top: 1rem;
  padding-bottom: 0.5rem;
}
.video-thumb {
  flex: 0 0 240px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  cursor: none;
  transition: 0.25s;
}
body.touch-device .video-thumb {
  cursor: pointer;
}
.video-thumb:hover {
  transform: scale(1.04);
}
.video-thumb img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.video-thumb p {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Transparency */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.input {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  outline: none;
  min-width: 200px;
  flex: 1;
}
.input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.2);
}
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.doc-card {
  padding: 1.25rem;
  transition: 0.25s;
}
.doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 200, 0.4);
}
.doc-type {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
}
.doc-card h3 {
  margin: 0.4rem 0;
  font-size: 1.05rem;
}
.doc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Aliados al pie de cada área */
.allies-dock {
  position: relative;
  z-index: 3;
  padding: 0.65rem 0 0.85rem;
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(4, 12, 28, 0.35), rgba(4, 12, 28, 0.62));
  backdrop-filter: blur(14px);
  overflow: hidden;
}
html[data-theme="light"] .allies-dock {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(243, 250, 248, 0.85));
}
.allies-head {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-weight: 700;
}
.allies-track {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1.25rem;
}
.allies-track.is-moving {
  flex-wrap: nowrap;
  width: max-content;
  justify-content: flex-start;
  animation: alliesMove 36s linear infinite;
}
.allies-track.is-moving:hover {
  animation-play-state: paused;
}
@keyframes alliesMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ally {
  flex: 0 0 auto;
  min-width: 132px;
  height: 58px;
  padding: 0 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-weight: 700;
  font-size: 0.82rem;
  opacity: 0.95;
}
.ally img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
.site-foot {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.45rem 1rem 0.9rem;
}
.site-foot p {
  margin: 0;
}

/* Donate */
.donate-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (max-width: 900px) {
  .donate-grid {
    grid-template-columns: 1fr;
  }
}
.donate-hero-card {
  padding: 2rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 212, 200, 0.25), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(249, 115, 22, 0.2), transparent 45%),
    var(--glass);
}
.methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.method {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  transition: 0.25s;
  cursor: none;
}
body.touch-device .method {
  cursor: pointer;
}
.method:hover,
.method.on {
  transform: scale(1.04);
  border-color: var(--cyan);
  background: rgba(0, 212, 200, 0.12);
}
.amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.amount {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  font-weight: 700;
  cursor: none;
}
body.touch-device .amount {
  cursor: pointer;
}
.amount.on {
  background: var(--warm-grad);
  border: none;
  color: #1a1000;
}
.field {
  margin-bottom: 0.85rem;
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.bank-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Campaigns */
.camp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.camp-card {
  overflow: hidden;
  transition: 0.35s;
}
.camp-card:hover {
  transform: translateY(-8px);
}
.camp-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.camp-body {
  padding: 1.25rem;
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin: 0.85rem 0 0.4rem;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--cta-grad);
  transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.camp-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Forms two-col */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}
.form-card {
  padding: 1.75rem;
}
.benefits {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.benefits li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--glass-border);
  color: var(--muted);
}
.benefits li strong {
  color: var(--text);
}

/* Diary */
.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.diary-card {
  overflow: hidden;
  transition: 0.3s;
}
.diary-card:hover {
  transform: translateY(-6px);
}
.diary-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}
.diary-body {
  padding: 1.25rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 212, 200, 0.15);
  color: var(--cyan);
}

/* Testimonials 3D */
.t-carousel {
  perspective: 1200px;
  margin-top: 2rem;
  position: relative;
  min-height: 320px;
}
.t-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  gap: 1rem;
}
.t-card {
  flex: 0 0 min(100%, 380px);
  padding: 1.75rem;
  transform-style: preserve-3d;
  transition: 0.4s;
}
.t-card:hover {
  transform: rotateY(-6deg) rotateX(3deg) translateZ(12px);
}
.t-top {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}
.t-top img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
}
.t-card blockquote {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Footer cinematic */
.footer {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-h) + 1.6rem) 0 2rem;
  text-align: center;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  inset: 10% 10% auto;
  height: 50%;
  background: radial-gradient(ellipse, rgba(29, 111, 255, 0.35), transparent 70%);
  pointer-events: none;
}
.footer .display {
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-copy {
  color: var(--muted);
  font-size: 0.82rem;
  opacity: 0.8;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-height: 85vh;
  max-width: 95vw;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.4rem;
  cursor: none;
}
body.touch-device .lightbox-close {
  cursor: pointer;
}

/* Reveal helpers (GSAP also uses) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f2740;
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  z-index: 300;
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile nav */
@media (max-width: 980px) {
  .nav-links {
    display: none;
  }
  .burger {
    display: grid;
  }
  .nav-drawer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--bg-elev);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.35s;
    z-index: 89;
  }
  .nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-drawer a {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-weight: 600;
  }
  .nav-drawer a:hover {
    background: var(--glass);
  }
  .cta-rail {
    right: 0.65rem;
    bottom: 0.85rem;
  }
  .cta-rail a span {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee {
    animation: none;
  }
  body {
    cursor: auto;
  }
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
