/* =====================================================================
   GRAVITY — Innovación y desarrollo aeroespacial
   Identidad: negro profundo, blanco, trazo fino y amplio espacio.
   Un único acento: el azul del astronauta del logo.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:        #000000;
  --bg2:       #060709;
  --surface:   #0B0C0F;
  --surface2:  #121419;
  --line:      rgba(255,255,255,.12);
  --line2:     rgba(255,255,255,.06);
  --text:      #F4F5F7;
  --muted:     #8B9099;
  --faint:     #4B5059;
  --accent:    #3D74FF;              /* azul del astronauta */
  --accent-2:  #9FC4FF;              /* brillo del visor */
  --accent-soft: rgba(61,116,255,.14);
  --ok:        #5BD69B;
  --on-accent: #FFFFFF;
  --btn-bg:    #FFFFFF;              /* botón principal: blanco sobre negro */
  --btn-text:  #000000;
  --nav-bg:    rgba(0,0,0,.72);
  --logo-filter: brightness(1);

  --f-display: 'Lexend Exa', 'Inter', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --maxw:   1240px;
  --radius: 2px;
  --ease:   cubic-bezier(.2,.7,.2,1);
}

:root.light {
  --bg:        #FFFFFF;
  --bg2:       #F6F7F9;
  --surface:   #FFFFFF;
  --surface2:  #F0F2F5;
  --line:      rgba(10,11,13,.14);
  --line2:     rgba(10,11,13,.07);
  --text:      #0A0B0D;
  --muted:     #5A606B;
  --faint:     #A3A8B1;
  --accent:    #2456E6;
  --accent-2:  #2456E6;
  --accent-soft: rgba(36,86,230,.09);
  --ok:        #12804F;
  --btn-bg:    #0A0B0D;
  --btn-text:  #FFFFFF;
  --nav-bg:    rgba(255,255,255,.8);
  /* logo blanco → negro, conservando el azul del astronauta */
  --logo-filter: invert(1) hue-rotate(180deg);
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s, color .35s;
}
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(5rem, 10vw, 8.5rem) 0; position: relative; }

/* punto azul — el astronauta como signo gráfico */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex-shrink: 0; }

/* ---------- Tipografía de sección ---------- */
.section-tag {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.4rem;
  font: 500 .72rem/1 var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.section-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.section-tag.centro { justify-content: center; }
.section-title {
  font: 200 clamp(1.9rem, 4.4vw, 3.5rem)/1.08 var(--f-display);
  letter-spacing: -.01em; text-transform: uppercase; color: var(--text); margin-bottom: 1.6rem;
}
.section-title em { font-style: normal; color: var(--muted); }
.section-title.centro { text-align: center; }
.section-sub { color: var(--muted); max-width: 580px; font-size: 1.02rem; font-weight: 300; margin-bottom: 3.2rem; }
.dust-divider, .section-divider { height: 1px; background: var(--line2); max-width: var(--maxw); margin: 0 auto; }
.section-divider { display: none; }

/* ---------- Botones ---------- */
.btn-primary, .btn-outline, .btn-donar-unam, .form-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem; border-radius: var(--radius);
  font: 500 .74rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn-primary, .btn-donar-unam, .form-submit { background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-bg); }
.btn-primary:hover, .btn-donar-unam:hover, .form-submit:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--text); }
.link-arrow { font: 500 .72rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--text); text-decoration: none; display: inline-flex; gap: .6rem; padding-bottom: 4px; border-bottom: 1px solid var(--line); transition: border-color .25s, gap .25s; white-space: nowrap; }
.link-arrow:hover { border-color: var(--accent); gap: .9rem; }

/* ---------- Barra de progreso ---------- */
.progress-bar { position: fixed; top: 0; left: 0; height: 1px; width: 100%; background: var(--accent); box-shadow: 0 0 8px var(--accent); z-index: 600; transform-origin: left; transform: scaleX(0); }

/* =====================================================================
   NAVEGACIÓN
   ===================================================================== */
nav {
  position: fixed; top: 0; width: 100%; z-index: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line2);
}
nav::before { /* fondo con blur en pseudo-elemento: no rompe el menú móvil fijo */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--nav-bg); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-logo { position: relative; z-index: 600; display: block; line-height: 0; }
.nav-logo img { height: 18px; width: auto; filter: var(--logo-filter); }
.nav-right { display: flex; align-items: center; gap: 1.1rem; position: relative; z-index: 600; }

.nav-toggle { display: flex; flex-direction: column; gap: 6px; background: none; border: none; padding: 8px; cursor: pointer; position: relative; z-index: 600; }
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  position: fixed; inset: 0; z-index: 550; display: none; list-style: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 1.7rem;
  padding: 5rem 1.5rem 2rem; background: var(--bg); overflow-y: auto;
}
.nav-links.open { display: flex; }
.nav-links a {
  font: 300 1.05rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .25s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-boson-item { margin-top: .8rem; }
.nav-links a.nav-boson { color: var(--text); border: 1px solid var(--line); padding: .9rem 2rem; }
.nav-cta { display: none; }

.theme-toggle-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer; transition: border-color .25s;
}
.theme-toggle-btn:hover { border-color: var(--text); }
.theme-toggle-btn span { /* luna/sol mínimo: círculo partido */
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--text);
  background: linear-gradient(90deg, var(--text) 50%, transparent 50%);
  transition: transform .4s var(--ease);
}
:root.light .theme-toggle-btn span { transform: rotate(180deg); }

@media (min-width: 1081px) {
  .nav-toggle, .nav-boson-item { display: none; }
  .nav-links { position: static; display: flex; flex-direction: row; gap: 1.9rem; padding: 0; background: transparent; overflow: visible; }
  .nav-links a { font: 400 .72rem/1 var(--f-body); letter-spacing: .2em; padding: .4rem 0; }
  .nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .nav-links a:hover::after { transform: scaleX(1); }
  .nav-cta {
    display: inline-flex; padding: .65rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
    font: 500 .68rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--text); text-decoration: none;
    transition: background .25s, color .25s, border-color .25s;
  }
  .nav-cta:hover { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
}

/* =====================================================================
   HERO — el logo como protagonista
   ===================================================================== */
#hero {
  min-height: 100svh; padding: 0; display: flex; align-items: center; overflow: hidden;
  background: var(--bg);
}
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 35% at 50% 46%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 8rem var(--gutter) 6rem;
}
.hero-kicker {
  display: flex; align-items: center; gap: .8rem; margin-bottom: clamp(1.8rem, 4vw, 3rem);
  font: 500 .72rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  opacity: 0; animation: subir .9s .15s var(--ease) forwards;
}
.hero-logo { line-height: 0; }
.hero-logo img {
  width: 100%; height: auto; display: block; filter: var(--logo-filter);
  opacity: 0; animation: aparecerLogo 1.6s .3s var(--ease) forwards;
}
.hero-tagline {
  margin-top: clamp(1rem, 2.4vw, 1.9rem);
  font: 400 clamp(.72rem, 1.55vw, 1.25rem)/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text);
  opacity: 0; animation: subir .9s .9s var(--ease) forwards;
}
.hero-bottom {
  margin-top: clamp(3rem, 7vw, 5.5rem); padding-top: 2rem; border-top: 1px solid var(--line2);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: end;
  opacity: 0; animation: subir .9s 1.15s var(--ease) forwards;
}
.hero-sub { max-width: 470px; color: var(--muted); font-size: 1.02rem; font-weight: 300; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1rem 4rem; margin-top: 3rem;
  opacity: 0; animation: subir .9s 1.35s var(--ease) forwards;
}
.hero-stats dt { font: 500 .66rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.hero-stats dd { font: 200 2.4rem/1 var(--f-display); color: var(--text); }
.hero-stats dd small { font: 400 .8rem var(--f-body); color: var(--muted); margin-left: .35rem; letter-spacing: .1em; }
.hero-scroll {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .7rem; text-decoration: none;
  opacity: 0; animation: subir .9s 1.6s var(--ease) forwards;
}
.scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--text), transparent); animation: pulso 2.4s ease infinite; }
.scroll-text { font: 500 .6rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes aparecerLogo { from { opacity: 0; filter: var(--logo-filter) blur(14px); letter-spacing: .1em; transform: scale(1.02); } to { opacity: 1; filter: var(--logo-filter) blur(0); transform: none; } }
@keyframes pulso { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

@media (max-width: 900px) {
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem 1.2rem; }
  .hero-stats dd { font-size: 1.7rem; }
}
@media (max-width: 560px) {
  .hero-inner { padding-top: 7rem; padding-bottom: 5rem; }
  .hero-actions a { flex: 1 1 100%; }
  .hero-scroll { display: none; }
}

/* =====================================================================
   VIDEOS
   ===================================================================== */
#video-hero { background: var(--bg); padding-top: clamp(4rem, 8vw, 6rem); }
.video-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; }
.video-featured { margin-bottom: 1.5rem; }
.ratio { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--surface); }
.ratio iframe, .donacion-unam-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-featured .ratio { border: 1px solid var(--line2); }
.video-hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto 1.5rem; padding: 0 var(--gutter);
}
.video-hero-grid:last-child { margin-bottom: 0; }
@media (max-width: 800px) { .video-hero-grid { grid-template-columns: 1fr; } }
.video-hero-item { border: 1px solid var(--line2); background: var(--surface); transition: border-color .3s; }
.video-hero-item:hover { border-color: var(--line); }
.video-hero-item .label {
  display: flex; gap: .9rem; align-items: baseline; padding: .95rem 1.1rem; border-top: 1px solid var(--line2);
  font-size: .86rem; color: var(--text); font-weight: 400;
}
.video-hero-item .label span { font: 500 .66rem/1 var(--f-mono); letter-spacing: .12em; color: var(--accent-2); white-space: nowrap; }
:root.light .video-hero-item .label span { color: var(--accent); }

/* =====================================================================
   CAMPAÑA DE DONACIÓN
   ===================================================================== */
#donacion-unam { background: var(--bg2); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.donacion-unam-wrapper {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
@media (max-width: 900px) { .donacion-unam-wrapper { grid-template-columns: 1fr; } }
.donacion-unam-badge {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 100px;
  font: 500 .66rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.donacion-unam-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.donacion-unam-texto h2 { font: 200 clamp(2rem, 4.6vw, 3.6rem)/1.06 var(--f-display); text-transform: uppercase; letter-spacing: -.01em; }
.donacion-unam-texto h2 em { font-style: normal; color: var(--accent-2); }
:root.light .donacion-unam-texto h2 em { color: var(--accent); }
.donacion-unam-texto p { color: var(--muted); font-size: 1.05rem; font-weight: 300; margin: 1.4rem 0 2.2rem; max-width: 500px; }
.donacion-unam-cta { display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: center; }
.donacion-unam-meta { display: inline-flex; align-items: center; gap: .6rem; font: 400 .78rem var(--f-mono); color: var(--muted); }
.donacion-unam-video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line2); }

/* =====================================================================
   TICKER
   ===================================================================== */
.ticker-wrap { overflow: hidden; padding: 1.1rem 0; border-bottom: 1px solid var(--line2); background: var(--bg); }
.ticker { display: flex; gap: 3.2rem; width: max-content; animation: ticker 40s linear infinite; }
.ticker-wrap:hover .ticker { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-item { display: flex; align-items: center; gap: 3.2rem; white-space: nowrap; font: 200 1.05rem/1 var(--f-display); letter-spacing: .14em; color: var(--muted); }
.ticker-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* =====================================================================
   SOBRE NOSOTROS
   ===================================================================== */
#about .reveal { max-width: 900px; }
.about-text { font: 200 clamp(1.15rem, 2.2vw, 1.55rem)/1.6 var(--f-body); color: var(--muted); margin-bottom: 1rem; }
.about-text:first-of-type { color: var(--text); }

/* =====================================================================
   DONACIONES
   ===================================================================== */
#donaciones { background: var(--bg); }
.donate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
@media (max-width: 860px) { .donate-grid { grid-template-columns: 1fr; } }
.donate-card { background: var(--bg); padding: 2.2rem 2rem; display: flex; flex-direction: column; gap: 1rem; position: relative; transition: background .3s; }
.donate-card:hover { background: var(--surface); }
.donate-card.featured { background: var(--surface); box-shadow: inset 0 1px 0 var(--accent); }
.donate-card.featured::before {
  content: 'Más elegido'; position: absolute; top: 1.1rem; right: 1.2rem;
  font: 500 .6rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2);
}
:root.light .donate-card.featured::before { color: var(--accent); }
.donate-amount { font: 300 1.15rem/1.3 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.donate-desc { color: var(--muted); font-size: .93rem; font-weight: 300; }
.donate-datos { line-height: 1.95; margin-top: .4rem; }
.donate-datos strong { color: var(--text); font-weight: 500; }
.cuenta-num { font: 400 1.25rem var(--f-mono); color: var(--text); letter-spacing: .06em; }
.donate-qr { width: 100%; max-width: 200px; margin: .8rem auto; display: block; background: #fff; padding: 10px; }
.donate-note { margin-top: 1.8rem; display: flex; align-items: center; gap: .8rem; font: 400 .8rem/1.6 var(--f-mono); color: var(--muted); }

.transparencia { margin-top: 4rem; }
.transp-totales { display: flex; gap: 3rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.transp-totales > div { display: flex; flex-direction: column; gap: .3rem; }
.transp-row { grid-template-columns: 140px 1fr auto !important; }

/* =====================================================================
   HITOS — línea de tiempo
   ===================================================================== */
#hitos { background: var(--bg2); }
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 107px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 80px 1fr; gap: 54px; padding-bottom: 2.6rem; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-date { font: 400 .82rem/1 var(--f-mono); color: var(--muted); text-align: right; padding-top: 1.6rem; }
.tl-dot { position: absolute; left: 102px; top: 1.55rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--muted); }
.tl-item.done .tl-dot { background: var(--text); border-color: var(--text); }
.tl-item:not(.done) .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-content { background: var(--bg); border: 1px solid var(--line2); padding: 1.4rem 1.6rem; transition: border-color .3s; }
.tl-content:hover { border-color: var(--line); }
.tl-content h4 { font: 300 1.08rem/1.35 var(--f-display); text-transform: uppercase; margin-bottom: .5rem; }
.tl-content p { color: var(--muted); font-size: .93rem; font-weight: 300; }
.tl-tag { display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem; font: 500 .62rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
:root.light .tl-tag { color: var(--accent); }
.tl-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tl-item.done .tl-tag { color: var(--muted); }
@media (max-width: 700px) {
  .timeline::before { left: 5px; }
  .tl-item { grid-template-columns: 1fr; gap: 0; padding-left: 30px; }
  .tl-date { display: none; }
  .tl-dot { left: 0; }
}

/* =====================================================================
   LISTAS (lanzamientos, competencias, transparencia)
   ===================================================================== */
#lanzamientos { background: var(--bg); }
.lanz-sub-title { display: flex; align-items: center; gap: .8rem; margin: 4rem 0 1.4rem; font: 500 .7rem/1 var(--f-body); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.lanz-sub-title::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.lanz-sub-title.first { margin-top: 0; }
.lanz-alt { font: 200 1.6rem/1 var(--f-display); color: var(--text); white-space: nowrap; }

.comp-list { border-top: 1px solid var(--line); }
.comp-row {
  display: grid; grid-template-columns: 120px 1fr auto auto; gap: 2rem; align-items: center;
  padding: 1.5rem .2rem; border-bottom: 1px solid var(--line2); transition: background .25s, padding .25s;
}
.comp-row:hover { background: var(--surface); padding-left: .8rem; padding-right: .8rem; }
.comp-row-3 { grid-template-columns: 120px 1fr auto; }
.comp-year { font: 400 .84rem var(--f-mono); color: var(--muted); }
.comp-name { font: 300 1.05rem/1.4 var(--f-display); text-transform: uppercase; color: var(--text); }
.comp-loc { font-size: .88rem; color: var(--muted); font-weight: 300; margin-top: .2rem; }
.comp-result {
  justify-self: start; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  font: 500 .64rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted);
}
.comp-result::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.comp-result.top { color: var(--text); border-color: var(--text); }
.comp-result.top::before { background: var(--ok); }
@media (max-width: 760px) {
  .comp-row, .comp-row-3, .transp-row { grid-template-columns: 1fr !important; gap: .6rem; }
}

.longterm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
@media (max-width: 900px) { .longterm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .longterm-grid { grid-template-columns: 1fr; } }
.longterm-card { background: var(--bg); padding: 2.2rem 1.9rem; transition: background .3s; }
.longterm-card:hover { background: var(--surface); }
.longterm-card .lt-year { display: block; margin-bottom: 2.2rem; font: 400 .78rem var(--f-mono); color: var(--accent-2); }
:root.light .longterm-card .lt-year { color: var(--accent); }
.longterm-card h4 { font: 300 1.08rem/1.35 var(--f-display); text-transform: uppercase; margin-bottom: .7rem; }
.longterm-card p { color: var(--muted); font-size: .92rem; font-weight: 300; }

/* =====================================================================
   I+D
   ===================================================================== */
#investigacion { background: var(--bg2); }
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
@media (max-width: 900px) { .research-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .research-grid { grid-template-columns: 1fr; } }
.research-card { background: var(--bg2); padding: 2.2rem 1.9rem 2.4rem; transition: background .3s; position: relative; }
.research-card:hover { background: var(--surface); }
.research-card::after { content: ''; position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.research-card:hover::after { width: 100%; }
.research-card .num { display: block; margin-bottom: 3rem; font: 400 .78rem var(--f-mono); color: var(--muted); }
.research-card h4 { font: 300 1.08rem/1.35 var(--f-display); text-transform: uppercase; margin-bottom: .7rem; }
.research-card p { color: var(--muted); font-size: .92rem; font-weight: 300; }

/* =====================================================================
   EQUIPO
   ===================================================================== */
#team { background: var(--bg); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card { background: var(--bg); padding: 2.4rem 1.4rem; text-align: center; transition: background .3s; }
.team-card:hover { background: var(--surface); }
.team-avatar {
  width: 96px; height: 96px; margin: 0 auto 1.4rem; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 2.3rem; background: var(--surface2); border: 1px solid var(--line);
  transition: border-color .3s, box-shadow .3s;
}
.team-card:hover .team-avatar { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .4s; }
.team-card:hover .team-avatar img { filter: none; }
.team-name { font: 400 .9rem/1.4 var(--f-body); color: var(--text); margin-bottom: .35rem; }
.team-role { font: 500 .64rem/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.team-name a, .startup-name a { color: inherit; text-decoration: none; }
.team-name a:hover, .startup-name a:hover { color: var(--accent); }

#startup-team { background: var(--bg2); }
.startup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); margin-top: 1rem; }
@media (max-width: 900px) { .startup-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .startup-grid { grid-template-columns: repeat(2, 1fr); } }
.startup-card { background: var(--bg2); padding: 2rem 1.2rem; text-align: center; transition: background .3s; }
.startup-card:hover { background: var(--surface); }
.startup-avatar { font-size: 1.9rem; line-height: 1; margin-bottom: 1rem; }
.startup-avatar img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; display: block; margin: 0 auto; filter: grayscale(1); }
.startup-card:hover .startup-avatar img { filter: none; }
.startup-name { font: 400 .86rem/1.4 var(--f-body); color: var(--text); margin-bottom: .3rem; }
.startup-role { font: 500 .6rem/1.4 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); }
:root.light .startup-role { color: var(--accent); }
.startup-desc { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line2); font-size: .8rem; color: var(--muted); font-weight: 300; }

/* =====================================================================
   COMPETENCIAS
   ===================================================================== */
#competencias { background: var(--bg); }

/* =====================================================================
   NOTICIAS — carrusel
   ===================================================================== */
#noticias-eventos { background: var(--bg2); overflow: hidden; }
.noticias-header { max-width: 720px; margin: 0 auto 3.5rem; text-align: center; }
.noticias-header .section-tag { justify-content: center; }
.noticias-sub { color: var(--muted); font-weight: 300; }
.carrusel-container { position: relative; padding: 0 56px; }
.carrusel-track-wrapper { overflow: hidden; }
.carrusel-track { display: flex; gap: 1.5rem; transition: transform .6s var(--ease); }
.carrusel-slide { flex: 0 0 calc(33.333% - 1rem); min-width: 260px; }
@media (max-width: 992px) { .carrusel-slide { flex: 0 0 calc(50% - .75rem); } }
@media (max-width: 576px) { .carrusel-slide { flex: 0 0 100%; } .carrusel-container { padding: 0 0 0; } .carrusel-btn { display: none !important; } }
.carrusel-btn {
  position: absolute; top: 40%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font-size: 1.3rem; line-height: 1; display: grid; place-items: center; cursor: pointer;
  transition: border-color .25s, background .25s, color .25s;
}
.carrusel-btn:hover:not(:disabled) { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.carrusel-btn:disabled { cursor: default; }
.carrusel-prev { left: 0; }
.carrusel-next { right: 0; }
.noticia-card { height: 100%; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line2); transition: border-color .3s; }
.noticia-card:hover { border-color: var(--line); }
.noticia-img { height: 210px; overflow: hidden; background: var(--surface); }
.noticia-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.noticia-card:hover .noticia-img img { transform: scale(1.04); }
.noticia-content { flex: 1; display: flex; flex-direction: column; padding: 1.5rem 1.4rem 1.6rem; }
.noticia-fecha { font: 400 .7rem var(--f-mono); letter-spacing: .1em; color: var(--accent-2); margin-bottom: .8rem; }
:root.light .noticia-fecha { color: var(--accent); }
.noticia-titulo { font: 300 1rem/1.45 var(--f-display); text-transform: uppercase; margin-bottom: .8rem; }
.noticia-desc { flex: 1; color: var(--muted); font-size: .88rem; font-weight: 300; margin-bottom: 1.2rem; }
.noticia-link { align-self: flex-start; font: 500 .66rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--text); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid var(--line); transition: border-color .25s; }
.noticia-link:hover { border-color: var(--accent); }
.carrusel-indicators { display: flex; justify-content: center; gap: .5rem; margin-top: 2.4rem; }
.indicator { width: 18px; height: 2px; border: none; padding: 0; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.indicator.active { width: 42px; background: var(--text); }

/* =====================================================================
   QUÉ HACEMOS
   ===================================================================== */
#services { background: var(--bg); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }
.service-card { background: var(--bg); padding: 2.4rem 1.9rem; position: relative; transition: background .3s; }
.service-card:hover { background: var(--surface); }
.service-num { font: 400 .78rem var(--f-mono); color: var(--muted); margin-bottom: 3rem; }
.service-title { font: 300 1.12rem/1.35 var(--f-display); text-transform: uppercase; margin-bottom: .7rem; }
.service-desc { color: var(--muted); font-size: .92rem; font-weight: 300; }

/* =====================================================================
   PROYECTOS
   ===================================================================== */
#projects { background: var(--bg2); }
.projects-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.projects-header .section-title { margin-bottom: 0; }
.projects-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 1.5rem; }
@media (max-width: 760px) { .projects-grid { grid-template-columns: 1fr; } }
.project-card { position: relative; overflow: hidden; background: var(--surface); }
.project-card:first-child { grid-row: span 2; }
.project-thumb { height: 100%; min-height: 260px; }
.project-card:first-child .project-thumb { min-height: 520px; }
@media (max-width: 760px) { .project-card:first-child .project-thumb { min-height: 320px; } }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.85) contrast(1.05); transition: filter .6s, transform .8s var(--ease); }
.project-card:hover .project-thumb img { filter: none; transform: scale(1.03); }
.project-overlay {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.92), rgba(0,0,0,.55) 60%, transparent);
  color: #fff;
}
.project-cat { font: 500 .62rem/1 var(--f-mono); letter-spacing: .16em; color: var(--accent-2); margin-bottom: .55rem; }
.project-name { font: 300 1.3rem/1.2 var(--f-display); text-transform: uppercase; color: #fff; }
.project-desc { color: rgba(255,255,255,.7); font-size: .88rem; font-weight: 300; margin-top: .35rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s, opacity .4s; }
.project-card:hover .project-desc { max-height: 60px; opacity: 1; }
@media (hover: none) { .project-desc { max-height: none; opacity: 1; } }

/* =====================================================================
   SPONSORS
   ===================================================================== */
#sponsors { background: var(--bg); }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); }
.sponsor-card { background: var(--bg); padding: 2.2rem 1.4rem 1.8rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; text-decoration: none; position: relative; transition: background .3s; }
.sponsor-card:hover { background: var(--surface); }
.sponsor-nivel { position: absolute; top: .9rem; left: 1rem; font: 500 .58rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sponsor-oro .sponsor-nivel { color: #E3B341; }
.sponsor-plata .sponsor-nivel { color: #B8C2CC; }
.sponsor-bronce .sponsor-nivel { color: #C98A5C; }
.sponsor-logo { height: 82px; width: 100%; display: grid; place-items: center; margin-top: .8rem; }
.sponsor-logo img { max-height: 70px; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .3s, opacity .3s; }
.sponsor-card:hover .sponsor-logo img { filter: none; opacity: 1; }
.sponsor-logo span { font: 300 1.2rem var(--f-display); text-transform: uppercase; }
.sponsor-nombre { font-size: .9rem; color: var(--text); }
.sponsor-desc { font-size: .82rem; color: var(--muted); font-weight: 300; }

/* =====================================================================
   CONTACTO
   ===================================================================== */
#contact { background: var(--bg2); text-align: center; overflow: hidden; }
#contact::before {
  content: 'GRAVITY'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font: 200 clamp(5rem, 22vw, 20rem)/1 var(--f-display); letter-spacing: .08em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--line2); pointer-events: none;
}
#contact .wrap { position: relative; }
.contact-sub { color: var(--muted); max-width: 480px; margin: 0 auto 2.6rem; font-weight: 300; }
.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 580px) { .form-row { grid-template-columns: 1fr; } }
.form-field {
  width: 100%; padding: 1rem 1.1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font: 400 .98rem var(--f-body); outline: none; transition: border-color .25s;
}
.form-field::placeholder { color: var(--faint); }
.form-field:focus { border-color: var(--accent); }
textarea.form-field { resize: vertical; min-height: 130px; }
.form-submit { align-self: flex-start; }
@media (max-width: 580px) { .form-submit { align-self: stretch; } }

/* =====================================================================
   PIE
   ===================================================================== */
footer {
  border-top: 1px solid var(--line2); background: var(--bg);
  padding: 3rem var(--gutter); display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 3rem; align-items: center;
}
.footer-logo { display: block; line-height: 0; }
.footer-logo img { width: 230px; height: auto; filter: var(--logo-filter); }
.footer-copy { color: var(--muted); font-size: .82rem; font-weight: 300; text-align: center; }
.footer-links { list-style: none; display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { font: 500 .66rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .25s; }
.footer-links a:hover { color: var(--text); }
@media (max-width: 900px) {
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Cuadrículas con líneas finas: cada celda dibuja su borde (sin rellenar huecos vacíos) */
.donate-card, .longterm-card, .research-card, .team-card, .startup-card, .service-card, .sponsor-card {
  border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2);
}

/* Móvil: menú a la derecha */
@media (max-width: 1080px) {
  .nav-right { margin-left: auto; }
  .nav-toggle { order: 3; margin-right: -8px; }
}
.hero-stats > div { display: flex; flex-direction: column; justify-content: space-between; }
