/* ==========================================================================
   Refreska — estilos compartidos por todas las páginas
   (fuentes, reset, tokens, navegación, botones, footer, animaciones)
   Breakpoints: 991px (tablet) · 767px (móvil horizontal) · 479px (móvil)
   ========================================================================== */

@font-face {
  font-family: "Arbutus Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/arbutus-slab-400-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-var-latin.woff2) format("woff2");
}

/* Respaldos con las medidas de Inter y de Arbutus Slab (ancho promedio por peso, ascendente y descendente medidos frente a Arial y Georgia):
   mientras las fuentes cargan, el texto ocupa casi lo mismo y no se corre al llegar (CLS). Por eso no hace falta precargar fuentes. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 100 449;
  size-adjust: 106.42%;
  ascent-override: 91.06%;
  descent-override: 22.65%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 450 549;
  size-adjust: 107.45%;
  ascent-override: 90.18%;
  descent-override: 22.43%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 550 649;
  size-adjust: 100.9%;
  ascent-override: 96.04%;
  descent-override: 23.89%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 650 900;
  size-adjust: 101.86%;
  ascent-override: 95.13%;
  descent-override: 23.66%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Arbutus Slab Fallback";
  src: local("Georgia");
  size-adjust: 111.46%;
  ascent-override: 88.01%;
  descent-override: 24.13%;
  line-gap-override: 0%;
}

:root {
  --sys: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --slab: "Arbutus Slab", "Arbutus Slab Fallback", Georgia, serif;
  --inter: "Inter", "Inter Fallback", var(--sys);
  --ink: #1a1b1f;
  --blue: #034bff;
  --blue-btn: #044bff;
  --blue-footer: #1725ff;
  --black: #000;
  --white: #fff;
  /* Texto secundario: sobre fondo oscuro / sobre fondo claro */
  --mute-dark: #c4c4c4;
  --mute-light: #555;
  /* Verde de acento (referencia Ajuste.png), para puntos concretos */
  --green: #a7ff5f;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sys);
  font-size: 16px;
  line-height: 28px;
}
h1, h2, h3, h4, h5, h6 { margin: 10px 0; font-weight: 400; }
p { margin: 0 0 10px; }
b, strong { font-weight: 700; }
img { display: block; max-width: 100%; height: auto; border: 0; }
a { color: var(--ink); text-decoration: underline; transition: opacity .2s; display: block; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
/* Sobre fondos oscuros el anillo de foco es blanco */
.nav :focus-visible, .hero :focus-visible, .gallery :focus-visible, .brands :focus-visible, .cta :focus-visible, .faq :focus-visible, .closing :focus-visible, .footer :focus-visible { outline-color: #fff; }

/* Enlace para saltar la navegación: solo aparece al enfocarlo con el teclado */
.skip-link { position: fixed; left: 16px; top: 0; z-index: 1000; transform: translateY(-160%); padding: .75rem 1.25rem; border-radius: 999px; background: #fff; color: #000; font-weight: 600; text-decoration: none; box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.skip-link:focus-visible { transform: translateY(16px); outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .skip-link { transition: transform .15s ease; } }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.wrap { width: 100%; padding-left: 5%; padding-right: 5%; }
.wrap > * { max-width: 80rem; margin-left: auto; margin-right: auto; }
.wrap--60 > * { max-width: 60rem; }

/* ---------- Tipografía compartida ---------- */
.tagline { display: inline-block; color: #000; font-weight: 600; font-size: 16px; }
@media (max-width: 479px) {
  .tagline { font-family: var(--inter); font-size: 14px; font-weight: 700; line-height: 21px; text-align: left; }
}
.h2 { color: #000; text-align: center; font-family: var(--slab); font-size: 3rem; font-weight: 600; line-height: 1.2; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  color: #fff;
  background: #000;
  border: 0;
  border-radius: 100px;
  padding: .7rem 2.4rem;
  text-decoration: none;
  font-family: var(--inter);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 28px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
/* Todos los botones usan Inter (elementos funcionales); Arbutus queda para titulares.
   Lenguaje común: leve elevación al pasar, presión al hacer clic, flecha que avanza. */
.btn { transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(3, 75, 255, .55); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn--black:hover, .btn--dark-slab:hover { background: var(--blue); color: #fff; }
.btn--blue { display: inline-flex; justify-content: center; align-items: center; background: var(--blue-btn); }
.btn--blue:hover { background: #fff; color: #000; box-shadow: 0 10px 24px -10px rgba(255, 255, 255, .5); }
.btn--white { background: #fff; color: #000; }
.btn--white:hover { background: #000; color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
/* Negro compacto (nav). El nombre se conserva por compatibilidad. */
.btn--dark-slab { padding-left: 22px; padding-right: 22px; }
.btn--wide { padding-left: 39px; padding-right: 39px; }
.btn--arrow { display: inline-flex; align-items: center; gap: .55em; }
.btn--arrow::after, .arrow-link::after {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s var(--ease);
}
.btn--arrow:hover::after, .arrow-link:hover::after { transform: translateX(4px); }

/* Enlaces de texto: subrayado que se dibuja al pasar */
.link-u {
  display: inline;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.link-u:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-u--grow { background-size: 0 1px; }
.link-u--grow:hover { background-size: 100% 1px; background-position: 0 100%; }
.arrow-link { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 2%;
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0 15%;
  padding: 0 2% 0 3%;
  border-radius: 100px;
  /* Superficie oscura y estable: el logo y el menú se leen sobre fondos claros y oscuros */
  background: rgba(12, 12, 16, .9);
  background-image: radial-gradient(circle farthest-side at 0 0, rgba(3, 75, 255, .28), transparent 70%);
  border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .45);
}
.nav__container { display: flex; align-items: center; width: 100%; }
.nav__brand { flex: none; }
.nav__logo { width: 180px; }
.nav__overlay { flex: 1; display: flex; justify-content: flex-end; }
.nav__menu { display: flex; justify-content: flex-end; align-items: center; }
.nav__links { display: flex; color: #fff; }
.nav__link {
  color: #fff;
  padding: 1.5rem 1.1rem;
  font-family: var(--inter);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 50% calc(100% - 1.1rem) / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.nav__link:hover { background-size: calc(100% - 2.2rem) 1px; }
.nav__cta { display: flex; gap: 1rem; align-items: center; }
/* Borde gris sutil: el botón negro se distingue sobre la barra oscura y sobre fondos oscuros (sin degradados nuevos) */
.nav__cta .btn { border: 1px solid #5c5e68; }
.nav__cta .btn:hover { border-color: var(--blue); }
.nav__toggle { display: none; }

/* Submenú «Servicios»: se abre al pasar el cursor o con el teclado (Intro, Espacio; Escape lo cierra) */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__trigger { display: inline-flex; align-items: center; background-color: transparent; border: 0; cursor: pointer; text-align: left; }
.nav__chev { display: inline-block; flex: none; width: .42em; height: .42em; margin: -.18em 0 0 .55em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease); }
.nav__item--sub.is-open .nav__chev, .nav__item--sub:hover .nav__chev { transform: rotate(-135deg); margin-top: .2em; }
.nav__sub {
  position: absolute;
  top: calc(100% - .45rem);
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  padding: .5rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(12, 12, 16, .98);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .75);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
}
.nav__item--sub:hover .nav__sub, .nav__item--sub.is-open .nav__sub, html:not(.js) .nav__item--sub:focus-within .nav__sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s;
}
.nav__sublink { padding: .6rem 1rem; border-radius: 12px; color: #fff; font-family: var(--inter); font-size: .9375rem; font-weight: 500; line-height: 1.4; text-decoration: none; transition: background-color .2s var(--ease); }
.nav__sublink:hover, .nav__sublink:focus-visible { background: rgba(255, 255, 255, .1); }
.nav__sublink[aria-current="page"] { color: var(--green); }

.burger { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 48px; height: 48px; margin-right: -.5rem; }
.burger > span { display: block; width: 24px; height: 2px; background: #fff; transition: transform .4s cubic-bezier(.86, 0, .07, 1), width .2s cubic-bezier(.86, 0, .07, 1); }
.burger__mid { margin: 6px 0; }
.nav.is-open .burger__top { transform: translateY(8px) rotate(-45deg); transition-duration: .6s; }
.nav.is-open .burger__bot { transform: translateY(-8px) rotate(45deg); transition-duration: .6s; }
.nav.is-open .burger__mid { width: 0; }

@media (max-width: 991px) {
  .nav__toggle { display: block; margin-left: auto; }
  .nav__overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .nav__menu {
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .4s ease, visibility 0s .4s;
    flex-direction: column;
    flex: 1;
    margin-top: 10px;
    padding: 1rem 8% 2rem;
    border-radius: 20px;
    text-align: center;
    background: rgba(12, 12, 16, .97);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
  }
  .nav.is-open .nav__overlay { pointer-events: auto; }
  .nav.is-open .nav__menu { transform: none; visibility: visible; transition: transform .4s ease; }
  .nav__links { display: block; margin: 0 auto; }
  .nav__link { color: #fff; padding: .75rem 1rem; font-size: 1.0625rem; background-position: 50% calc(100% - .55rem); }
  .nav__item { display: block; }
  .nav__trigger { width: 100%; justify-content: center; text-align: center; }
  .nav__sub { position: static; display: none; min-width: 0; margin: 0 auto .5rem; padding: .25rem 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none; }
  .nav__item--sub.is-open .nav__sub { display: flex; }
  .nav__item--sub:hover .nav__sub { display: none; }
  .nav__item--sub.is-open:hover .nav__sub { display: flex; }
  .nav__item--sub:hover .nav__chev { transform: rotate(45deg); margin-top: -.18em; }
  .nav__item--sub.is-open .nav__chev, .nav__item--sub.is-open:hover .nav__chev { transform: rotate(-135deg); margin-top: .2em; }
  .nav__sublink { padding: .55rem 1rem; color: #d9d9e0; font-size: 1rem; text-align: center; }
  /* Sin JavaScript el botón del menú no funcionaría: no se muestra (los enlaces siguen en el pie de cada página) */
  html:not(.js) .nav__toggle { display: none; }
  .nav__cta .btn { border-color: transparent; }
  .nav__link:hover { background-size: calc(100% - 2rem) 1px; }
  .nav__cta { flex-direction: column; align-items: stretch; margin-top: 1rem; width: 100%; }
  .nav__cta .btn { background: #fff; color: #000; }
  .nav__cta .btn:hover { background: var(--blue); color: #fff; }
}
@media (max-width: 479px) {
  .nav { margin: 0 4%; padding: 6px 4px 6px 18px; }
  .nav__container { justify-content: space-between; }
  .nav__brand { width: 132px; }
  .nav__logo { width: 132px; }
  .nav__toggle { margin-left: auto; }
  .burger { margin-right: 0; }
}

/* ---------- Footer: llamado en azul eléctrico + navegación en negro ---------- */
.footer { color: #fff; font-family: var(--inter); }
.footer__inner { max-width: 80rem; margin: 0 auto; padding: 7rem 5% 6rem; box-sizing: content-box; }
.closing { color: #fff; font-family: var(--inter); }
.closing > .footer__inner { background: var(--blue); max-width: none; padding-left: max(5%, calc((100% - 80rem) / 2)); padding-right: max(5%, calc((100% - 80rem) / 2)); box-sizing: border-box; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; align-items: start; max-width: 80rem; margin: 0 auto; }
.footer__kicker { margin: 0 0 .75rem; color: #e3e3e3; font-size: 1.0625rem; }
.footer__go {
  gap: .4em;
  color: #fff;
  font-family: var(--slab);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  background: linear-gradient(#fff, #fff) 0 100% / 0 3px no-repeat;
  transition: background-size .4s var(--ease);
}
.footer__go:hover { background-size: calc(100% - 1.1em) 3px; }
.footer__go::after { width: .7em; height: .7em; }
.footer__hint { margin: 1.25rem 0 0; color: #e3e3e3; font-size: 1rem; }
.footer__title { margin: 0 0 1rem; color: #fff; font-family: var(--slab); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.footer__about p { margin: 0 0 .9rem; color: #e3e3e3; font-size: .9375rem; line-height: 1.6; }
/* Arquitectura del sitio sobre negro */
.footer__base { background: #000; }
.footer__inner--base { padding-top: 4.5rem; padding-bottom: 2.5rem; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.footer__col-title { margin-bottom: .35rem; color: var(--green, var(--mute-dark)); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.footer__link { color: #fff; font-size: 1rem; line-height: 1.5; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #222; }
.footer__brand { display: inline-flex; align-items: center; gap: 1rem; }
.footer__logo { width: 52px; height: auto; }
.footer__credit { color: var(--mute-dark); font-size: .875rem; }
.footer__social { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  color: #fff;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.footer__social-link svg { width: 1.25rem; height: 1.25rem; }
.footer__social-link:hover { background: #fff; border-color: #fff; color: #000; transform: translateY(-2px); }

@media (max-width: 991px) {
  .footer__top { grid-template-columns: 1fr; gap: 3rem; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .closing > .footer__inner { padding-top: 5rem; padding-bottom: 4rem; }
  .footer__bottom { flex-direction: column-reverse; align-items: flex-start; }
}

/* ---------- Animaciones de entrada (scroll) ---------- */
.js [data-anim] { opacity: 0; }
.js [data-anim="up"] { transform: translateY(28px); }
.js [data-anim="left"] { transform: translateX(-28px); }
.js [data-anim="right"] { transform: translateX(28px); }
/* Entrada más sutil (galerías de proyectos): 18 px */
.js [data-anim="rise"] { transform: translateY(18px); }
/* Seguridad: si main.js no llega a ejecutarse (bloqueo, red), nada queda oculto; con main.js activo esta regla no aplica */
@keyframes rfk-reveal { to { opacity: 1; transform: none; } }
html.js:not(.js-ok) [data-anim] { animation: rfk-reveal .01s 4s forwards; }
.js [data-anim].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}

/* ---------- Aviso de medición (Aceptar / Rechazar) ----------
   Franja inferior compacta. Clara sobre el fondo oscuro del sitio para distinguirse, con borde y sombra superiores; no hay capa que oscurezca
   la pantalla y no bloquea toques ni desplazamiento. Mientras está visible, la página reserva su alto al final (analytics.js → --rfk-consent-h)
   para que no tape el pie. Rechazar y Aceptar tienen el mismo estilo (mismo peso). Se muestra solo mientras no haya decisión. */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .625rem 1rem calc(.625rem + env(safe-area-inset-bottom, 0px));
  background: #f4f4f1;
  color: #101014;
  border-top: 1px solid rgba(16, 16, 20, .2);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .35);
  font-family: var(--inter);
}
.consent[hidden] { display: none; }
.consent:focus { outline: none; }
.consent :focus-visible { outline: 2px solid #034bff; outline-offset: 2px; }
.consent__text { margin: 0; color: #1c1c22; font-size: .8125rem; line-height: 1.4; }
.consent__actions { display: flex; align-items: center; gap: .5rem; }
.consent__link { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .25rem; color: #101014; font-size: .8125rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.consent__btn {
  flex: 1 1 0;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: 1.5px solid #101014;
  border-radius: 999px;
  background: transparent;
  color: #101014;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.consent__btn:hover { background: #101014; color: #fff; }
@media (min-width: 768px) {
  .consent { flex-direction: row; align-items: center; justify-content: center; gap: 1.5rem; padding: .75rem 2rem; }
  .consent__text { flex: 0 1 46rem; min-width: 0; font-size: .875rem; }
  .consent__actions { flex: 0 0 auto; }
  .consent__btn { flex: 0 0 auto; min-width: 8.5rem; }
}
/* Pantallas bajas: franja aún más baja (≈ 94 px) para no tapar el botón principal de la página */
@media (max-height: 700px) and (max-width: 767px) {
  .consent { gap: .25rem; padding-top: .375rem; padding-bottom: calc(.375rem + env(safe-area-inset-bottom, 0px)); }
  .consent__text { font-size: .78125rem; line-height: 1.35; }
}
/* En 360 px el texto pasaba a 3 líneas por unos pocos píxeles: con 12 px y menos margen lateral vuelve a 2 */
@media (max-height: 760px) and (max-width: 380px) {
  .consent { padding-left: .75rem; padding-right: .75rem; }
  .consent__text { font-size: .75rem; }
}
html.rfk-consent-on body { padding-bottom: var(--rfk-consent-h, 0px); }
html.rfk-consent-on { scroll-padding-bottom: var(--rfk-consent-h, 0px); }
.footer__prefs { padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer__prefs:hover { color: #fff; }
