/* Chrome del sitio estático CronosFlow — cabecera, pie, WhatsApp, utilidades */
:root{
  --ink:#2c2760; --ink-soft:#433d7a; --muted:#6f699c;
  --violet:#7c3aed; --violet-d:#6d28d9; --violet-2:#a78bfa; --violet-3:#ddd6fe; --wash:#f6f3ff;
  --mint:#10b981; --line:#ece7fb; --wa:#25D366; --wa-d:#1ebe57;
  --header-h:84px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{margin:0;padding:0}
body{
  font-family:"Nunito Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color:var(--ink); background:#fff; min-height:100vh;
  display:flex; flex-direction:column; line-height:1.55;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--violet)}
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--violet); color:#fff;
  padding:8px 16px; z-index:1000;
}
.skip-link:focus{left:12px; top:12px}

/* Header */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.94);
  backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1120px; margin:0 auto; padding:10px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{
  display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink);
  min-width:0;
}
.brand picture{display:block; flex:0 0 auto; line-height:0}
.brand img{
  width:64px; height:64px; border-radius:16px; object-fit:cover;
  box-shadow:0 6px 16px -10px rgba(76,29,149,.35);
}
.brand span{
  font-family:"Fraunces",Georgia,serif; font-weight:700; font-size:1.25rem;
  letter-spacing:-0.02em; line-height:1.1;
}
.nav-toggle{
  display:none; width:44px; height:44px; border:1px solid var(--violet-3);
  background:#fff; border-radius:12px; cursor:pointer; color:var(--ink);
  align-items:center; justify-content:center; padding:0;
}
.nav-toggle svg{width:22px; height:22px}
.site-nav ul{
  list-style:none; margin:0; padding:0; display:flex; gap:6px; align-items:center;
}
.site-nav a{
  display:block; text-decoration:none; color:var(--ink-soft);
  font-weight:600; font-size:.95rem; padding:8px 14px; border-radius:999px;
  transition:background .2s, color .2s;
}
.site-nav a:hover{color:var(--violet); background:var(--wash)}
.site-nav a[aria-current="page"]{
  color:var(--violet); background:var(--wash);
}

@media (max-width:800px){
  .brand img{width:52px; height:52px; border-radius:14px}
  .brand span{font-size:1.08rem}
  .nav-toggle{display:inline-flex}
  .site-nav{
    position:absolute; left:0; right:0; top:100%;
    background:#fff; border-bottom:1px solid var(--line);
    padding:8px 16px 16px; display:none;
  }
  .site-nav.is-open{display:block}
  .site-nav ul{flex-direction:column; align-items:stretch; gap:4px}
  .site-nav a{padding:12px 14px}
}

/* Main grows */
.site-main{flex:1 0 auto}

/* Slim footer (páginas interiores, como el pie original de Astra) */
.site-footer{
  border-top:1px solid var(--line);
  background:#fff; color:var(--muted);
  font-size:.95rem;
}
.site-footer .footer-inner{
  max-width:1120px; margin:0 auto; padding:22px 24px;
  text-align:center;
}
.site-footer p{margin:0}
.site-footer .footer-legal{
  margin-top:8px;
  font-size:.84rem;
}
.site-footer .footer-legal a{
  color:var(--muted);
  font-weight:600;
  text-decoration:none;
}
.site-footer .footer-legal a:hover,
.site-footer .footer-legal a:focus-visible{
  color:var(--violet);
  text-decoration:underline;
}

/* WhatsApp flotante */
.wa-float{
  position:fixed; right:20px; bottom:20px; z-index:60;
  width:58px; height:58px; border-radius:50%;
  background:var(--wa); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 24px -8px rgba(37,211,102,.7);
  text-decoration:none;
  transition:transform .2s, box-shadow .2s, background .2s;
}
.wa-float:hover{background:var(--wa-d); transform:translateY(-2px); color:#fff}
.wa-float svg{width:30px; height:30px; display:block}
.wa-float::after{
  content:""; position:absolute; inset:-6px; border-radius:50%;
  border:2px solid rgba(37,211,102,.45);
  animation:waPulse 2.4s ease-out infinite;
  pointer-events:none;
}
@keyframes waPulse{
  0%{transform:scale(.85); opacity:.8}
  70%,100%{transform:scale(1.25); opacity:0}
}

/* Volver arriba */
#scroll-top{
  position:fixed; right:20px; bottom:90px; z-index:59;
  width:40px; height:40px; border-radius:10px; border:0;
  background:var(--violet); color:#fff; cursor:pointer;
  display:none; align-items:center; justify-content:center;
  box-shadow:0 8px 18px -10px rgba(124,58,237,.6);
}
#scroll-top.is-visible{display:flex}
#scroll-top svg{width:18px; height:18px}

/* Hueco para el botón flotante de WhatsApp en pantallas estrechas.
   120px deja el pie (copyright y enlace legal) por encima del botón
   y del control «volver arriba». */
@media (max-width:800px){
  body{padding-bottom:120px}
  .nav-toggle{flex-shrink:0}
  .site-nav{max-height:min(70vh, 420px); overflow-y:auto}
}
/* El botón fijo no debe montarse sobre el texto en 360–414 px. */
@media (max-width:480px){
  .wa-float{width:50px; height:50px; right:10px; bottom:10px}
  .wa-float svg{width:26px; height:26px}
  #scroll-top{right:14px; bottom:70px; width:38px; height:38px}
  .header-inner{padding:8px 14px; gap:10px}
  .site-footer .footer-inner{padding:20px 16px 24px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .wa-float::after{animation:none; display:none}
  .wa-float,.site-nav a,#scroll-top{transition:none}
}
