/* ============================================================
   FixRiver 2026 — estilos compartidos del sitio
   Base común + .reveal canónico + navbar + footer + helpers.
   Cargado por todas las páginas (home + showcases).
   El navbar y el footer se inyectan vía assets/site.js.
   ============================================================ */

/* ---------- base común ---------- */
* { box-sizing: border-box; }
/* overflow-x: clip evita scroll horizontal en móvil sin romper position: sticky
   (a diferencia de overflow: hidden, que sí lo rompería) */
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg-page); color: var(--text-body);
  font-family: var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }

/* anclas de la home: separación bajo el navbar fijo */
#servicios, #prueba-social, #faq, #contacto { scroll-margin-top: 84px; }

/* reveal-on-scroll canónico (todas las secciones lo comparten) */
.reveal { opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* páginas hijas: el contenido arranca bajo el navbar fijo */
.page-child { padding-top: 64px; }

/* =================== Navbar (glass) =================== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  /* visibility evita que los enlaces del navbar oculto (hero de la home) reciban foco con Tab;
     el delay deja terminar el fade-out de opacity antes de ocultar */
  visibility: hidden;
  transition: transform .62s cubic-bezier(.18,1.16,.32,1), opacity .4s var(--ease-out),
    visibility 0s linear .45s;
  background: rgba(7,11,18,0.55);
  backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-subtle); }
.nav.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto;
  visibility: visible; transition-delay: 0s, 0s, 0s; }
.nav.is-revealing { animation: navGlow 1.2s var(--ease-out) both; }
@keyframes navGlow {
  0%   { box-shadow: 0 10px 40px rgba(45,226,192,0); }
  35%  { box-shadow: 0 12px 46px rgba(45,226,192,0.30); }
  100% { box-shadow: 0 8px 28px rgba(0,0,0,0.35); } }

.nav__inner { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav__brand img { width: 28px; height: 28px; display: block;
  filter: drop-shadow(0 2px 10px rgba(45,226,192,0.25)); }
.nav__brand span { font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--text-strong); letter-spacing: -0.01em; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { position: relative; font-family: var(--font-body); font-size: 14.5px;
  color: var(--text-muted); text-decoration: none; padding: 6px 0;
  transition: color .2s var(--ease-out); }
.nav__links a:hover { color: var(--text-strong); }
.nav__links a.is-active { color: var(--aqua-400); }
.nav__links a.is-active::after { content:''; position:absolute; left:0; right:0; bottom:-2px;
  height:2px; background: var(--aqua-400); border-radius:2px; }

.nav__cta { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: #fff;
  padding: 9px 22px; border: none; border-radius: var(--radius-pill); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
  background: var(--gradient-nav);
  transition: transform .16s var(--ease-out), box-shadow .2s var(--ease-out); }
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(61,125,246,0.4); }

/* sheen que recorre el borde al bajar la barra */
.nav__sheen { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  overflow: hidden; pointer-events: none; }
.nav__sheen i { position: absolute; top: 0; bottom: 0; left: -45%; width: 45%;
  background: linear-gradient(90deg, transparent, var(--aqua-400), #6FF0D6, transparent); opacity: 0; }
.nav.is-revealing .nav__sheen i { animation: navSheen 1.0s var(--ease-out) .08s both; }
@keyframes navSheen {
  0%   { left: -45%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 102%; opacity: 0; } }

/* ----- Hamburguesa móvil ----- */
.nav__burger { display: none; position: relative; width: 44px; height: 44px; padding: 0; flex: none;
  cursor: pointer; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: var(--surface-raised);
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out); }
.nav__burger:hover { border-color: var(--border-aqua); }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px;
  background: var(--text-strong);
  transition: transform .25s var(--ease-out), opacity .2s var(--ease-out), top .25s var(--ease-out); }
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 21px; }
.nav__burger span:nth-child(3) { top: 27px; }
.nav.menu-open .nav__burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav__burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ----- Panel desplegable móvil (glass, coherente con el navbar) ----- */
.nav__panel { display: none; }

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__inner { padding: 0 20px; }

  .nav__panel { display: block; overflow: hidden; max-height: 0; opacity: 0;
    border-top: 1px solid transparent;
    background: rgba(7,11,18,0.92);
    backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
    transition: max-height .35s var(--ease-out), opacity .3s var(--ease-out), border-color .3s var(--ease-out); }
  .nav.menu-open .nav__panel { max-height: 80vh; opacity: 1; border-top-color: var(--border-subtle); }
  .nav__panel-links { display: flex; flex-direction: column; padding: 8px 20px 0; }
  .nav__panel-links a { position: relative; font-family: var(--font-body); font-size: 16px;
    color: var(--text-muted); text-decoration: none; padding: 15px 6px;
    border-bottom: 1px solid var(--border-subtle); transition: color .2s var(--ease-out); }
  .nav__panel-links a:hover, .nav__panel-links a.is-active { color: var(--aqua-400); }
  .nav__panel-links a.is-active::after { content: none; }
  .nav__panel-cta { display: block; margin: 16px 20px 20px; text-align: center;
    font-family: var(--font-body); font-weight: 600; font-size: 15px; color: #fff;
    padding: 14px 22px; border-radius: var(--radius-pill); text-decoration: none;
    background: var(--gradient-nav); }
}

/* =================== Footer =================== */
.ft { position: relative; background: var(--navy-950, #05080E);
  border-top: 1px solid var(--border-subtle); overflow: hidden; }
.ft::before { content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: min(760px, 80%); height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(45,226,192,0.55), transparent); }
.ft::after { content: ''; position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 320px; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(45,226,192,0.07), transparent 70%); }

.ft__inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto;
  padding: 68px 40px 30px; }
.ft__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.15fr; gap: 48px; }

.ft__brand-row { display: flex; align-items: center; gap: 12px; }
.ft__brand-row img { width: 34px; height: 34px; display: block; }
.ft__brand-row b { font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.01em; color: var(--text-strong); }
.ft__tag { margin: 18px 0 0; max-width: 30ch; font-size: 14.5px; line-height: 1.6;
  color: var(--text-muted); }
.ft__tag b { color: var(--text-body); font-weight: 600; }

.ft__social { display: flex; gap: 10px; margin-top: 24px; }
.ft__social a { width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--text-muted);
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  transition: color .22s var(--ease-out), border-color .22s var(--ease-out),
    background .22s var(--ease-out), transform .16s var(--ease-out); }
.ft__social a i { width: 18px; height: 18px; }
.ft__social a svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.ft__social a:hover { color: var(--aqua-400); border-color: rgba(45,226,192,0.45);
  background: rgba(45,226,192,0.08); transform: translateY(-2px); }

.ft__col h4 { margin: 0 0 18px; font-family: var(--font-body); font-weight: 600;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--aqua-400); }
.ft__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.ft__col a { color: var(--text-body); font-size: 14.5px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  transition: color .2s var(--ease-out); }
.ft__col a::before { content: ''; width: 0; height: 1px; background: var(--aqua-400);
  transition: width .22s var(--ease-out); }
.ft__col a:hover { color: var(--text-strong); }
.ft__col a:hover::before { width: 12px; }

.ft__contact a.mail { font-family: var(--font-body); font-size: 15px; color: var(--text-strong);
  text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
  transition: color .2s var(--ease-out); }
.ft__contact a.mail i { width: 16px; height: 16px; color: var(--aqua-400); }
.ft__contact a.mail:hover { color: var(--aqua-400); }
.ft__wa { margin-top: 16px; display: inline-flex; align-items: center; gap: 9px;
  white-space: nowrap;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; text-decoration: none;
  color: var(--text-on-bright); padding: 11px 18px; border-radius: var(--radius-pill);
  background: var(--gradient-iris); box-shadow: var(--glow-iris);
  transition: transform .16s var(--ease-out), filter .2s var(--ease-out); }
.ft__wa i { width: 16px; height: 16px; }
.ft__wa:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ft__wa:active { transform: scale(0.975); }
.ft__hours { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-dim); }

.ft__bottom { position: relative; z-index: 1; max-width: 1200px; margin: 52px auto 0;
  padding: 22px 40px 0; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.ft__copy { font-size: 12.5px; color: var(--text-dim); }
.ft__copy b { color: var(--text-muted); font-weight: 600; }
.ft__legal { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.ft__legal a { font-size: 12.5px; color: var(--text-dim); text-decoration: none;
  transition: color .2s var(--ease-out); }
.ft__legal a:hover { color: var(--text-body); }
.ft__legal .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-600); }

@media (max-width: 860px) {
  .ft__grid { grid-template-columns: 1fr 1fr; gap: 38px 28px; }
  .ft__brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .ft__inner { padding: 48px 22px 26px; }
  .ft__grid { grid-template-columns: 1fr; gap: 34px; }
  .ft__bottom { padding: 20px 22px 0; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav { transition: none; } .nav.is-revealing { animation: none; }
  .nav__panel, .nav__burger span { transition: none; }
}
