/* ---------- Fuentes locales ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/archivo-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-serif-italic.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #111111;
  --text-mut: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #dbeafe;
  --accent-soft-ink: #1e40af;
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(17, 17, 17, 0.07);
  --glass-shadow: 0 24px 60px rgba(17, 24, 39, 0.08);
  --radius: 12px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1180px;
}

/* ---------- Fondo ambiental "liquid glass" (toda la web) ---------- */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}
.liquid-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  animation: liquid-morph 26s ease-in-out infinite;
  will-change: transform, border-radius;
}
/* Mientras el usuario hace scroll, pausamos el morphing de las manchas:
   animar border-radius + blur en una capa fixed obliga a repintar en cada
   frame, y eso es justo lo que se nota como tirones al bajar por la página. */
.liquid-bg.is-scrolling .liquid-bg__blob,
.liquid-bg.is-scrolling .liquid-bg__cursor {
  animation-play-state: paused;
}
.liquid-bg__blob--1 {
  top: -12%; left: -10%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.32), transparent 70%);
}
.liquid-bg__blob--2 {
  bottom: -16%; right: -10%; width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2), transparent 70%);
  animation-duration: 32s; animation-delay: -9s;
}
.liquid-bg__blob--3 {
  top: 38%; left: 46%; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(17, 17, 17, 0.05), transparent 70%);
  animation-duration: 30s; animation-delay: -16s;
}
.liquid-bg__cursor-wrap {
  position: absolute; top: 0; left: 0;
  width: 0; height: 0;
}
.liquid-bg__cursor {
  position: absolute; top: 0; left: 0;
  width: 420px; height: 420px; margin: -210px 0 0 -210px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3), transparent 70%);
  filter: blur(70px);
  opacity: 0;
  animation: liquid-morph 9s ease-in-out infinite, liquid-fade-in 900ms ease forwards;
}
@keyframes liquid-morph {
  0%, 100% { border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%; transform: rotate(0deg) scale(1); }
  25% { border-radius: 58% 42% 38% 62% / 60% 55% 45% 40%; transform: rotate(8deg) scale(1.05); }
  50% { border-radius: 50% 50% 62% 38% / 35% 60% 40% 65%; transform: rotate(-6deg) scale(0.96); }
  75% { border-radius: 35% 65% 45% 55% / 55% 35% 65% 45%; transform: rotate(4deg) scale(1.03); }
}
@keyframes liquid-fade-in { to { opacity: 1; } }

@media (hover: none), (pointer: coarse) {
  .liquid-bg__cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .liquid-bg__blob, .liquid-bg__cursor { animation: none; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 3px rgba(17, 24, 39, 0.1);
}

h1, h2, h3 {
  margin: 0;
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 em, h2 em, h3 em {
  font-style: normal;
  color: var(--accent);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  padding: 15px 28px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  border-radius: 999px; border: none;
  transition: transform 450ms var(--ease), background 450ms var(--ease), box-shadow 450ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28); }
.btn--accent:hover { background: var(--accent-hover); transform: scale(1.06); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.34); }
.btn--accent:active { transform: scale(1.01); }
.btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 20px; font-size: 13px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Cristal (base compartida) ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.92); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  max-width: 100%; margin: 0 auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  transition: max-width 380ms var(--ease), margin 380ms var(--ease),
    border-radius 380ms var(--ease), border-color 380ms var(--ease), box-shadow 380ms var(--ease);
}
/* Al bajar del todo de la página, se repliega en una píldora flotante */
.nav.nav--scrolled {
  max-width: min(1100px, 92vw);
  margin: 14px auto 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; transition: padding 380ms var(--ease); }
.nav--scrolled .nav__inner { padding: 10px 22px; }
.nav__brand { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__link { font-size: 14px; font-weight: 600; color: var(--text-mut); transition: color 160ms var(--ease); }
.nav__link:hover { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 20px; }

/* ---------- Megamenú "Servicios" ---------- */
.servicios-menu__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit;
}
.servicios-menu__chevron { width: 14px; height: 14px; transition: transform 200ms var(--ease); }
.servicios-menu__trigger.is-open { color: var(--accent); }
.servicios-menu__trigger.is-open .servicios-menu__chevron { transform: rotate(180deg); }

/* Posicionado absoluto respecto a .nav (el ancestro posicionado más
   cercano, por su sticky): así queda centrado bajo toda la barra y no solo
   bajo el pequeño botón "Servicios". */
.servicios-menu__panel {
  position: absolute; top: 100%; left: 0; right: 0; margin: 14px auto 0;
  width: min(960px, 92vw);
  max-height: min(70vh, 640px);
  overflow-y: auto;
  padding: 30px 32px;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(17, 24, 39, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  z-index: 5;
}
.servicios-menu__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 26px 32px; align-items: start;
}
.servicios-menu__titulo {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.045em;
  color: var(--accent); margin-bottom: 12px; line-height: 1.35;
}
.servicios-menu__list { display: flex; flex-direction: column; gap: 8px; }
.servicios-menu__list li { font-size: 12.5px; line-height: 1.5; color: var(--text); }

@media (max-width: 900px) {
  .servicios-menu__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__inner { padding: 14px 16px; gap: 10px; }
  .nav__actions .btn--sm { padding: 9px 16px; font-size: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 48px;
  position: relative; overflow: hidden;
}

.hero__center {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mut);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}
.hero h1 {
  margin-top: 28px;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.04;
  max-width: 21ch;
}
.hero__sub {
  margin-top: 26px; max-width: 62ch;
  font-size: 19px; color: var(--text-mut); line-height: 1.65;
}
.hero__sub strong { color: var(--accent); font-weight: 700; }
.hero__actions { margin-top: 42px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.hero__actions .btn { padding: 20px 38px; font-size: 17px; }
.hero__chips { margin-top: 38px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.hero__chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}

/* ---------- Hero: elementos decorativos flotantes ---------- */
.hero__deco { display: none; }
@media (min-width: 1280px) {
  .hero__deco { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
}
.hero__deco-el { position: absolute; }


.hero__notif {
  display: flex; align-items: flex-start; gap: 10px;
  width: 208px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
  text-align: left;
}
.hero__notif-icon {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.hero__notif-icon--green { background: #dcfce7; }
.hero__notif-icon--purple { background: var(--accent-soft); }
.hero__notif-icon--orange { background: #fef3c7; }
.hero__notif-icon--blue { background: var(--accent-soft); }
.hero__notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hero__notif-meta {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-mut);
}
.hero__notif-title { margin-top: 3px; font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.3; }
.hero__notif-sub { margin-top: 2px; font-size: 11.5px; color: var(--text-mut); line-height: 1.35; }

.hero__notif--ventas { top: 30px; left: 25%; }
.hero__notif--clientes { top: 330px; left: 2%; }
.hero__notif--oportunidades { top: 60px; right: 4%; }
.hero__notif--calendario { top: 330px; right: 2%; }

.hero__notif--simple { align-items: center; width: auto; max-width: 232px; padding: 11px 16px 11px 12px; }
.hero__notif-icon--teal { background: #ccfbf1; }
.hero__notif-icon--yellow { background: #fef9c3; }
.hero__notif-icon--red { background: #fee2e2; }
.hero__notif-line { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.3; }

.hero__notif--tiempo { top: 195px; left: 7%; }
.hero__notif--ahorro { top: 215px; right: 10%; }
.hero__notif--conectado { top: 480px; left: 6%; }
.hero__notif--cuellos { top: 480px; right: 7%; }

@media (max-width: 860px) {
  .hero { padding: 88px 0 40px; }
}

/* ---------- Sección genérica ---------- */
.section { padding: 128px 0; position: relative; }
.section--tight { padding: 108px 0; }
#faq { background: var(--bg); }
/* El anillo de burbujas puede asomar unos px fuera de su caja al girar;
   se recorta a la altura de la sección (con su padding de sobra) para que
   nunca invada visualmente la sección anterior o siguiente. */
#sectores { overflow: hidden; }
#como-trabajamos { padding-bottom: 56px; }

/* Costura de luz: separador sutil entre secciones, sobre el fondo líquido */
.section::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(420px, 60%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.55), transparent);
  box-shadow: 0 0 20px 2px rgba(37, 99, 235, 0.35);
  pointer-events: none;
}

.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(28px, 3.4vw, 42px); margin-top: 16px; }
.section__head p { margin-top: 16px; font-size: 17px; color: var(--text-mut); line-height: 1.6; }
.section__head p strong { color: var(--accent); font-weight: 700; }

#como-trabajamos .container { max-width: 1400px; }
#como-trabajamos .section__head h2 { font-size: clamp(26px, 3.4vw, 42px); }
#como-trabajamos .section__head p { font-size: 19px; }

#como-trabajamos .section__head { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cómo trabajamos: carrusel 3D (coverflow) ---------- */
.flow3d { position: relative; }
.flow3d__viewport {
  position: relative;
  height: 420px;
}
.flow3d__viewport::before {
  content: '';
  position: absolute; z-index: 0;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 700px; height: 460px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.3), transparent 65%);
  pointer-events: none;
}
.flow3d__track {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
}
.flow3d__card {
  position: absolute; top: 50%; left: 50%;
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1), opacity 900ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform, opacity;
}
/* Envoltorio interno: separado del posicionamiento 3D para que el zoom al
   pasar el ratón tenga su propia transición, más rápida e independiente del
   giro del carrusel. */
.flow3d__card-inner {
  position: relative;
  width: 340px;
  padding: 34px 30px 30px;
  /* Fondo sólido por defecto (sin blur) para las tarjetas alejadas del
     centro: el blur de cristal (abajo, solo en la activa) no escala con el
     transform: scale() del carrusel, así que en las tarjetas encogidas se
     veía como una mancha borrosa ilegible en vez de un cristal sutil. */
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
  cursor: default;
}
.flow3d__card--active .flow3d__card-inner {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
}
.flow3d__card--active .flow3d__card-inner:hover {
  transform: scale(1.06);
  box-shadow: 0 30px 64px rgba(17, 24, 39, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.flow3d__card-inner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 60%;
  border-radius: 26px 26px 60% 60% / 26px 26px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
}
.flow3d__num {
  position: absolute; z-index: 1; top: 20px; left: 24px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
  border: 1px solid var(--accent);
}
.flow3d__icon {
  position: absolute; z-index: 1; top: 22px; right: 24px;
  font-size: 34px; line-height: 1; color: var(--text);
}
.flow3d__icon::after {
  content: '';
  position: absolute; left: 50%; bottom: -4px;
  width: 20px; height: 6px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(17, 24, 39, 0.3), transparent 75%);
  border-radius: 50%;
  pointer-events: none;
}
.flow3d__card h3 { position: relative; z-index: 1; margin-top: 52px; font-family: 'Archivo', sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.flow3d__card p { position: relative; z-index: 1; margin-top: 12px; font-size: 15px; color: var(--text-mut); line-height: 1.6; }

.flow3d__controls { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 26px; }
.flow3d__arrow {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
}
.flow3d__arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); }
.flow3d__arrow svg { width: 26px; height: 26px; }
.flow3d__dots { display: flex; align-items: center; gap: 10px; }
.flow3d__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--line); transition: all 300ms var(--ease); }
.flow3d__dot.is-active { width: 30px; background: var(--accent); }

.flow-callout {
  margin-top: 44px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.flow-callout__pill {
  display: inline-flex; align-items: center;
  padding: 13px 24px; border-radius: 999px;
  background: var(--bg); border: 1px solid rgba(37, 99, 235, 0.12);
  font-size: 14px; font-weight: 700; color: var(--accent-soft-ink);
}

@media (max-width: 860px) {
  .flow3d__viewport {
    height: auto;
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 16px; padding: 12px 24px 20px; margin: 0 -24px;
    -webkit-overflow-scrolling: touch;
  }
  .flow3d__viewport::before { display: none; }
  .flow3d__track { display: contents; }
  .flow3d__card {
    position: static !important; transform: none !important; opacity: 1 !important;
    pointer-events: auto !important;
    flex: 0 0 78vw; max-width: 320px;
    scroll-snap-align: center;
  }
  .flow3d__card-inner { width: 100%; }
}

/* ---------- Sectores (cuadrícula de fotos 5x2) ---------- */
#sectores .section__head { text-align: center; margin-left: auto; margin-right: auto; }

/* Contenedor más ancho que el resto de secciones: con el maxw estándar
   (1180px) quedaban laterales muy vacíos en pantallas grandes. */
#sectores .container { max-width: min(1560px, 94vw); }

.sectores__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
@media (max-width: 1100px) { .sectores__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (max-width: 700px) { .sectores__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Todos los bloques miden exactamente lo mismo (aspect-ratio fijo), sea cual
   sea la imagen que lleven dentro. */
.sectores__block {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.12);
}
.sectores__block-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 500ms var(--ease);
}
/* Zoom in suave de la foto de fondo al pasar el cursor */
.sectores__block:hover .sectores__block-bg { transform: scale(1.14); }

.sectores__block-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 45%, rgba(17, 24, 39, 0.72) 100%);
  pointer-events: none;
}

.sectores__block-btn {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 14px; font-weight: 800; line-height: 1.3; text-align: center;
  text-transform: uppercase; letter-spacing: 0.02em;
  transition: transform 300ms var(--ease), background 300ms var(--ease);
}
/* Zoom in suave del botón con el nombre del sector */
.sectores__block:hover .sectores__block-btn {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.26);
}

@media (max-width: 700px) {
  .sectores__block-btn { font-size: 12.5px; padding: 8px 10px; }
}

/* ---------- Selector de idioma ---------- */
.tl-lang { display: inline-flex; align-items: center; gap: 4px; }
.tl-lang-btn {
  background: none; border: 0; padding: 4px; cursor: pointer;
  font: 700 13px 'Archivo', sans-serif; letter-spacing: .04em;
  color: var(--text-mut); transition: color 160ms var(--ease);
}
.tl-lang-btn:hover { color: var(--text); }
.tl-lang-btn.is-active { color: var(--accent); }
.tl-lang-sep { color: var(--line); font-size: 12px; }
@media (max-width: 860px) { .nav__actions { gap: 10px; } }

/* ---------- Real Estate (foto + tarjetas de herramientas) ---------- */
.re { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 28px; align-items: stretch; }
.re__photo { aspect-ratio: auto; min-height: 420px; }
.re__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.re__card { padding: 22px 20px; border-radius: 18px; transition: transform 300ms var(--ease); }
.re__card:hover { transform: translateY(-4px); }
.re__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; font-size: 22px;
  background: var(--accent-soft); margin-bottom: 12px;
}
.re__card h3 { font-size: 17px; margin: 0 0 6px; }
.re__card p { font-size: 14.5px; color: var(--text-mut); margin: 0; line-height: 1.5; }
@media (max-width: 1100px) {
  .re { grid-template-columns: 1fr; }
  .re__photo { min-height: 280px; }
  .re__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .re__grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
/* El bloque se ajusta al ancho del propio título (en vez de max-width fijo)
   y se centra en la sección, para que el título y las burbujas que lo rodean
   se muevan y centren juntos como un solo grupo. */
#faq .section__head { position: relative; max-width: none; width: fit-content; margin-left: auto; margin-right: auto; }
.faq__marks { display: none; }
@media (min-width: 860px) {
  .faq__marks { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 0; }
}
.faq__mark {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  color: var(--accent);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.65), rgba(219, 234, 254, 0.35));
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.faq__mark--1 { top: -30px; left: -4%; width: 52px; height: 52px; font-size: 26px; transform: rotate(-12deg); }
.faq__mark--2 { top: -20px; left: 44%; width: 40px; height: 40px; font-size: 20px; transform: rotate(9deg); }
.faq__mark--4 { top: 54px; left: 10%; width: 34px; height: 34px; font-size: 17px; transform: rotate(15deg); }
/* Nuevas: una a la izquierda de la "P", un par sobre la "nt" de "Preguntas" */
.faq__mark--5 { top: 6px; left: -12%; width: 36px; height: 36px; font-size: 18px; transform: rotate(-8deg); }
.faq__mark--6 { top: -36px; left: 19%; width: 30px; height: 30px; font-size: 15px; transform: rotate(10deg); }
.faq__mark--7 { top: -48px; left: 27%; width: 24px; height: 24px; font-size: 12px; transform: rotate(-14deg); }
/* Un par pequeños a la derecha, sustituyendo al signo grande que había ahí */
.faq__mark--8 { top: -14px; left: 78%; width: 30px; height: 30px; font-size: 15px; transform: rotate(11deg); }
.faq__mark--9 { top: 46px; left: 68%; width: 22px; height: 22px; font-size: 11px; transform: rotate(-9deg); }
#faq .section__head h2 { position: relative; z-index: 1; }

/* Cuadrícula de flashcards 3x2 (2 columnas en tablet, 1 en móvil) */
.faq__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; align-items: start;
}
@media (max-width: 900px) { .faq__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .faq__grid { grid-template-columns: 1fr; } }

.faq__item {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.6));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.faq__item.is-open {
  box-shadow: 0 26px 54px rgba(17, 24, 39, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.faq__item:hover {
  transform: scale(1.035);
  box-shadow: 0 26px 54px rgba(17, 24, 39, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: none; border: none; padding: 24px; text-align: left; cursor: pointer;
  font-family: 'Archivo', sans-serif; font-size: 16.5px; font-weight: 700; color: var(--text); line-height: 1.4;
}
.faq__icon {
  flex: none; width: 24px; height: 24px; margin-top: 2px; position: relative;
}
.faq__icon::before, .faq__icon::after {
  content: ''; position: absolute; background: var(--accent); transition: transform 220ms var(--ease);
}
.faq__icon::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq__icon::after { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.faq__item.is-open .faq__icon::after { transform: translateX(-50%) scaleY(0); }
.faq__a {
  max-height: 0; overflow: hidden; transition: max-height 320ms var(--ease);
  padding: 0 24px;
}
.faq__a p { padding: 0 0 24px; font-size: 14.5px; color: var(--text-mut); line-height: 1.6; }

/* ---------- CTA final ---------- */
.cta-final { position: relative; overflow: hidden; background: var(--bg-soft); }
.cta-final__panel {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto; padding: 64px 48px; text-align: center;
}
.cta-final h2 { font-size: clamp(28px, 4vw, 46px); max-width: 18ch; margin: 0 auto; }
.cta-final p { margin: 20px auto 0; max-width: 46ch; color: var(--text-mut); font-size: 17px; }
.cta-final p strong { color: var(--accent); font-weight: 700; }
.cta-final .btn { margin-top: 34px; }

@media (max-width: 640px) {
  .cta-final__panel { padding: 40px 24px; border-radius: 20px; }
}

/* ---------- Footer ---------- */
.footer { background: var(--bg); color: var(--text-mut); padding: 56px 0 32px; border-top: 1px solid var(--line); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 40px; }
.footer__brand { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.footer__brand p { margin-top: 10px; max-width: 34ch; font-size: 14px; font-weight: 400; color: var(--text-mut); }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 14px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 14px; transition: color 160ms var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px;
}

/* ---------- Modal de contacto ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 20px; overflow-y: auto; z-index: 100;
  animation: fade-in 200ms var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  color: var(--text); border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  width: 100%; max-width: 480px; padding: 40px; position: relative;
  animation: modal-in 260ms var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 18px; right: 18px; background: none; border: none;
  font-size: 22px; line-height: 1; color: var(--text-mut); padding: 4px;
}
.modal h3 { font-size: 24px; }
.modal p.modal__sub { margin-top: 10px; color: var(--text-mut); font-size: 14px; }
.field { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mut); }
.field input, .field textarea {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  font-family: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 84px; }
.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }
.field--check label { text-transform: none; font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--text-mut); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modal .btn { width: 100%; margin-top: 24px; }
.modal__status { margin-top: 14px; font-size: 13px; text-align: center; }
.modal__status--error { color: #b3261e; }
.modal__status--ok { color: #146c2e; }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.legal-back { display: inline-block; margin-bottom: 32px; font-size: 14px; font-weight: 600; color: var(--accent); }
.legal-back:hover { text-decoration: underline; }
.legal h1 { font-size: 32px; margin-bottom: 8px; }
.legal .legal-draft {
  display: inline-block; margin-bottom: 32px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 13px; font-weight: 700;
}
.legal h2 { font-family: 'Archivo', sans-serif; font-size: 19px; font-weight: 800; margin: 36px 0 12px; }
.legal p, .legal li { font-size: 15px; color: var(--text-mut); line-height: 1.7; }
.legal ul { padding-left: 20px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--bg-soft); }

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 520px) {
  .modal { padding: 28px 24px; }
}
