/* ==========================================================================
   MJ — Tema principal (antes versión 2): color y movimiento [P]
   Se carga DESPUÉS de /styles.css y solo sobrescribe. La versión original
   (raíz del sitio) no usa este archivo.
   ========================================================================== */

:root {
  --sky: #71A8AC;            /* [P] azul cielo: decorativo / texto sobre azul marino (5.6:1) */
  --mist: #F1F6F7;           /* [P] fondo azul muy claro (acento 4.7:1 encima) */
  --ice: #CFE1E3;            /* [P] bordes sobre --mist */
  --deep: #06191C;           /* [P] azul marino profundo para degradados */
  --grad-brand: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 45%, var(--night)) 45%, var(--night) 100%);
  --shadow-1: 0 1px 2px color-mix(in srgb, var(--night) 6%, transparent), 0 8px 24px color-mix(in srgb, var(--night) 8%, transparent);
  --shadow-2: 0 2px 4px color-mix(in srgb, var(--night) 8%, transparent), 0 18px 40px color-mix(in srgb, var(--night) 16%, transparent);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --------------------------------------------------------------------------
   Barra de progreso de lectura
   -------------------------------------------------------------------------- */
.progress {
  position: fixed; left: 0; top: 0; z-index: 60;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--sky), var(--accent));
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Navegación: translúcida, sombra al hacer scroll
   -------------------------------------------------------------------------- */
.nav {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.nav.is-scrolled { box-shadow: 0 6px 24px color-mix(in srgb, var(--night) 8%, transparent); border-bottom-color: transparent; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .25s var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.draft-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Botones con un poco más de vida
   -------------------------------------------------------------------------- */
.btn { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease), box-shadow .2s ease; }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent); }
.is-night .btn-solid:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.btn-line:hover { transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Secciones de color
   -------------------------------------------------------------------------- */
.is-night { position: relative; isolation: isolate; overflow: hidden; }
.is-night .label { color: var(--sky); }
.is-alt { background: var(--mist); }
.is-alt .btn-line { background: transparent; border-color: var(--ice); }
.is-alt .btn-line:hover { background: #fff; }

/* Cierre con degradado de marca */
.is-brand { background: var(--grad-brand); color: #fff; }
.is-brand .label { color: color-mix(in srgb, var(--accent) 18%, #fff); }
.is-brand .btn-solid { background: #fff; color: var(--night); }
.is-brand .btn-line { color: #fff; border-color: rgba(255, 255, 255, .45); }
.is-brand .btn-line:hover { background: rgba(255, 255, 255, .1); }

/* Fondo vivo: halos de luz que se desplazan lento */
.glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow::before,
.glow::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  animation: drift 18s ease-in-out infinite alternate;
}
.glow::before {
  width: 56vmax; height: 56vmax; left: -18vmax; top: -24vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}
.glow::after {
  width: 48vmax; height: 48vmax; right: -16vmax; bottom: -26vmax;
  background: radial-gradient(circle, var(--sky) 0%, transparent 70%);
  opacity: .35; animation-duration: 22s; animation-direction: alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}
/* Retícula fina sobre el azul marino */
.gridlines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}

/* --------------------------------------------------------------------------
   Hero sobre azul marino
   -------------------------------------------------------------------------- */
.hero.is-night { background: var(--night); padding-top: clamp(64px, 11vw, 144px); }
.hero.is-night h1 { color: #fff; }
.hero .accent-word { color: var(--sky); }
.hero .monogram { filter: drop-shadow(0 12px 40px rgba(0, 0, 0, .35)); }

.hero-meta { border-top: 0; gap: 12px; }
.hero.is-night .hero-meta li {
  padding: 22px 22px 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--night-ink-2);
  transition: background-color .25s ease, border-color .25s ease, transform .25s var(--ease);
}
.hero.is-night .hero-meta li + li { padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, .14); }
.hero.is-night .hero-meta li:hover { background: rgba(255, 255, 255, .09); border-color: color-mix(in srgb, var(--sky) 60%, transparent); transform: translateY(-3px); }
.hero.is-night .hero-meta strong { color: #fff; }
.hero-meta strong::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px;
  background: var(--sky); vertical-align: 1px;
}
@media (max-width: 640px) {
  .hero.is-night .hero-meta li,
  .hero.is-night .hero-meta li + li { padding: 18px; border: 1px solid rgba(255, 255, 255, .14); }
}

/* Entrada del hero al cargar */
.js .hero .monogram,
.js .hero .label,
.js .hero h1,
.js .hero .lead,
.js .hero .actions,
.js .hero .hero-meta li,
.js .page-hero .container > * {
  opacity: 0; transform: translateY(18px);
  animation: rise .9s var(--ease) forwards;
}
.js .hero .label, .js .page-hero .container > :nth-child(2) { animation-delay: .1s; }
.js .hero h1, .js .page-hero .container > :nth-child(3) { animation-delay: .18s; }
.js .hero .lead, .js .page-hero .container > :nth-child(4) { animation-delay: .28s; }
.js .hero .actions { animation-delay: .36s; }
.js .hero .hero-meta li:nth-child(1) { animation-delay: .48s; }
.js .hero .hero-meta li:nth-child(2) { animation-delay: .56s; }
.js .hero .hero-meta li:nth-child(3) { animation-delay: .64s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Cinta de servicios en movimiento
   -------------------------------------------------------------------------- */
.ticker {
  background: var(--accent);
  color: #fff;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.ticker-track {
  display: flex; width: max-content;
  animation: ticker 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; flex-shrink: 0; }
.ticker li {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 28px 18px 0;
  font-size: 14px; line-height: 20px; font-weight: 400;
  letter-spacing: var(--track-label); text-transform: uppercase; white-space: nowrap;
}
.ticker li::after { content: ""; width: 7px; height: 7px; background: rgba(255, 255, 255, .7); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Por qué nosotros: tarjetas
   -------------------------------------------------------------------------- */
.is-alt .principles { border-top: 0; display: grid; gap: 12px; }
.is-alt .principles li {
  padding: 22px 22px 22px 18px;
  background: #fff;
  border: 1px solid var(--ice);
  border-left: 3px solid var(--accent);
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.is-alt .principles li:hover { transform: translateX(4px); box-shadow: var(--shadow-1); }

/* --------------------------------------------------------------------------
   Servicios: tarjetas que se iluminan
   -------------------------------------------------------------------------- */
.services-grid { border: 0; gap: 14px; }
.service {
  position: relative;
  border: 1px solid var(--line-strong);
  background: #fff;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease, color .3s ease;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grad-brand);
  transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.service::after {
  content: "→"; position: absolute; right: 22px; top: 22px;
  font-size: 20px; color: var(--accent);
  transition: transform .3s var(--ease), color .3s ease;
}
.service .num { font-size: 13px; }
.service h3, .service p, .service .num { transition: color .3s ease; }
@media (hover: hover) {
  .service:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: transparent; }
  .service:hover::before { transform: none; }
  .service:hover::after { color: #fff; transform: translateX(4px); }
  .service:hover h3 { color: #fff; }
  .service:hover p, .service:hover .num { color: color-mix(in srgb, var(--accent) 12%, #fff); }
}
.services-note {
  max-width: none;
  padding: 20px 22px;
  background: var(--mist);
  border-left: 3px solid var(--accent);
}

/* --------------------------------------------------------------------------
   Nosotras (extracto) y cifras
   -------------------------------------------------------------------------- */
#nosotras .story .lead { color: var(--ink); }
#nosotras .h-1 { position: relative; }
#nosotras .split-head::after {
  content: ""; display: block; width: 72px; height: 3px; margin-top: 28px;
  background: linear-gradient(90deg, var(--accent), var(--sky));
}
.figure .big {
  background: linear-gradient(135deg, var(--accent), var(--night));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.person { border-top-width: 3px; }
.person-photo { background: repeating-linear-gradient(135deg, var(--mist) 0 8px, var(--ice) 8px 9px); }

/* --------------------------------------------------------------------------
   Cómo trabajamos: línea que se llena
   -------------------------------------------------------------------------- */
.steps { position: relative; border-top-color: rgba(255, 255, 255, .12); }
.steps::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--sky), #fff);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.6s var(--ease) .2s;
}
.steps.in::before { transform: none; }
.no-js .steps::before, html:not(.js) .steps::before { transform: none; }
.step .num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid color-mix(in srgb, var(--sky) 50%, transparent);
  color: #fff; font-size: 13px;
  transition: background-color .3s ease, border-color .3s ease;
}
.step:hover .num { background: var(--accent); border-color: var(--accent); }
.step h3 { margin-top: 24px; }

/* Valores (Nosotras) */
.values li { transition: color .3s ease; }
.values li:hover { color: var(--sky); }
.quote { color: #fff; }
.quote::before { content: "“"; display: block; font-size: 1.8em; line-height: .6; color: var(--sky); margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   Cierre y contacto
   -------------------------------------------------------------------------- */
.closing.is-brand .ph {
  border-color: rgba(255, 255, 255, .6);
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .06) 6px 7px);
  color: color-mix(in srgb, var(--accent) 8%, #fff);
}
.closing.is-brand .contact-grid { border-top-color: rgba(255, 255, 255, .2); }
.closing.is-brand .contact-item { border-color: rgba(255, 255, 255, .2); }

/* Formulario: tarjeta */
.form {
  padding: clamp(20px, 4vw, 40px);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-1);
}
.details li { transition: padding-left .25s var(--ease); }
.details li:hover { padding-left: 8px; }
.map-slot { background: repeating-linear-gradient(135deg, var(--mist) 0 8px, var(--ice) 8px 9px); }

/* --------------------------------------------------------------------------
   Pie en azul marino
   -------------------------------------------------------------------------- */
.footer { background: var(--deep); color: var(--night-ink-2); border-top: 0; }
.footer-logo, .footer .footer-logo:hover { color: #fff; }
.fl-rule { background: rgba(255, 255, 255, .6); }
.fl-kicker, .fl-tag { color: var(--night-ink-2); }
.footer a:hover { color: #fff; }
.footer .ph { border-color: var(--night-ink-2); color: var(--night-ink-2); background: none; }
.footer :focus-visible { outline-color: #fff; }

/* --------------------------------------------------------------------------
   Aparición al hacer scroll (solo con JS)
   -------------------------------------------------------------------------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.js .service.rv.in:hover { transform: translateY(-6px); }

/* Movimiento reducido: todo estático y visible */
@media (prefers-reduced-motion: reduce) {
  .glow::before, .glow::after, .ticker-track { animation: none !important; }
  .js .rv, .js .hero *, .js .page-hero .container > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .steps::before { transform: none; }
  .progress { display: none; }
}
