/* =========================================================
   PID Oviedo — Landing Jornadas Plataforma Inteligente de Destino
   ========================================================= */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Barlow Black";
  src: url("../assets/fonts/Barlow-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basis Grotesque";
  src: url("../assets/fonts/BasisGrotesque-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basis Grotesque";
  src: url("../assets/fonts/BasisGrotesque-Medium.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --azul: #1a75cf;
  --azul-osc: #145fb0;
  --azul-deep: #0e4e96;
  --tinta: #1d1d1b;
  --gris: #5b5b59;
  --gris-claro: #f3f5f8;
  --blanco: #ffffff;
  --max: 1180px;
  --radio: 14px;
  --font-display: "Barlow Black", "Arial Black", sans-serif;
  --font-body: "Basis Grotesque", "Helvetica Neue", Arial, sans-serif;
  --sombra: 0 10px 30px rgba(13, 50, 95, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tinta);
  background: var(--blanco);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--azul-osc); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  padding: 16px 34px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.btn--ghost { padding-left: 12px; }
.btn__play {
  width: 38px;
  height: 38px;
  color: #fff; /* color del círculo; el triángulo queda recortado (transparente) */
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: color 0.2s ease;
}
.btn__play svg { width: 100%; height: 100%; }
.btn--ghost:hover .btn__play { color: var(--azul); }
.btn--primary { background: var(--azul); color: #fff; }
.btn--primary:hover { background: var(--azul-osc); transform: translateY(-2px); }
/* Inversión de colores en hover: fondo blanco, letras azul */

.btn--invert:hover { background: #fff; color: var(--azul); transform: translateY(-2px); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
}
.btn--ghost:hover { background: #fff; color: var(--azul-osc); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* =========================================================
   Barra de logos institucionales
   ========================================================= */
.topbar { background: var(--azul); }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
}
.logos { display: flex; align-items: center; flex-wrap: wrap; }
.logos img { height: 70px; width: auto; }
.logos--right img { height: 70px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: #0e2a4a;
  color: #fff;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 0;
  animation: hero-zoom 13s ease-out both;
}
@keyframes hero-zoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(10, 40, 75, 0.82) 0%,
    rgba(10, 40, 75, 0.5) 38%,
    rgba(10, 40, 75, 0.12) 70%,
    rgba(10, 40, 75, 0.05) 100%
  );
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px 24px 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 900;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  margin: 0 0 28px;
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  animation: hero-in 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: hero-in 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.hero__actions .btn {
  height: 56px;
  padding-top: 0;
  padding-bottom: 0;
}
.hero__actions .btn__play { width: 34px; height: 34px; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Reveal al hacer scroll ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Aparición secuencial de los párrafos de la intro */
.intro__p.reveal:nth-of-type(1) { transition-delay: 0s; }
.intro__p.reveal:nth-of-type(2) { transition-delay: 0.45s; }
/* Escalonado de las tarjetas de jornadas */
.jornada.reveal:nth-child(1) { transition-delay: 0s; }
.jornada.reveal:nth-child(2) { transition-delay: 0.08s; }
.jornada.reveal:nth-child(3) { transition-delay: 0.16s; }
.jornada.reveal:nth-child(4) { transition-delay: 0.24s; }
.jornada.reveal:nth-child(5) { transition-delay: 0.32s; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(26, 117, 207, 0.55); }
  70% { box-shadow: 0 0 0 22px rgba(26, 117, 207, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 117, 207, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .hero__actions,
  .hero__media,
  .video__play span::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Secciones genéricas
   ========================================================= */
.section { padding: 84px 0; }
.section--tinted { background: var(--gris-claro); }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--azul);
  font-size: 0.95rem;
  margin: 0 0 14px;
}
h2.section__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  margin: 0 0 30px;
  letter-spacing: -0.04em;
}

.intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) 1.6fr;
  gap: 56px;
  align-items: start;
}
.intro__head { position: sticky; top: 24px; }
.intro__head .eyebrow { margin-bottom: 12px; }
.intro__head .section__title { margin: 0; }
.intro__body { max-width: 64ch; }
.intro__body p { margin: 0 0 22px; }
.intro__body p:last-child { margin-bottom: 0; }
.intro__lead { font-size: 1.3rem; line-height: 1.5; color: var(--tinta); }

/* =========================================================
   Vídeo — efecto scroll-expand (EXPERIMENTAL)
   El vídeo arranca contenido y se expande a pantalla completa
   al hacer scroll. La variable --p (0→1) la actualiza main.js.
   ========================================================= */
.scroll-expand {
  --p: 0;
  position: relative;
  height: 300vh;            /* zona de scroll que dura la expansión */
}
.scroll-expand__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  overflow: hidden;
}
.scroll-expand__head { text-align: center; padding: 0 24px; }
.scroll-expand__head .section__title { margin: 0; }
.scroll-expand__media {
  position: relative;
  overflow: hidden;
  /* arranca como rectángulo contenido y crece hasta pantalla completa */
  width: calc(640px + (100vw - 640px) * var(--p));
  height: calc(56vh + 44vh * var(--p));
  max-width: 100vw;
  border-radius: calc(var(--radio) * (1 - var(--p)));
  box-shadow: 0 30px 80px rgba(13, 50, 95, calc(0.28 * (1 - var(--p))));
}
.scroll-expand__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scroll-expand__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 40, 75, 0.6), rgba(10, 40, 75, 0.2));
}
.scroll-expand__caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-expand__play {
  position: relative;
  width: 64px; height: 64px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #fff;                 /* color del círculo; el triángulo queda recortado */
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.scroll-expand__play:hover { transform: scale(1.08); }
.scroll-expand__play svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35)); }
.scroll-expand__play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(26, 117, 207, 0.55);
  animation: pulse-ring 2.4s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-expand { height: auto; }
  .scroll-expand__sticky { position: static; height: auto; padding: 60px 0; }
  .scroll-expand__media { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radio); }
}

/* En móvil/tablet no hay anchura para que la expansión se aprecie, así que
   se desactiva el scroll-expand: vídeo en bloque normal a ancho completo. */
@media (max-width: 820px) {
  .scroll-expand { height: auto; }
  .scroll-expand__sticky { position: static; height: auto; padding: 48px 0; gap: 22px; }
  .scroll-expand__media { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radio); }
}

/* =========================================================
   Vídeo (facade YouTube, sin cookies hasta el clic)
   ========================================================= */
.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  background: #0e2a4a center / cover no-repeat;
  cursor: pointer;
}
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(10, 40, 75, 0.55), rgba(10, 40, 75, 0.25));
  border: 0;
  cursor: pointer;
  color: #fff;
}
.video__play span {
  position: relative;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: var(--azul);
  display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
.video__play span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(26, 117, 207, 0.55);
  animation: pulse-ring 2.4s ease-out infinite;
}
.video__play:hover span { transform: scale(1.08); background: var(--azul-osc); }
.video__play svg { width: 30px; height: 30px; margin-left: 4px; }

/* =========================================================
   Jornadas
   ========================================================= */
.jornadas__head { text-align: center; margin-bottom: 56px; }
.jornadas__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.jornada {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: var(--radio);
  padding: 30px 28px;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.jornada:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(13, 50, 95, 0.18);
  border-color: #cfe0f5;
}
.jornada__date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-family: var(--font-display);
  line-height: 1;
}
.jornada__day { font-size: 1.9rem; }
.jornada__month { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.jornada__time {
  font-family: var(--font-display);
  color: var(--azul-osc);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
h3.jornada__title { margin: 0; font-size: 1.18rem; line-height: 1.25; font-weight: 600; }
.jornada__format {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gris);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.jornada__format { color: var(--azul-osc); font-weight: 600; }
.jornada__tag {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eaf2fc;
  color: var(--azul-osc);
  font-weight: 600;
}
.jornadas__cta { text-align: center; margin-top: 52px; }
.jornadas__cta p { margin: 0 0 22px; font-size: 1.1rem; }

/* =========================================================
   CTA banda
   ========================================================= */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--azul);
  color: #fff;
  text-align: center;
  padding: 70px 0;
  background-image: url('../assets/img/bg-image.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 25%;
}
.cta-band::after {
  content: "";
  position: absolute;
  background: var(--azul);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 117, 207, .6);
}
/* Silueta de la catedral integrada en el azul (como en el dossier).
   La imagen es blanca sobre negro; con mix-blend-mode:screen el negro
   desaparece sobre el azul y la catedral queda como un fantasma claro. */
   /*
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;

  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
}
  */
.cta-band > .container { position: relative; z-index: 1; }
.cta-band h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  margin: 0 0 12px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.cta-band p { margin: 0 0 28px; opacity: 0.92; }

/* ---------- Compartir ---------- */
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; align-items: center; margin-top: 8px; }
.share__label { flex-basis: 100%; font-size: 0.9rem; opacity: 0.9; margin-bottom: 4px; }
.share a {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background 0.2s ease, transform 0.15s ease;
}
.share a:hover { background: #fff; color: var(--azul); transform: translateY(-2px); }
.share svg { width: 20px; height: 20px; }

/* =========================================================
   Footer
   ========================================================= */
.footer { position: relative; overflow: hidden; background: var(--tinta); color: #cfd4da; padding: 64px 0 32px; font-size: 0.95rem; }
.footer__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.footer__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(29, 29, 27, 0.78);
}
.footer .container { position: relative; z-index: 2; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer__brand h2 { font-family: var(--font-display); text-transform: uppercase; color: #fff; font-size: 1.6rem; margin: 0 0 10px; letter-spacing: -0.04em;}
.footer__contact { margin: 0; }
.footer__contact a { font-weight: 600; }
.footer__legal { display: flex; flex-direction: column; gap: 10px; }
.footer__legal h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: #9aa1ab; margin: 0 0 4px; }
.footer__logos {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
  margin: 40px 0 28px; padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__logos img { height: 34px; width: auto; opacity: 0.95; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #8b929c; font-size: 0.85rem; }

/* =========================================================
   Banner de cookies
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 32px));
  background: #fff;
  color: var(--tinta);
  border-radius: var(--radio);
  box-shadow: 0 18px 50px rgba(13, 50, 95, 0.28);
  padding: 22px 24px;
  z-index: 1000;
  display: none;
  border: 1px solid #e4e9f0;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner__row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: 0.95rem; }
.cookie-banner h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.1rem; margin: 0 0 6px; }
.cookie-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-banner .btn { padding: 12px 24px; font-size: 0.85rem; }
.btn--line { background: transparent; color: var(--azul-osc); border: 2px solid var(--azul); }
.btn--line:hover { background: var(--azul); color: #fff; }

/* =========================================================
   Modal genérico (vídeo emergente)
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(8, 24, 44, 0.88);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal.is-open { display: flex; }
.modal__box { width: min(960px, 100%); aspect-ratio: 16/9; position: relative; }
.modal__box iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.modal__media { width: 100%; height: 100%; }
.modal__media iframe, .modal__media video { width: 100%; height: 100%; border: 0; border-radius: 12px; display: block; }
.modal__close {
  position: absolute; top: -46px; right: 0;
  background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}

/* =========================================================
   Página legal (política de cookies)
   ========================================================= */
.legal { padding: 70px 0; }
.legal h1 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 8px; }
.legal h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.35rem; margin: 40px 0 12px; }
.legal .updated { color: var(--gris); margin: 0 0 30px; }
.legal table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border: 1px solid #e4e9f0; vertical-align: top; }
.legal th { background: var(--gris-claro); }
.legal .back { display: inline-block; margin-top: 36px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; gap: 24px; }
  .intro__head { position: static; }
  .intro__body { max-width: none; }
  .footer__top { grid-template-columns: 1fr; }
  .topbar__inner { justify-content: center; gap: 18px 26px; }
  .logos img { height: 44px; }
  .logos--right img { height: 42px; }
  .logos--left img { height: 56px; }
  .hero__inner { min-height: 56vh; padding-top: 70px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .section { padding: 60px 0; }
  .logos { gap: 18px; }
  .logos img, .logos--right img { height: 36px; }
  .logos--left img { height: 60px; }
  .cookie-banner__row { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions .btn { flex: 1; justify-content: center; }
  footer{text-align: center;}
  .footer__logos, .footer__bottom{justify-content: center;}
}
