/* ================================================================
   5SEIS — SHARED STYLES
   Fuente única para: variables, cursor, scrollbar, nav, menu, footer
   Linkear en TODAS las páginas del sitio.
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }
@media (hover:none) { *, *::before, *::after { cursor: auto; } }
html, body { overflow-x: hidden; scroll-behavior: smooth; }

:root {
  --black  : #0A0A0A;
  --green  : #7CFF4F;
  --silver : #B8BFC2;
  --surface: #1A1A1A;
  --cream  : #F2F0EA;
  --white  : #F2F0EA;
  --teal   : #B8BFC2;
  --muted  : rgba(184,191,194,.45);
  --mono   : 'Roboto Mono', monospace;
  --sans   : 'Host Grotesk', system-ui, sans-serif;
  --px     : clamp(28px, 8vw, 140px);
}

body {
  background: var(--black); color: var(--white);
  font-family: var(--sans); font-weight: 400;
  -webkit-font-smoothing: antialiased; cursor: none;
}
@media (hover:none) { body { cursor: auto; } }
section { scroll-margin-top: 80px; }

/* ── TOP FADE — div inyectado por components.js ── */
#top-fade {
  position: fixed; top: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(to bottom, #0A0A0A 0%, transparent 100%);
  pointer-events: none;
  z-index: 550;
}

/* ── CURSOR — directo sin ralentización ── */
#cur {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  background: var(--white); border-radius: 50%;
  pointer-events: none; z-index: 9999; transform: translate(-50%,-50%);
  will-change: transform;
}
#cur.hidden { opacity: 0; transition: opacity .15s; }
@media (hover:none) { #cur { display: none; } }

/* ── SCROLL PROGRESS BAR ── */
#bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--green); z-index: 8000; transition: width .08s linear;
}

/* ── BACK TO TOP ── */
#totop {
  position: fixed; bottom: 1.8rem; right: 1.8rem; width: 40px; height: 40px;
  background: var(--surface); border: 1px solid rgba(184,191,194,.18); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: none; opacity: 0; pointer-events: none;
  transition: opacity .3s, border-color .2s; z-index: 500;
  font-size: 1rem; color: var(--white);
}
#totop.vis { opacity: 1; pointer-events: auto; }
#totop:hover { border-color: var(--green); color: var(--green); }
@media (hover:none) { #totop { cursor: pointer; } }

/* ══ NAV ══════════════════════════════════════════════════════ */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 600;
  padding: 1.4rem var(--px);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(to bottom, rgba(10,10,10,.55) 0%, transparent 100%);
  transition: background .3s ease, box-shadow .3s ease;
}
.nav-logo { display: block; height: 22px; text-decoration: none; transition: filter .3s ease; }
.nav-logo svg { height: 22px; width: auto; display: block; }

nav.over-green .nav-logo { filter: brightness(0) invert(1); }

.burger {
  background: none; border: none; outline: none; -webkit-appearance: none;
  cursor: none; display: flex; flex-direction: column; gap: 5px; padding: 6px;
}
@media (hover:none) { .burger { cursor: pointer; } }
.burger span {
  display: block; width: 24px; height: 1.5px; background: var(--white);
  transition: transform .35s ease, opacity .35s ease, background .3s ease;
}
nav.over-green .burger span { background: var(--black); }
body.open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ══ MENU ══════════════════════════════════════════════════════ */
.menu {
  position: fixed; inset: 0; background: var(--green); z-index: 500;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow: hidden;
  padding: clamp(4rem, 8vh, 6rem) var(--px) clamp(2rem, 5vw, 4rem);
  opacity: 0; pointer-events: none; transition: opacity .38s ease;
}
body.open .menu { opacity: 1; pointer-events: all; }
body.open .nav-logo { filter: brightness(0); }
nav.over-green .nav-logo { filter: brightness(0) invert(1); }
nav.scrolled:not(.over-green) {
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(184,191,194,.08);
}
/* Cuando el menú está abierto: ocultar top-fade y limpiar fondo de la nav */
body.open #top-fade { opacity: 0; }
body.open nav {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.menu-list { list-style: none; display: flex; flex-direction: column; gap: .05rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.menu-list a {
  display: inline-block;
  font-size: min(clamp(2.2rem, 7vw, 6.5rem), calc((100dvh - 16rem) / 5));
  font-weight: 800;
  line-height: .96; letter-spacing: -.02em; text-transform: uppercase;
  color: var(--black); text-decoration: none; transition: color .2s;
}
.menu-list a:hover { opacity: 1 !important; color: rgba(10,10,10,.18); }
.menu-foot p { display: none; }
body.open #totop { opacity: 0 !important; pointer-events: none !important; }

.menu-foot { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 1.4rem; flex-wrap: wrap; gap: 1rem; }
.menu-foot p { font-family: var(--mono); font-size: .65rem; color: rgba(10,10,10,.5); letter-spacing: .08em; }

.menu-soc { display: flex; gap: 1rem; list-style: none; align-items: center; }
.menu-soc a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(10,10,10,.25); color: rgba(10,10,10,.6);
  text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
.menu-soc a:hover { background: rgba(10,10,10,.12); border-color: var(--black); color: var(--black); }
.menu-soc svg { width: 15px; height: 15px; fill: currentColor; display: block; }

/* ── Lang switcher (menú) ── */
.lang-sw { display: flex; align-items: center; gap: .4rem; }
.lang-btn {
  background: none; border: none; cursor: none;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
  color: rgba(10,10,10,.35); padding: .3rem .4rem;
  text-transform: uppercase; transition: color .2s;
}
@media (hover: none) { .lang-btn { cursor: pointer; } }
.lang-btn:hover { color: rgba(10,10,10,.7); }
.lang-btn.active { color: var(--black); font-weight: 700; }
.lang-sep { color: rgba(10,10,10,.18); font-size: .55rem; }

/* ══ FOOTER ════════════════════════════════════════════════════ */
.ft { margin-top: clamp(1rem, 3vw, 3rem); }
.ft-main {
  display: grid; grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 8rem);
  padding: clamp(3rem, 6vw, 6rem) var(--px) clamp(2rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 640px) { .ft-main { grid-template-columns: 1fr; gap: 2.5rem; } }

.ft-logo { margin-bottom: 1.6rem; }
.ft-logo svg { height: 28px; width: auto; }

.ft-where { display: flex; flex-direction: column; gap: .55rem; }
.ft-where p {
  font-family: var(--mono); font-size: .63rem; color: var(--muted);
  letter-spacing: .06em; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.ft-where strong { color: var(--white); font-family: var(--sans); font-weight: 500; font-size: .72rem; }
.ft-pill {
  display: inline-flex; align-items: center; padding: .18rem .55rem;
  border: 1px solid rgba(32,227,216,.28); border-radius: 20px;
  font-family: var(--mono); font-size: .54rem; letter-spacing: .08em;
  color: var(--teal); text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s; cursor: default;
}
.ft-pill:hover { background: rgba(124,255,79,.08); border-color: rgba(124,255,79,.5); color: var(--green); }

.ft-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 5rem); }
.ft-col-ttl { font-family: var(--mono); font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.ft-col ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.ft-col a { font-size: .88rem; font-weight: 500; color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; transition: color .2s; }
.ft-col a:hover { color: var(--green); }
.ft-col .ext { font-size: .62rem; opacity: .45; }

.ft-end {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) var(--px) clamp(1.8rem, 3vw, 2.5rem);
  display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center;
  overflow: hidden;
}
/* Glow sin banding: blur sobre color sólido en lugar de gradiente */
.ft-end::before {
  content: '';
  position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
  width: 40%; height: 100px;
  background: rgba(124,255,79,.09);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
.ft-end > * { position: relative; z-index: 1; }
.ft-copy { font-family: var(--mono); font-size: .58rem; color: var(--muted); letter-spacing: .06em; }
.ft-legal { display: flex; gap: 1.8rem; justify-content: center; flex-wrap: wrap; }
.ft-legal a { font-family: var(--mono); font-size: .57rem; color: var(--muted); text-decoration: none; transition: color .2s; letter-spacing: .06em; }
.ft-legal a:hover { color: var(--white); }

/* ── REVEAL ANIMATION ── */
.r { opacity: 0; transform: translateY(32px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.r.in { opacity: 1; transform: none; }
