/* ==========================================================================
   Jornada Experiencias de Gestión en Salud — sitio estático
   Migrado fielmente desde Strikingly (jornadasgestionsalud.com)
   Tokens reales: Montserrat · #6f2deb · #1e0349 · #f0e7fe (getComputedStyle)
   ========================================================================== */

:root {
  color-scheme: light;
  --purple: #6f2deb;
  --purple-dark: #5a1fd4;
  --indigo: #1e0349;
  --indigo-2: #3a0a6b;
  --lavender: #f0e7fe;
  --ink: #1d2023;
  --slate: #50555c;
  --line: #e2e2e2;
  --footer: #1c1c1c;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: color .25s ease, opacity .25s ease; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.text-center { text-align: center; }

.section-title {
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--ink);
  text-align: center;
  letter-spacing: .5px;
}
.section-subtitle {
  font-weight: 400;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  color: var(--purple);
  text-align: center;
  margin-top: 14px;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .3px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(111,45,235,.35); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn-outline:hover { background: #fff; color: var(--indigo); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  padding: 16px 0;
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.navbar-logo { width: 40px; height: 40px; border-radius: 50%; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-weight: 600; font-size: .95rem; position: relative; padding: 4px 0; }
.nav-links a.active { font-weight: 700; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: currentColor; transition: width .25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ambos heroes son oscuros → texto del nav siempre blanco */
.navbar { color: #fff; }
.navbar.scrolled {
  background: rgba(30, 3, 73, .97);
  color: #fff;
  padding: 10px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}
.navbar.scrolled .navbar-logo { width: 34px; height: 34px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: 0; padding: 6px; color: inherit; }
.hamburger span { width: 26px; height: 2px; background: currentColor; border-radius: 2px; transition: all .3s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 82vh, 700px);
  display: flex; align-items: center;
  color: #fff;
  background: #2a0a4a center/cover no-repeat;
  overflow: hidden;
}
.hero--2025 { background-image: url('../images/hero-2025.webp'); }
.hero--2024 { background-image: url('../images/hero-2024.webp'); }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,3,52,.78) 0%, rgba(20,3,52,.45) 45%, rgba(20,3,52,.15) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 640px; padding-top: 60px; }
.hero-eyebrow { font-size: 1.05rem; font-weight: 400; opacity: .95; margin-bottom: 14px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.12;
  margin-bottom: 22px;
}
.hero-date { font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 700; margin-bottom: 6px; }
.hero-place { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 400; opacity: .95; margin-bottom: 28px; }
.hero-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-buttons .btn { min-width: 150px; text-align: center; }

/* ---------- Mission ---------- */
.mission { background: #fff; }
.mission-cards { max-width: 880px; margin: 44px auto 0; display: flex; flex-direction: column; gap: 26px; }
.mission-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px 38px;
}
.mission-card h3 { font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 18px; color: var(--ink); }
.mission-card p { color: var(--slate); font-size: 1rem; margin-bottom: 14px; }
.mission-card p:last-child { margin-bottom: 0; }
.mission-card strong { color: var(--ink); font-weight: 700; }

/* ---------- People grid (directores / ponentes) ---------- */
.people { background: #fff; }
.people-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 28px;
  max-width: 960px; margin: 46px auto 0;
}
.person { text-align: center; }
.person-photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 16px; box-shadow: 0 8px 26px rgba(0,0,0,.12);
  background: #f1f1f1;
}
.person-name { font-weight: 600; font-size: 1.05rem; margin: 16px 0 4px; color: var(--ink); }
.person-role { font-size: .85rem; color: var(--slate); line-height: 1.4; }

/* ---------- Organiza / Auspicia ---------- */
.partners { background: #fff; padding-bottom: 72px; }
.partners-block { text-align: center; padding: 28px 0; }
.partners-block + .partners-block { border-top: 1px solid var(--line); }
.partners-block h2 { font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--ink); margin-bottom: 26px; }
.partners-logo { margin: 0 auto; max-height: 110px; width: auto; }
.partners-logo--sm { max-height: 84px; }

/* ---------- Lugar ---------- */
.place { background: var(--lavender); }
.place-map {
  max-width: 880px; margin: 36px auto 28px;
  border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(30,3,73,.12);
  background: #ddd;
}
.place-map iframe { display: block; width: 100%; height: 360px; border: 0; }
.place-info { text-align: center; }
.place-info p { font-weight: 700; color: var(--ink); margin-top: 8px; }

/* ---------- Aprendamos / CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-2) 100%);
  color: #fff; overflow: hidden;
}
.cta .container { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; }
.cta-text h2 { font-weight: 400; font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.1; margin-bottom: 14px; }
.cta-text p { font-size: 1.15rem; opacity: .92; margin-bottom: 26px; }
.cta-art img { width: 320px; max-width: 38vw; }

/* ---------- Recordings (2024) ---------- */
.recordings { background: var(--lavender); }
.recordings-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start;
  max-width: 980px; margin: 40px auto 0;
}
.recordings-agenda p { color: var(--slate); margin-bottom: 14px; }
.recordings-agenda ul { margin: 22px 0; }
.recordings-agenda li { font-size: 1.1rem; padding: 7px 0; color: var(--ink); }
.recordings-agenda li a { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--purple); padding-bottom: 1px; }
.recordings-agenda li a:hover { color: var(--purple); }
.recordings-videos { display: flex; flex-direction: column; gap: 16px; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(30,3,73,.18); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-feature { margin: 40px auto 0; max-width: 880px; }

/* ---------- Gallery (2024) ---------- */
.gallery { background: #fff; }
.gallery-grid {
  column-count: 4; column-gap: 12px; margin-top: 40px;
}
.gallery-grid img {
  width: 100%; margin-bottom: 12px; border-radius: 10px; break-inside: avoid;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: rgba(255,255,255,.6); padding: 48px 0 32px; text-align: center; }
.footer-logo { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 16px; }
.footer-email { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); font-size: .95rem; margin-bottom: 8px; }
.footer-email:hover { color: #fff; }
.footer-email svg { width: 16px; height: 16px; }
.footer-org { font-size: .9rem; }
.footer-copy { margin-top: 22px; font-size: .8rem; color: rgba(255,255,255,.4); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: rgba(30,3,73,.97); color: #fff;
  display: none; align-items: center; justify-content: center; gap: 18px;
  padding: 16px 24px; flex-wrap: wrap; font-size: .9rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}
.cookie-banner.show { display: flex; }
.cookie-banner a { color: #c9a9ff; text-decoration: underline; }
.cookie-banner button {
  background: var(--purple); color: #fff; border: 0; border-radius: 4px;
  padding: 9px 22px; font-family: inherit; font-weight: 700; font-size: .85rem; cursor: pointer;
}
.cookie-banner button:hover { background: var(--purple-dark); }

/* ---------- Legal page ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 130px 24px 80px; }
.legal h1 { font-weight: 400; font-size: 2.2rem; margin-bottom: 8px; }
.legal h2 { font-weight: 600; font-size: 1.2rem; margin: 28px 0 10px; }
.legal p { color: var(--slate); margin-bottom: 14px; }
.legal a { color: var(--purple); text-decoration: underline; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .recordings-grid { grid-template-columns: 1fr; }
  .gallery-grid { column-count: 3; }
}
@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 18px; align-items: flex-start;
    background: rgba(30,3,73,.98); color: #fff;
    padding: 22px 28px; display: none;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero { min-height: 560px; }
  .cta .container { grid-template-columns: 1fr; text-align: center; }
  .cta-text { order: 2; }
  .cta-art { order: 1; }
  .cta-art img { width: 220px; max-width: 60vw; margin: 0 auto; }
  .hero-buttons { align-items: stretch; }
  .mission-card { padding: 26px 24px; }
}
@media (max-width: 480px) {
  .people-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .gallery-grid { column-count: 2; }
  .section { padding: 56px 0; }
}

/* ==========================================================================
   Dark mode — capa aditiva que respeta el SO (prefers-color-scheme).
   El tema claro queda intacto; aquí solo se invierten las secciones CLARAS.
   Se dejan como están: navbar, hero (foto oscura), CTA indigo, footer,
   cookie-banner y 404 (ya oscuros). La banda de auspiciadores se mantiene
   como "isla clara" porque los logos son oscuros sobre transparente.
   Ver ~/.claude/playbooks/dark-mode-playbook.md
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* Superficies oscuras */
    --bg: #121212;
    --surface: #1c1c1c;
    --surface-2: #242424;
    --hairline: rgba(255, 255, 255, .12);
    --accent: #c9a6f2;            /* púrpura brillante para acentos de texto */

    /* Re-tokenización de las variables del tema claro hacia oscuro */
    --ink: #ffffff;              /* texto fuerte → blanco */
    --slate: #d8d8d8;            /* texto secundario → claro brillante (no gris medio) */
    --line: rgba(255, 255, 255, .12);
    --lavender: #18131f;         /* bandas lavanda → banda oscura con tinte violáceo */
  }

  body { background: var(--bg); }

  /* Secciones con fondo #fff literal → oscuro */
  .mission,
  .people,
  .gallery { background: var(--bg); }

  /* Placeholders mientras cargan imágenes / iframe del mapa */
  .person-photo { background: var(--surface-2); }
  .place-map { background: var(--surface-2); }

  /* Acentos de texto → versión brillante del púrpura (nunca el tono medio) */
  .section-subtitle { color: var(--accent); }
  .recordings-agenda li a { border-bottom-color: var(--accent); }
  .recordings-agenda li a:hover { color: var(--accent); }
  .legal a { color: var(--accent); }

  /* Isla clara: logos de auspiciadores (oscuros sobre transparente) →
     mantener panel claro y su texto interior oscuro para no perderlos. */
  .partners { background: #fff; }
  .partners-block h2 { color: #1d2023; }
  .partners-block + .partners-block { border-top-color: #e2e2e2; }
}
