/* ============================================================
   UAPA · Reconocimientos e Impacto Institucional
   Landing page — CSS moderno
   ============================================================ */

:root {
  --navy-900: #0a1a4f;
  --navy-800: #12245f;
  --navy-700: #1c3178;
  --orange:   #f5821f;
  --orange-600: #dd6f0d;
  --gold:     #f0b429;

  --ink:      #16202e;
  --muted:    #5a6474;
  --bg:       #ffffff;
  --bg-alt:   #f3f6fb;
  --line:     #e3e8f2;

  --radius:   16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(10, 26, 79, .08);
  --shadow-md: 0 12px 32px -12px rgba(10, 26, 79, .22);
  --shadow-lg: 0 30px 60px -20px rgba(10, 26, 79, .35);

  --container: 1140px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", var(--font-sans);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.01em; }

::selection { background: var(--orange); color: #fff; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange-600);
  margin-bottom: .8rem;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--navy-900); }
.section-intro { margin-top: 1.1rem; color: var(--muted); font-size: 1.05rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.grid-2 p + p { margin-top: 1rem; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand { display: flex; flex-direction: column; line-height: 1.05; }
.brand-mark {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--navy-900);
  letter-spacing: .04em;
  position: relative;
  padding-bottom: 5px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 42px; height: 4px;
  background: var(--orange);
  border-radius: 2px;
}
.brand-sub {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.main-nav ul { display: flex; align-items: center; gap: 1.7rem; }
.main-nav a {
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
  position: relative;
  transition: color .2s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--navy-900); }
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.main-nav a.is-active { color: var(--navy-900); font-weight: 600; }

.nav-cta {
  background: var(--navy-900);
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: 999px;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--navy-700); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.scroll-progress {
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width .1s linear;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .9;
}
.blob-navy {
  width: 460px; height: 460px;
  background: radial-gradient(circle at 60% 40%, var(--navy-700), var(--navy-900));
  bottom: -220px; right: 12%;
  opacity: .12;
  animation: float 18s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 22px) scale(1.06); }
}

.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--orange-600);
  background: rgba(245, 130, 31, .12);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 800;
  color: var(--navy-900);
}
.hero-title span {
  background: linear-gradient(120deg, var(--orange), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 620px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(245, 130, 31, .7);
}
.btn-primary:hover { background: var(--orange-600); }
.btn-ghost {
  border-color: var(--navy-900);
  color: var(--navy-900);
}
.btn-ghost:hover { background: var(--navy-900); color: #fff; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}
.hero-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy-900);
}
.hero-stats span { font-size: .85rem; color: var(--muted); }

/* ============================================================
   ALIANZA ESTRATÉGICA
   ============================================================ */
.section-alliance { padding-block: clamp(3rem, 7vw, 5rem); }
.section-head-center { margin-inline: auto; text-align: center; }

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
}
.logo-strip li { display: flex; }
.logo-strip img {
  height: 65px;
  width: auto;
  object-fit: contain;
  opacity: .85;
  transition: opacity .25s var(--ease);
}
.logo-strip img:hover {
  opacity: 1;
}

/* ============================================================
   COMPROMISO
   ============================================================ */
.pill-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.pill-list li {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy-800);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
}
.section-alt .pill-list li { background: #fff; }

/* ============================================================
   TIMELINE / PREMIOS
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.5rem; }
.filter {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .88rem;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--navy-700); color: var(--navy-900); }
.filter.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
}

.timeline { position: relative; display: grid; gap: 1.6rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 90px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--orange), var(--line));
}

.tl-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.8rem;
  align-items: start;
}
.tl-item.is-hidden { display: none; }

.tl-year {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius-sm);
  padding: 10px 0;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.tl-year::after {
  content: "";
  position: absolute;
  right: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--orange);
}

.tl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tl-card h3 { font-size: 1.12rem; color: var(--navy-900); margin: .7rem 0 .5rem; }
.tl-card p { color: var(--muted); font-size: .96rem; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
}
.tag-gold { background: var(--gold); color: var(--navy-900); }

/* ============================================================
   RSU
   ============================================================ */
.rsu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-bottom: 2rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { color: var(--navy-900); font-size: 1.25rem; margin-bottom: .8rem; }
.card p { color: var(--muted); }
.card p + p { margin-top: .9rem; }

.mini-stats {
  display: flex;
  gap: 1.8rem;
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.mini-stats strong {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
}
.mini-stats span { font-size: .82rem; color: var(--muted); }

.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.process {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.2rem;
  font-weight: 600;
  font-size: .98rem;
  position: relative;
  overflow: hidden;
}
.process span {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: .3rem;
}

/* ============================================================
   IMPACTO (dark section)
   ============================================================ */
.section-dark {
  background: var(--navy-900);
  color: #dfe4f2;
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,130,31,.25), transparent 70%);
  top: -180px; left: -120px;
}
.section-dark .section-kicker { color: var(--gold); }
.section-dark .section-title { color: #fff; }

.impact-group {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--orange);
  margin: 3rem 0 1.4rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.impact-group:first-of-type { margin-top: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.stat-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  padding: 1.7rem;
  backdrop-filter: blur(4px);
}
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: .6rem;
}
.stat span { font-size: .92rem; color: #b9c1da; }

/* ============================================================
   PROYECTOS
   ============================================================ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.proj {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.proj::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 4px; height: 100%;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s var(--ease);
}
.proj:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.proj:hover::before { transform: scaleY(1); }
.proj h3 { color: var(--navy-900); font-size: 1.12rem; margin-bottom: .6rem; }
.proj p { color: var(--muted); font-size: .94rem; }

/* ============================================================
   CIERRE
   ============================================================ */
.closing {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
}
.closing-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.closing-badge {
  text-align: center;
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 2rem 1rem;
}
.closing-badge strong {
  font-family: var(--font-head);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
  line-height: 1;
}
.closing-badge span {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .85rem;
  color: #cdd4ec;
}
.closing-text p { color: #cfd6ee; }
.closing-text p + p { margin-top: 1rem; }
.closing-text .btn { margin-top: 1.8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #060f31;
  color: #9aa4c6;
  padding: 3rem 0;
  text-align: center;
}
.footer-wrap .brand-mark { color: #fff; display: inline-block; margin-bottom: .8rem; }
.footer-wrap .brand-mark::after { left: 50%; transform: translateX(-50%); }
.footer-wrap p { font-size: .9rem; }
.footer-fine { font-size: .78rem; margin-top: .4rem; color: #6e78a0; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--navy-900);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.to-top:not([hidden]) { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--orange); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .rsu-grid, .proj-grid, .stat-grid, .stat-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .process-row { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .closing-inner { grid-template-columns: 1fr; text-align: center; }
  .closing-badge { max-width: 260px; margin-inline: auto; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .35s var(--ease);
  }
  .main-nav.is-open { clip-path: inset(0 0 0 0); }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1.25rem 1.5rem;
  }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 15px 4px; }
  .nav-cta { text-align: center; margin-top: 1rem; }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .rsu-grid, .proj-grid, .stat-grid, .stat-grid-2 { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .timeline::before { left: 8px; }
  .tl-item { grid-template-columns: 1fr; gap: .8rem; }
  .tl-year { width: 76px; }
  .tl-year::after { display: none; }
  .mini-stats { flex-wrap: wrap; gap: 1.2rem; }
}

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