:root{
  color-scheme: light;
  --bg-a:#37c0f6;
  --bg-b:#1578e8;
  --bg-c:#0a44bf;
  --ink:#f4f8ff;
  --muted:#d1def6;
  --accent:#95ecff;
  --line:rgba(192,223,255,.24);
  --tile:rgba(7,43,126,.22);
  --tile-hover:rgba(9,58,160,.38);
  --footer:#c4d3ea;
  --scrim-left:rgba(6,31,87,.34);
  --scrim-mid:rgba(6,31,87,.10);
  --hero-filter:saturate(1.03) contrast(1.02);
  --cloud:#f1f6fb;
  --cloud-shadow:rgba(7,31,87,.15);
  --glow-opacity:.92;
}
:root[data-theme="dark"]{
  color-scheme: dark;
  --bg-a:#1265c1;
  --bg-b:#072b86;
  --bg-c:#021136;
  --ink:#f5f8ff;
  --muted:#c2d2ee;
  --accent:#9ee8ff;
  --line:rgba(173,209,255,.19);
  --tile:rgba(3,25,73,.28);
  --tile-hover:rgba(6,34,96,.44);
  --footer:#acc0df;
  --scrim-left:rgba(2,17,53,.43);
  --scrim-mid:rgba(2,17,53,.14);
  --hero-filter:brightness(.71) saturate(.98) contrast(1.04);
  --cloud:#eef5fb;
  --cloud-shadow:rgba(0,0,0,.20);
  --glow-opacity:.80;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;min-height:100svh;overflow-x:hidden;background:linear-gradient(135deg,var(--bg-a),var(--bg-b) 45%,var(--bg-c));color:var(--ink);font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;}
a{color:inherit}
.scene{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:linear-gradient(135deg,var(--bg-a),var(--bg-b) 45%,var(--bg-c));}
.scene::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--scrim-left) 0 33%,var(--scrim-mid) 50%,rgba(6,31,87,0) 72%);z-index:2}
.scene-photo{position:absolute;inset:0;z-index:1;background-image:url(../img/fondo-escritorio.webp);background-repeat:no-repeat;background-size:cover;background-position:center center;filter:var(--hero-filter);}
/* Iluminación óptica sobria: una sola lente, dos ciclos sincronizados de 6 s. */
.lens-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:4;overflow:hidden;pointer-events:none}
.lens-mobile{display:none}
/* Iluminación editorial de la lente: respiración cálida, continua y contenida. */
.lens-halo{opacity:.48;transform-box:fill-box;transform-origin:center;animation:wmcmfGoldenBreath 5.4s ease-in-out infinite}
.lens-core{opacity:.68;animation:wmcmfGoldenCore 5.4s ease-in-out infinite}
.lens-ring{opacity:.50;animation:wmcmfLensRing 5.4s ease-in-out infinite}
.lens-flare{opacity:0;transform-box:fill-box;transform-origin:center;animation:wmcmfLensSpark 6s ease-in-out infinite}
@keyframes wmcmfGoldenBreath{
  0%,100%{opacity:.42;transform:scale(.96)}
  48%{opacity:.94;transform:scale(1.18)}
  73%{opacity:.66;transform:scale(1.06)}
}
@keyframes wmcmfGoldenCore{
  0%,100%{opacity:.62}
  48%{opacity:1}
}
@keyframes wmcmfLensRing{
  0%,100%{opacity:.42}
  50%{opacity:.88}
}
@keyframes wmcmfLensSpark{
  0%,67%,100%{opacity:0;transform:scale(.62)}
  73%{opacity:0;transform:scale(.7)}
  78%{opacity:1;transform:scale(1.08)}
  83%{opacity:.26;transform:scale(1.26)}
  88%{opacity:0;transform:scale(1.32)}
}

/* Brillos puntuales del cerebro y del telescopio, cada uno con su propio ritmo. */
.twinkle{transform-box:fill-box;transform-origin:center;animation:wmcmfTwinkle 7.2s ease-in-out infinite}
.twinkle-orb{opacity:.78;fill:#c3f9ff;filter:drop-shadow(0 0 5px rgba(196,248,255,.85))}
.twinkle-core{opacity:1;fill:#ffffff;filter:drop-shadow(0 0 6px rgba(255,255,255,.96))}
.twinkle-star{opacity:.85;stroke:#fffaf0;stroke-linecap:round;fill:none;filter:drop-shadow(0 0 6px rgba(255,247,205,.95))}
.twinkle.gold .twinkle-orb{fill:#ffd975;filter:drop-shadow(0 0 5px rgba(255,214,109,.68))}
.twinkle.gold .twinkle-core{fill:#fff8e8}
@keyframes wmcmfTwinkle{
  0%,100%{opacity:.16;transform:scale(.9)}
  8%{opacity:.16;transform:scale(.92)}
  13%{opacity:1;transform:scale(1.16)}
  18%{opacity:.32;transform:scale(1.02)}
  24%,78%{opacity:.12;transform:scale(.96)}
  84%{opacity:.88;transform:scale(1.12)}
  90%{opacity:.18;transform:scale(1)}
}

.cloud-layer{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden;}
.cloud{position:absolute;display:block;width:clamp(88px,8.5vw,150px);opacity:.92;filter:drop-shadow(0 7px 12px var(--cloud-shadow));animation:cloudX linear infinite;}
.cloud svg{display:block;width:100%;height:auto;fill:var(--cloud)}
.cloud-1{top:11%;left:-12%;animation-duration:58s;}
.cloud-2{top:25%;left:-18%;width:clamp(72px,6.9vw,126px);animation-duration:76s;}
.cloud-3{top:43%;left:-15%;width:clamp(66px,6.4vw,116px);animation-duration:68s;}
.cloud-4{top:65%;left:-19%;width:clamp(76px,7.3vw,136px);animation-duration:84s;}
@keyframes cloudX{from{transform:translateX(0)}to{transform:translateX(132vw)}}
.site{position:relative;z-index:1;max-width:1460px;min-height:100svh;margin:0 auto;padding:26px clamp(22px,5vw,78px) 22px;display:flex;flex-direction:column;}
.topbar{display:flex;align-items:center;justify-content:flex-end;gap:16px;}
.topbar-right{display:flex;align-items:center;gap:20px;}
.topbar-year{font-size:.73rem;color:var(--muted);}
.theme-toggle{display:flex;align-items:center;gap:8px;color:var(--ink);border:1px solid var(--line);background:var(--tile);border-radius:999px;padding:9px 13px;cursor:pointer;font-size:.76rem;line-height:1;transition:background .2s,border-color .2s;}
.theme-toggle:hover{background:var(--tile-hover);border-color:var(--accent);}
.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;}
.theme-toggle .moon{display:none;}
:root[data-theme="dark"] .theme-toggle .moon{display:block;}
:root[data-theme="dark"] .theme-toggle .sun{display:none;}
:root:not([data-theme="dark"]) .theme-toggle .sun{display:block;}
main{flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;padding:34px 0 52px;width:min(48%,680px);}
.logo-frame{display:flex;align-items:center;justify-content:flex-start;width:178px;min-height:56px;margin:0 0 22px;padding:0;border:0;background:transparent;}
.logo{display:block;width:100%;max-height:70px;object-fit:contain;object-position:left center;}
.logo-fallback{display:none;font-size:1.1rem;}
.logo-frame.fallback .logo{display:none;}
.logo-frame.fallback .logo-fallback{display:block;}
.overline{text-transform:uppercase;letter-spacing:.22em;color:var(--accent);font-size:.69rem;font-weight:600;margin:0 0 18px;}
h1{font-size:clamp(1.9rem,3.2vw,3.08rem);font-weight:350;letter-spacing:-.042em;line-height:1.16;max-width:710px;margin:0 0 23px;text-wrap:balance;}
.lead{font-size:clamp(.95rem,1.23vw,1.05rem);line-height:1.72;color:var(--muted);max-width:590px;margin:0 0 33px;}
.links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;width:min(650px,100%);}
.destination{display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:10px 14px;border:1px solid var(--line);background:var(--tile);border-radius:5px;text-decoration:none;font-size:.86rem;font-weight:470;letter-spacing:.025em;backdrop-filter:blur(4px);transition:background .2s,border-color .2s,transform .2s;}
.destination:hover{transform:translateY(-2px);background:var(--tile-hover);border-color:var(--accent);}
.destination svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.description{font-size:.73rem;color:var(--muted);letter-spacing:.045em;margin:22px 0 0;}
.bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:18px;border-top:1px solid var(--line);font-size:.72rem;color:var(--footer);}
.bottom p{margin:0;}
.theme-toggle:focus-visible,.destination:focus-visible{outline:2px solid var(--accent);outline-offset:4px;}
@media (max-width:980px){
  main{width:min(54%,620px);}
}
@media (max-width:760px){
  .scene::before{background:linear-gradient(180deg,rgba(6,31,87,.42),rgba(6,31,87,.12) 34%,rgba(6,31,87,0) 100%);}
  .scene-photo{background-image:url(../img/fondo-movil-horizontal.webp);background-size:cover;background-position:center center;}
  .lens-desktop{display:none}
  .lens-mobile{display:block}
  .cloud{width:clamp(68px,19vw,110px);}
  .cloud-1{top:10%;}
  .cloud-2{top:22%;}
  .cloud-3{top:40%;}
  .cloud-4{top:58%;}
  .site{padding:18px 20px 16px;}
  .topbar-year{display:none;}
  .theme-toggle{padding:9px;}
  .theme-toggle span{display:none;}
  main{width:100%;align-items:center;justify-content:flex-start;text-align:center;padding:clamp(42px,8.5vh,92px) 0 clamp(250px,39svh,420px);}
  .logo-frame{justify-content:center;width:150px;margin:0 auto 14px;}
  .logo{object-position:center;}
  .overline{font-size:.59rem;margin-bottom:14px;}
  h1{font-size:clamp(1.7rem,7vw,2.45rem);margin-bottom:18px;}
  .lead{font-size:.91rem;margin-bottom:24px;max-width:620px;}
  .links{grid-template-columns:1fr;max-width:350px;gap:9px;}
  .destination{min-height:46px;}
  .description{margin-top:16px;}
  .bottom{font-size:.65rem;flex-direction:column;gap:6px;align-items:flex-start;}
}
@media (max-width:420px){
  .scene-photo{background-position:center center;}
  main{padding-bottom:clamp(220px,37svh,360px);}
}
@media (prefers-reduced-motion: reduce){
  .cloud{animation:none;}
  .lens-light{animation:none;}
  .lens-light{animation:none;}
  .destination{transition:none;}
  .destination:hover{transform:none;}
}

/* Pie de página institucional y enlaces a la comunidad */
.bottom{align-items:flex-start;gap:20px;flex-wrap:wrap}
.footer-institutional{display:flex;flex-direction:column;gap:6px;flex:0 1 auto}
.footer-anniversary{font-weight:600;color:var(--ink);font-size:.78rem;letter-spacing:.01em}
.footer-community{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;column-gap:16px;row-gap:10px;max-width:840px;margin-left:auto}
.footer-community a{text-decoration:none;color:var(--footer);font-size:.72rem;line-height:1.5;white-space:nowrap;transition:color .15s ease}
.footer-community a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.footer-community a:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:2px}
@media(max-width:980px){
  .footer-community{justify-content:flex-start;margin-left:0}
}
@media(max-width:760px){
  .bottom{gap:14px}
  .footer-community{width:100%;column-gap:14px;row-gap:9px}
  .footer-community a{font-size:.68rem;white-space:normal}
  .footer-anniversary{font-size:.73rem}
}

/* Contraste del texto institucional exclusivamente en modo oscuro. */
:root[data-theme="dark"] .lead { color: #fff; }

/* En móviles, únicamente la ilustración original: sin efectos sobre la lente. */
@media (max-width:760px){
  .lens-overlay,.lens-desktop,.lens-mobile{display:none!important}
}
@media (prefers-reduced-motion:reduce){
  .lens-halo,.lens-core,.lens-ring,.lens-flare,.twinkle{animation:none!important}
  .lens-flare{opacity:0!important}
}

/* Pantallas verticales: fondo abstracto sin personaje para lectura clara. */
@media (orientation:portrait){
  .scene-photo{background-image:url(../img/fondo-vertical.webp);background-size:cover;background-position:center center;}
  .lens-overlay{display:none!important;}
}
/* Pantallas horizontales: conservan la ilustración original con sus destellos. */
@media (orientation:landscape) and (max-width:760px){
  .scene-photo{background-image:url(../img/fondo-movil-horizontal.webp);}
}

/* Versión móvil: el párrafo queda despejado y el pie se acerca al borde inferior. */
@media (max-width:760px){
  .cloud-3{display:none!important;}
  .site{min-height:100svh;box-sizing:border-box;padding:12px 18px max(10px,env(safe-area-inset-bottom));}
  .topbar{flex:0 0 auto;}
  main{flex:1 0 auto;width:100%;justify-content:center;align-items:center;padding:9px 0 14px;}
  .logo-frame{width:132px;min-height:43px;margin:0 auto 9px;}
  .logo{max-height:51px;}
  .overline{margin-bottom:9px;letter-spacing:.19em;}
  h1{font-size:clamp(1.55rem,6.4vw,2.1rem);line-height:1.14;margin-bottom:12px;}
  .lead{font-size:clamp(.82rem,3.5vw,.92rem);line-height:1.49;margin-bottom:15px;}
  .links{gap:7px;}
  .destination{min-height:41px;padding:7px 10px;}
  .description{font-size:.68rem;line-height:1.4;margin-top:12px;}
  .bottom{flex:0 0 auto;width:100%;box-sizing:border-box;padding-top:11px;gap:9px;margin-top:0;}
  .footer-institutional{gap:3px;}
  .footer-anniversary{font-size:.71rem;}
  .footer-community{gap:5px 12px;justify-content:flex-start;}
  .footer-community a{font-size:.65rem;line-height:1.3;}
}
@media (max-width:760px) and (max-height:740px){
  .site{padding-top:8px;padding-bottom:max(7px,env(safe-area-inset-bottom));}
  main{padding:5px 0 9px;}
  .logo-frame{width:111px;min-height:34px;margin-bottom:5px;}
  .logo{max-height:41px;}
  .overline{font-size:.56rem;margin-bottom:7px;}
  h1{font-size:clamp(1.4rem,5.8vw,1.8rem);margin-bottom:9px;}
  .lead{font-size:.8rem;line-height:1.4;margin-bottom:11px;}
  .links{gap:5px;}
  .destination{min-height:36px;}
  .description{margin-top:8px;font-size:.63rem;}
  .bottom{padding-top:8px;gap:7px;}
}

/* Versión 28: vínculos inmediatamente bajo el aniversario, separados por barras. */
.bottom .footer-institutional{width:100%;flex:1 1 100%;}
.bottom .footer-community{margin:0;max-width:none;width:100%;justify-content:flex-start;column-gap:8px;row-gap:5px;}
.bottom .footer-separator{color:var(--footer);opacity:.72;user-select:none;}
@media(max-width:760px){
 .bottom .footer-community{column-gap:6px;row-gap:4px;}
 .bottom .footer-separator{font-size:.65rem;line-height:1.3;}
}

/* Cabecera: accesos directos a las cinco comunidades. */
.top-social{display:flex;align-items:center;gap:12px}
.top-social-label{font-size:.74rem;font-weight:600;letter-spacing:.012em;color:#fff;white-space:nowrap;text-shadow:0 1px 3px rgba(2,25,70,.16)}
.top-social-buttons{display:flex;align-items:center;gap:7px}
.social-icon{width:36px;height:36px;flex:none;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#1453a8;border:1px solid rgba(255,255,255,.84);border-radius:6px;text-decoration:none;box-shadow:0 2px 8px rgba(2,29,82,.12);transition:background-color .2s,box-shadow .2s,transform .2s}
.social-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.social-icon:hover{transform:translateY(-2px);box-shadow:0 5px 12px rgba(2,29,82,.20);background:#f5faff}
.social-icon:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media(max-width:760px){
  .topbar-right{gap:9px;width:100%;justify-content:space-between}
  .top-social{gap:8px;min-width:0;flex-wrap:wrap;row-gap:7px}
  .top-social-label{font-size:.64rem}
  .top-social-buttons{gap:5px}
  .social-icon{width:30px;height:30px;border-radius:5px}
  .social-icon svg{width:16px;height:16px}
  .site{padding-top:12px}
}
@media(max-width:380px){
 .top-social-label{font-size:.61rem}
 .social-icon{width:28px;height:28px}
 .top-social-buttons{gap:4px}
}
/* Los filtros GPU animados podían mostrar sus rectángulos de composición al navegar.
   Se conservan las siluetas vectoriales y los halos radiales SVG, sin filtros externos. */
.cloud{filter:none}
.twinkle-orb,.twinkle-core,.twinkle-star{filter:none}

/* Iconos sociales discretos, transparentes y sin texto visible. */
.top-social{gap:0}
.top-social-buttons{gap:6px}
.social-icon{width:29px;height:29px;border-radius:5px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.29);color:rgba(255,255,255,.9);box-shadow:none;backdrop-filter:none;transition:background-color .2s,border-color .2s,transform .2s}
.social-icon svg{width:15px;height:15px;stroke-width:1.8}
.social-icon:hover{background:rgba(255,255,255,.23);border-color:rgba(255,255,255,.55);box-shadow:none;transform:translateY(-1px)}
.social-youtube svg path:last-child{fill:#164b98}
@media(max-width:760px){.top-social-buttons{gap:5px}.social-icon{width:27px;height:27px;border-radius:5px}.social-icon svg{width:14px;height:14px}}
@media(max-width:380px){.social-icon{width:25px;height:25px}.top-social-buttons{gap:4px}}
/* Evita que las capas SVG animadas se rendericen como mosaicos blancos al salir. */
html.wmcmf-leaving .lens-overlay,html.wmcmf-leaving .cloud-layer{visibility:hidden!important;animation:none!important;filter:none!important}
html.wmcmf-leaving .lens-overlay *,html.wmcmf-leaving .cloud-layer *{animation:none!important;filter:none!important}

/* V33: el ancho del selector se reserva en ambos estados para impedir que
   los iconos sociales se desplacen al cambiar el texto del botón. */
@media (min-width:761px){
  .topbar-right .theme-toggle{
    width:205px;
    min-width:205px;
    flex:0 0 205px;
    justify-content:center;
    white-space:nowrap;
  }
  .topbar-right .top-social{flex-shrink:0;}
}
