/* =========================================================
   UCO – Universidad del Conocimiento
   ========================================================= */

:root {
  /* Marca: colores tomados del sitio actual en WordPress e isotipo */
  --c-blue: #3275bb;
  --c-blue-dark: #275e98;
  --c-green: #63af46;
  --c-cyan: #14a4ca;
  --c-purple: #7b266f;
  --c-red: #da4834;
  --c-yellow: #edc130;

  /* Neutros */
  --ink: #231f20;
  --text: #484445;
  --muted: #6b6768;
  --line: #e7e5e5;
  --bg: #ffffff;
  --bg-soft: #f7f6f6;

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(35, 31, 32, .25);
  --container: 1180px;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--c-blue); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--c-cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  padding: 14px 28px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(50, 117, 187, .8); }
.btn--primary:hover { background: var(--c-blue-dark); }
.btn--ghost { border-color: rgba(35, 31, 32, .25); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(35, 31, 32, .04); }
.btn--sm { padding: 9px 20px; font-size: .875rem; }
.btn--block { width: 100%; }

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-purple), var(--c-red), var(--c-yellow), var(--c-green), var(--c-cyan));
}

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section__head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section__head .eyebrow { justify-content: center; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.section__lead { font-size: 1.1rem; color: var(--muted); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo img { height: 34px; width: auto; }
.header.is-scrolled { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 600; font-size: .93rem; text-decoration: none;
  color: var(--ink); position: relative; padding: 4px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--c-blue); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.header__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.header__toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.header.is-open .header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.is-open .header__toggle span:nth-child(2) { opacity: 0; }
.header.is-open .header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1000px 600px at 75% 40%, #f3f2f2 0%, #fff 65%);
  min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
}
.hero__ribbons { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .14; }
.hero__ribbons path { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 3.2s ease forwards; }
.hero__ribbons path:nth-child(2) { animation-delay: .15s; }
.hero__ribbons path:nth-child(3) { animation-delay: .3s; }
.hero__ribbons path:nth-child(4) { animation-delay: .45s; }
.hero__ribbons path:nth-child(5) { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 24px; }
.hl { font-style: italic; background-clip: text; -webkit-background-clip: text; color: transparent; padding-right: .08em; }
.hl--a { background-image: linear-gradient(90deg, var(--c-purple), var(--c-red)); }
.hl--b { background-image: linear-gradient(90deg, var(--c-green), var(--c-cyan)); }
.hl--c { background-image: linear-gradient(90deg, var(--c-yellow), var(--c-red)); }
.hero__lead { font-size: 1.15rem; color: var(--text); max-width: 520px; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%; max-width: 560px; margin-left: auto;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }

.hero__scroll { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(35, 31, 32, .3); border-radius: 20px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Novedades / Evento ---------- */
.novedades { background: var(--bg-soft); }
.event { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.badge {
  display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px;
  font-family: var(--font-head); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-blue); background: #e3edf7;
}
.event__question { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--ink); line-height: 1.45; border-left: 4px solid var(--c-blue); padding-left: 16px; }

.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--radius); box-shadow: var(--shadow); background: #ddd;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 820 / 1012; object-fit: cover; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.carousel__btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; transition: background .2s, color .2s;
}
.carousel__btn:hover { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: #d0cdcd; cursor: pointer; transition: width .3s, background .3s; }
.carousel__dots button[aria-current="true"] { width: 24px; background: var(--c-blue); }

.event__facts { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.event__facts li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.event__facts--wide { grid-column: 1 / -1; }
.event__facts svg { flex: 0 0 24px; width: 24px; height: 24px; fill: none; stroke: var(--c-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.event__facts small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.event__facts strong { display: block; font-family: var(--font-head); color: var(--ink); line-height: 1.35; }
.event__facts span { font-size: .9rem; color: var(--muted); }
.event__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 18px; }
.event__note { font-size: .88rem; color: var(--muted); }
.tags { font-size: .85rem; color: var(--c-blue); font-weight: 500; word-spacing: .3em; margin: 0; }

/* ---------- Nosotros ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 30px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; overflow: hidden;
}
.pillar::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.pillar img { width: 92px; height: 92px; margin-bottom: 20px; }
.pillar h3 { font-size: 1.35rem; margin-bottom: 12px; }
.pillar p { color: var(--muted); margin: 0; font-size: .96rem; }

.stats {
  margin: 72px 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: var(--shadow);
}
.stats::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: linear-gradient(90deg, var(--c-purple), var(--c-cyan), var(--c-red), var(--c-yellow)); }
.stat { padding: 40px 20px; text-align: center; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dd { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1; }
.stat dt { margin-top: 10px; color: var(--muted); font-size: .9rem; }
/* Mismo orden de colores que los contadores del sitio actual */
.stat:nth-child(1) dd { color: var(--c-purple); }
.stat:nth-child(2) dd { color: var(--c-cyan); }
.stat:nth-child(3) dd { color: var(--c-red); }
.stat:nth-child(4) dd { color: var(--c-yellow); }

/* ---------- Ecosistema ---------- */
.ecosistema { background: var(--bg-soft); }
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 112px); }
.feature--reverse .feature__media { order: 2; }
.feature__media { position: relative; }
.feature__media::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-green), var(--c-cyan)); opacity: .9; z-index: 0;
}
.feature--reverse .feature__media::before { inset: 24px 24px -24px -24px; background: linear-gradient(135deg, var(--c-yellow), var(--c-red)); }
.feature__media img { position: relative; z-index: 1; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.feature__num { font-family: var(--font-head); font-weight: 800; font-size: 3.5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px #c9c6c6; display: block; margin-bottom: 8px; }
.feature__body h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.feature__body p { color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 500; color: var(--ink); }

/* ---------- Contacto ---------- */
.contacto { background: #fff; position: relative; overflow: hidden; }
.contacto::before {
  content: ""; position: absolute; width: 640px; height: 640px; left: -260px; bottom: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 72, 52, .10), transparent 65%);
}
.contacto::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -240px; top: -240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 38, 111, .10), transparent 65%);
}
.contact { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact__intro p { font-size: 1.05rem; max-width: 440px; }

.social { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 12px; }
.social a {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .2s;
}
.social a:hover { background: var(--c-blue); border-color: var(--c-blue); transform: translateY(-3px); }
.social svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.social svg .fill { fill: var(--ink); stroke: none; }
.social a:hover svg { stroke: #fff; }
.social a:hover svg .fill { fill: #fff; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form__row { margin-bottom: 18px; }
.form label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--ink); margin-bottom: 6px; }
.form input,
.form textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fafafa;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--c-blue); background: #fff; box-shadow: 0 0 0 4px rgba(50, 117, 187, .15); }
.form .is-invalid { border-color: var(--c-red); }
.hp { position: absolute; left: -9999px; }
.form__status { margin: 14px 0 0; font-size: .9rem; text-align: center; min-height: 1.4em; }
.form__status.ok { color: #3d8a26; }
.form__status.err { color: var(--c-red); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, .6); padding: 40px 0; font-size: .88rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__iso { width: 56px; height: 56px; background: #fff; border-radius: 50%; padding: 4px; }
.footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: #fff; }
.footer__copy { margin: 0; }

/* Evita que el contenido ancho (carrusel, hashtags) estire las grillas */
.hero__inner > *,
.event > *,
.feature > *,
.contact > * { min-width: 0; }
.tags { overflow-wrap: anywhere; }

/* ---------- Animaciones de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__ribbons path { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner,
  .event,
  .feature,
  .contact { grid-template-columns: 1fr; }
  .hero { text-align: left; }
  .hero__media { order: -1; max-width: 380px; margin: 0 auto -20px; }
  .event__gallery { max-width: 420px; margin-inline: auto; width: 100%; }
  .feature--reverse .feature__media { order: 0; }
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 16px; }
  .header__logo img { height: 26px; }
  .header__toggle { display: block; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: #fff; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav a:not(.btn) { color: var(--ink); font-size: 1.4rem; }
  /* backdrop-filter crearía un containing block y rompería el menú fixed */
  .header.is-open { backdrop-filter: none; background: #fff; }
  .header.is-open .nav { opacity: 1; visibility: visible; }
  .header.is-open .header__logo img { position: relative; z-index: 2; }
  .hero__scroll { display: none; }
  .event__facts { grid-template-columns: 1fr; }
  .feature__media::before { inset: 14px -10px -14px 10px; }
  .feature--reverse .feature__media::before { inset: 14px 10px -14px -10px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
}
