/* ============================================================
   PROTON sitio v2 — base compartida
   Clases que usan TODAS las secciones. CSS propio, sin frameworks.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(0,212,255,0.3); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Fondo ambiental (familia A: atmósfera viva) ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px; }
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.3;
  animation: drift 22s ease-in-out infinite alternate; }
.blob.cyan    { width: 520px; height: 520px; background: rgba(0,212,255,0.25); top: -12%; left: -8%; }
.blob.magenta { width: 460px; height: 460px; background: rgba(255,60,172,0.18); top: 55%; right: -10%; animation-delay: -7s; }
.blob.purple  { width: 400px; height: 400px; background: rgba(184,77,255,0.16); top: 28%; left: 52%; animation-delay: -14s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(60px,-40px) scale(1.12); } }

/* ---------- Layout ---------- */
.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; z-index: 1; padding: 96px 0; }
section.tight { padding: 64px 0; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); letter-spacing: -0.01em; }
p { color: var(--muted); }
p.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: #C6C6D6; max-width: 62ch; }

.label { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 3px; color: var(--cyan); margin-bottom: 18px; }
.mono { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; }
.editorial { font-family: var(--font-editorial); font-style: italic; color: #C6C6D6; }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 28px; backdrop-filter: blur(8px);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { border-color: var(--border-glow); transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,212,255,0.08); }
.card--top-line::before { content: ''; position: absolute; top: 0; left: 28px; right: 28px; height: 1px;
  background: var(--top-line); opacity: .75; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.92rem; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  border-radius: var(--r-el); padding: 13px 26px; cursor: pointer; border: 1px solid transparent;
  transition: all .22s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 24px rgba(0,212,255,.45), 0 0 12px rgba(255,60,172,.35); }
.btn-ghost { background: transparent; color: var(--cyan); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-glow); background: var(--surface); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Entradas animadas ---------- */
.rise { opacity: 0; animation: rise .8s var(--ease) both; animation-delay: var(--rise-delay, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.on { opacity: 1; transform: none; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(5,5,16,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
  font-weight: 700; letter-spacing: .06em; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .9rem; color: var(--muted); transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-ghost { color: var(--cyan); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.4rem; cursor: pointer; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 48px 0 40px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--muted); font-size: .88rem; }
.footer a:hover { color: var(--cyan); }


/* ---------- Footer (parcial unico: sections/_footer.html) ---------- */
.footer .wrap.foot-top { align-items: flex-start; gap: 48px; }
.foot-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display);
  font-weight: 700; letter-spacing: .06em; font-size: .95rem; }
.foot-id { display: grid; gap: 14px; max-width: 300px; }
.foot-tag { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.foot-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 36px; flex: 1 1 540px; }
.foot-col { display: grid; gap: 11px; align-content: start; }
.foot-h { margin: 0 0 3px; font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--cyan); }
/* .foot-links: el footer de una sola fila, todavia en uso por las paginas de aliados */
.foot-links, .foot-contacto { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  section { padding: 68px 0; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(5,5,16,.97); border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 16px var(--gutter); border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin: 16px var(--gutter) 20px; }
  .nav-toggle { display: block; }
  .footer .wrap.foot-top { gap: 36px; }
  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; }
}

/* ---------- Accesibilidad de movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal { opacity: 1 !important; transform: none !important; }
  .blob { display: none; }
}
