/* Rs&Co · Gestión de Personas — sitio web
   Estética: espacio profundo, vidrio y luz cian, como la app. */

:root {
  --bg: #03050f;
  --bg-2: #070b1d;
  --ink: #e9eef8;
  --ink-soft: #c3cde2;
  --muted: #8691ad;
  --line: rgba(150, 180, 230, 0.14);
  --line-strong: rgba(150, 200, 255, 0.28);
  --glass: rgba(13, 19, 42, 0.55);
  --glass-strong: rgba(16, 24, 52, 0.78);
  --cyan: #6bdcff;
  --cyan-soft: rgba(107, 220, 255, 0.14);
  --blue: #1a62c7;
  --violet: #8c73ff;
  --green: #34cc61;
  --amber: #f5a524;
  --red: #eb4545;
  --radius: 22px;
  --display: "Michroma", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Fondo espacial ---------- */

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.nebula {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 35% at 18% 22%, rgba(90, 60, 190, 0.22), transparent 70%),
    radial-gradient(35% 30% at 85% 70%, rgba(20, 110, 170, 0.18), transparent 70%),
    radial-gradient(30% 25% at 70% 15%, rgba(40, 180, 220, 0.08), transparent 70%);
  animation: drift 40s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(3%, -2%, 0) scale(1.05); }
}

.container {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Navegación ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100% - 1180px) / 2));
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(4, 7, 20, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  padding-block: 12px;
}

.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { width: 34px; height: auto; filter: drop-shadow(0 0 8px rgba(107, 220, 255, 0.45)); }

.wordmark-sm {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff, #c7d4e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav-links a { color: var(--ink-soft); transition: color 0.25s; position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(107, 220, 255, 0.08);
  color: #fff !important;
}
.nav-cta:hover { background: rgba(107, 220, 255, 0.16); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15.5px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #175fc7, #29a3e6);
  box-shadow: 0 10px 30px -10px rgba(41, 163, 230, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(41, 163, 230, 0.9); }

.btn-ghost {
  color: var(--cyan);
  border: 1px solid rgba(107, 220, 255, 0.35);
  background: rgba(107, 220, 255, 0.04);
}
.btn-ghost:hover { background: rgba(107, 220, 255, 0.1); transform: translateY(-2px); }

/* ---------- Portada ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 34px;
  padding: 120px 20px 90px;
  text-align: center;
  position: relative;
}

.splash {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.splash-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.ring, .ring-inner, .ring-guide, .ticks line, .split {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
}

.ring-guide { stroke-opacity: 0.08; stroke-width: 1; }
.ring { stroke-width: 3; stroke-dasharray: 754; stroke-dashoffset: 754; transform: rotate(-90deg); }
.ring-inner { stroke-width: 1.3; stroke-opacity: 0.5; stroke-dasharray: 654; stroke-dashoffset: 654; transform: rotate(-90deg) scaleY(-1); }
.ticks line { stroke-width: 1.2; opacity: 0; }
.ticks line.major { stroke-width: 2; }
.split { stroke-width: 2.5; opacity: 0; }

.splash-group { transform-origin: center; transform-box: fill-box; }

.splash.play .ring { animation: draw 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.splash.play .ring-inner { animation: draw 2.3s 0.2s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.splash.play .ticks line { animation: tick 0.5s forwards; }
.splash.play .splash-group { animation: flatten 0.55s 2.5s var(--ease) forwards; }
.splash.play .split-top { animation: split-up 0.8s 3.05s var(--ease) forwards; }
.splash.play .split-bottom { animation: split-down 0.8s 3.05s var(--ease) forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tick { to { opacity: var(--o, 0.6); } }
@keyframes flatten {
  70% { opacity: 1; }
  to { transform: scale(1.45, 0.012); opacity: 0; }
}
@keyframes split-up {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 1; }
  to { opacity: 0; transform: translateY(-120px) scaleX(1.08); }
}
@keyframes split-down {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 1; }
  to { opacity: 0; transform: translateY(120px) scaleX(1.08); }
}

.brand-lockup {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
}

.splash.play .brand-lockup { animation: reveal 0.85s 3.05s var(--ease) forwards; }
.splash.done .brand-lockup { clip-path: inset(0); opacity: 1; }

@keyframes reveal {
  from { clip-path: inset(50% 0 50% 0); opacity: 1; transform: scale(1.06); }
  to { clip-path: inset(-10% -10% -10% -10%); opacity: 1; transform: scale(1); }
}

.brand-emblem {
  width: min(190px, 44vw);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(107, 220, 255, 0.45));
  margin-bottom: 14px;
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 30%, #b9c7dc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.12);
}

.tagline {
  font-family: var(--display);
  font-size: clamp(12px, 2.3vw, 17px);
  color: #b6e2f3;
  letter-spacing: 0.04em;
}

.hero-copy { max-width: 820px; display: grid; justify-items: center; gap: 18px; }

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1, .display {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h1 { font-size: clamp(34px, 6vw, 64px); }
.display { font-size: clamp(30px, 4.6vw, 54px); }

.grad {
  background: linear-gradient(90deg, #ffffff, var(--cyan) 55%, #8c9dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { margin: 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft); font-weight: 300; }
.lead.narrow { max-width: 640px; margin-inline: auto; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-actions.center { justify-content: center; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Aparición al hacer scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease) calc(var(--i, 0) * 0.09s),
    transform 0.9s var(--ease) calc(var(--i, 0) * 0.09s),
    filter 0.9s var(--ease) calc(var(--i, 0) * 0.09s);
}
[data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

section { position: relative; }

/* ---------- Declaración y pilares ---------- */

.statement { padding: 140px 0 80px; text-align: center; }
.statement .display { margin: 18px auto 0; max-width: 960px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 70px;
  text-align: left;
}

.pillar, .law, .brand-card, .contact-box, .figure, .sec-list li, .timeline li {
  background: linear-gradient(180deg, rgba(20, 28, 60, 0.55), rgba(10, 14, 32, 0.55));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pillar { padding: 30px; transition: border-color 0.4s, transform 0.5s var(--ease); }
.pillar:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.pillar h3 { margin: 18px 0 8px; font-size: 20px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15.5px; }

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--cyan-soft);
  border: 1px solid rgba(107, 220, 255, 0.25);
}
.pillar-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cifras ---------- */

.figures { padding: 30px 0 60px; }
.figures-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.figure { padding: 26px 24px; display: grid; gap: 6px; }
.figure-num {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 44px);
  color: #fff;
  text-shadow: 0 0 24px rgba(107, 220, 255, 0.35);
}
.figure-label { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Recorrido de la app ---------- */

.story { padding: 120px 0 60px; }
.story-head { text-align: center; margin-bottom: 40px; }
.story-head .display { margin-top: 16px; }

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.step {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  opacity: 0.28;
  transform: translateX(-12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.step.is-current { opacity: 1; transform: none; }

.step-num { font-family: var(--display); font-size: 13px; color: var(--cyan); letter-spacing: 0.2em; }
.step h3 { margin: 14px 0 12px; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--ink-soft); font-weight: 300; max-width: 480px; }

.step-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.step-list li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 15.5px; }
.step-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  background: var(--cyan-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236bdcff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1px solid rgba(107, 220, 255, 0.35);
}

.step-device { display: none; }

.story-stage {
  position: sticky;
  top: calc(50vh - 330px);
  height: 660px;
  display: grid;
  place-items: center;
}

.stage-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(60, 150, 255, 0.28), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); opacity: 0.7; } }

/* Teléfono */

.phone {
  position: relative;
  width: 310px;
  height: 650px;
  border-radius: 52px;
  padding: 11px;
  background: linear-gradient(145deg, #2a3348, #0c111f 40%, #1c2337);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 60px -10px rgba(107, 220, 255, 0.25);
}

.phone-island {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  border-radius: 20px;
  background: #000;
  z-index: 3;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background:
    radial-gradient(80% 50% at 20% 10%, rgba(80, 60, 190, 0.35), transparent 70%),
    radial-gradient(70% 40% at 90% 90%, rgba(20, 110, 170, 0.3), transparent 70%),
    #050817;
}

.screen {
  position: absolute;
  inset: 0;
  padding: 62px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(26px) scale(0.97);
  filter: blur(8px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease), filter 0.65s var(--ease);
  pointer-events: none;
}
.screen.is-active { opacity: 1; transform: none; filter: none; }
.screen.is-leaving { opacity: 0; transform: translateY(-26px) scale(0.97); filter: blur(8px); }

/* Piezas de la app en miniatura */

.m-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(107, 220, 255, 0.2);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 7px;
}

.m-label { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); }
.m-label.pad { margin-top: 4px; }
.m-input {
  font-size: 11px;
  color: var(--muted);
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.m-btn {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 11px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(90deg, #175fc7, #29a3e6);
  white-space: nowrap;
}
.m-actions .m-btn { flex: 1; }
.screen > .m-btn { margin-top: auto; }
.m-btn.ghost { background: transparent; border: 1px solid rgba(107, 220, 255, 0.4); color: var(--cyan); }
.m-icon-btn {
  width: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(107, 220, 255, 0.4);
  color: var(--cyan);
  font-size: 14px;
}
.m-actions { display: flex; gap: 8px; margin-top: auto; }

.m-check { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--ink-soft); }
.m-check u { color: var(--cyan); }
.m-check i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid var(--muted);
  flex: none;
}
.m-check i.on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(107, 220, 255, 0.7); }

.m-login { display: grid; justify-items: center; gap: 4px; }
.m-emblem { width: 92px; filter: drop-shadow(0 0 10px rgba(107, 220, 255, 0.5)); }
.m-word { font-family: var(--display); font-size: 22px; margin-top: 6px; }
.m-tag { font-family: var(--display); font-size: 8.5px; color: #b6e2f3; }
.m-title { font-weight: 700; font-size: 15px; margin: 10px 0 6px; }
.m-login .m-card { width: 100%; }

.m-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; padding-bottom: 4px; }
.m-back { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; flex: none; }
.m-back::after { content: ""; position: absolute; inset: 9px 8px 9px 10px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(45deg); }

.m-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-soft); }
.m-status em { margin-left: auto; font-style: normal; font-family: ui-monospace, monospace; color: var(--muted); font-size: 9.5px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.m-doc {
  background: #f8f8f5;
  color: #1b1b1b;
  border-radius: 12px;
  padding: 16px 14px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.m-doc-logo { font-family: var(--display); font-size: 9px; color: #4d543f; border-bottom: 1px solid #4d543f; padding-bottom: 6px; }
.m-doc-title { text-align: center; font-size: 9.5px; font-weight: 700; text-decoration: underline; }
.m-lines { display: grid; gap: 6px; }
.m-lines i { height: 4px; border-radius: 2px; background: #d6d8d0; }
.m-lines i.s { width: 70%; }
.m-sign { margin-top: auto; display: grid; justify-items: center; }
.signature { width: 150px; height: 46px; }
.signature path {
  fill: none;
  stroke: #1f3a93;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
}
.screen.is-active .signature path { animation: draw 1.8s 0.5s ease-in-out forwards; }
.m-sign-line { width: 150px; height: 1px; background: #333; }
.m-sign-name { font-size: 8px; color: #666; margin-top: 3px; }

.m-progress { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--green); font-weight: 600; }

.m-pay {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 7px;
}
.m-pay-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); }
.m-pay-row b { color: #fff; font-weight: 600; }
.m-pay-row.head { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cyan); margin-top: 4px; }
.m-net {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(23, 95, 199, 0.5), rgba(41, 163, 230, 0.35));
  font-size: 11.5px;
  font-weight: 600;
}
.m-net b { font-size: 15px; }

.m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.m-chip {
  font-size: 9.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(107, 220, 255, 0.25);
}

.m-today {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.m-hours { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 8px; }
.m-meter { height: 6px; border-radius: 3px; background: rgba(107, 220, 255, 0.15); overflow: hidden; }
.m-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #175fc7, var(--cyan)); }
.screen.is-active .m-meter i { animation: meter 1.6s 0.4s var(--ease) forwards; }
@keyframes meter { to { width: 64%; } }

.m-cal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.m-cal-head { font-size: 12px; font-weight: 600; }
.m-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.m-cal-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  border-radius: 7px;
  color: var(--ink-soft);
}
.m-cal-grid .dow { color: var(--muted); font-weight: 600; aspect-ratio: auto; }
.m-cal-grid .work { background: rgba(26, 98, 199, 0.28); }
.m-cal-grid .free { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.m-cal-grid .holiday { background: rgba(245, 165, 36, 0.3); color: #ffd28a; }
.m-cal-grid .today { outline: 1.5px solid var(--cyan); box-shadow: 0 0 10px rgba(107, 220, 255, 0.5); }
.m-cal-legend { display: flex; gap: 12px; font-size: 9px; color: var(--muted); }
.m-cal-legend span { display: flex; align-items: center; gap: 4px; }
.m-cal-legend i { width: 8px; height: 8px; border-radius: 2px; }
.m-cal-legend .work { background: rgba(26, 98, 199, 0.6); }
.m-cal-legend .free { background: rgba(255, 255, 255, 0.2); }
.m-cal-legend .holiday { background: rgba(245, 165, 36, 0.7); }

.m-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-metric { padding: 10px; border-radius: 12px; display: grid; gap: 1px; }
.m-metric b { font-size: 20px; font-weight: 700; }
.m-metric span { font-size: 9.5px; color: var(--muted); }
.m-metric.green { background: rgba(52, 204, 97, 0.12); } .m-metric.green b { color: var(--green); }
.m-metric.amber { background: rgba(245, 165, 36, 0.12); } .m-metric.amber b { color: var(--amber); }
.m-metric.cyan { background: rgba(107, 220, 255, 0.12); } .m-metric.cyan b { color: var(--cyan); }
.m-metric.red { background: rgba(235, 69, 69, 0.12); } .m-metric.red b { color: var(--red); }

.m-company {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.m-company div { display: grid; flex: 1; }
.m-company b { font-size: 11.5px; }
.m-company small { font-size: 9.5px; color: var(--muted); }
.m-mono {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--c);
}
.m-demo-note { margin-top: auto; text-align: center; font-size: 9px; color: var(--muted); }

/* ---------- Multiempresa ---------- */

.brands { padding: 130px 0; text-align: center; }
.brands .display { margin: 16px 0 18px; }

.brand-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 60px;
}
.brand-card { padding: 38px 24px 30px; display: grid; justify-items: center; gap: 4px; transition: transform 0.5s var(--ease), border-color 0.4s; }
.brand-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.brand-card b { margin-top: 18px; font-size: 18px; }
.brand-card small { color: var(--muted); }

.mini-ring {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from 0deg, var(--c), transparent 70%);
  animation: spin 6s linear infinite;
}
.mini-ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0a0f24;
}
.mini-ring span {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  background: var(--c);
  box-shadow: 0 0 30px -4px var(--c);
  animation: spin 6s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footnote { margin-top: 26px; font-size: 13px; color: var(--muted); }

/* ---------- Cumplimiento ---------- */

.compliance { padding: 120px 0; }
.compliance .container > .eyebrow, .compliance .container > .display { text-align: center; }
.compliance .display { margin: 16px 0 0; }
.compliance .footnote { text-align: center; }

.law-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}
.law { padding: 28px; position: relative; overflow: hidden; transition: transform 0.5s var(--ease), border-color 0.4s; }
.law::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 0% 0%, rgba(107, 220, 255, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.law:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.law:hover::before { opacity: 1; }
.law-tag {
  display: inline-block;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
}
.law h3 { margin: 16px 0 6px; font-size: 19px; }
.law p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Seguridad ---------- */

.security { padding: 120px 0; }
.security-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.security .display { margin: 16px 0 18px; }
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sec-list li { padding: 20px; display: grid; gap: 4px; }
.sec-list b { font-size: 16px; }
.sec-list span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Dispositivos ---------- */

.devices { padding: 100px 0; text-align: center; }
.devices .display { margin-top: 16px; }
.device-row { display: flex; justify-content: center; align-items: flex-end; gap: 40px; margin-top: 60px; flex-wrap: wrap; }
.device {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 28, 60, 0.7), rgba(8, 12, 28, 0.7));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 40px -18px rgba(107, 220, 255, 0.4);
  transition: transform 0.5s var(--ease);
}
.device:hover { transform: translateY(-8px); }
.device img { width: 64px; border-radius: 15px; box-shadow: 0 8px 24px -6px rgba(107, 220, 255, 0.4); }
.device span { font-size: 14px; color: var(--ink-soft); }
.device.phone-sm { width: 120px; height: 240px; border-radius: 28px; }
.device.tablet { width: 220px; height: 290px; border-radius: 26px; }
.device.laptop { width: 360px; height: 230px; border-radius: 18px 18px 6px 6px; position: relative; }
.device.laptop::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: -24px;
  right: -24px;
  height: 14px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #2a3348, #121828);
}

/* ---------- Implementación ---------- */

.process { padding: 110px 0; }
.process .container > .eyebrow, .process .container > .display { text-align: center; }
.process .display { margin: 16px 0 0; }
.timeline {
  list-style: none;
  padding: 0;
  margin: 60px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: none;
}
.timeline li { padding: 26px; display: grid; gap: 6px; }
.timeline span { font-family: var(--display); color: var(--cyan); font-size: 13px; letter-spacing: 0.2em; }
.timeline b { font-size: 17px; margin-top: 8px; }
.timeline p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Contacto ---------- */

.contact { padding: 110px 0 140px; }
.contact-box {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) clamp(22px, 5vw, 60px);
  display: grid;
  justify-items: center;
  gap: 18px;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(40, 120, 230, 0.25), transparent 70%),
    linear-gradient(180deg, rgba(20, 28, 60, 0.7), rgba(8, 12, 28, 0.7));
  border-color: var(--line-strong);
}
.contact-emblem { width: 110px; height: auto; filter: drop-shadow(0 0 16px rgba(107, 220, 255, 0.5)); }
.contact .display { max-width: 820px; font-size: clamp(28px, 4vw, 46px); }
.contact-mail { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.contact-mail a { color: inherit; text-decoration: none; white-space: nowrap; transition: color .2s; }
.contact-mail a:hover { color: var(--cyan); }

/* ---------- Pie ---------- */

.footer { border-top: 1px solid var(--line); padding: 34px 0 40px; background: rgba(3, 5, 15, 0.6); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand small { color: var(--muted); margin-left: 6px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { color: var(--muted); }

/* ---------- Páginas legales ---------- */

.legal { padding: 140px 0 100px; }
.legal-box {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.legal-box h1 { font-size: clamp(30px, 4.4vw, 44px); }
.legal-meta { color: var(--muted); font-size: 14px; margin: 10px 0 30px; }
.legal-box h2 { font-size: 19px; margin: 34px 0 8px; color: #fff; }
.legal-box p, .legal-box li { color: var(--ink-soft); font-weight: 300; font-size: 16px; }
.legal-box ul { padding-left: 20px; }
.legal-box a { color: var(--cyan); }
.back-link { display: inline-flex; gap: 8px; color: var(--cyan); font-size: 14px; margin-bottom: 22px; }

/* ---------- Adaptación a pantallas ---------- */

@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    inset: 64px 14px auto 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(6, 10, 26, 0.95);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a::after { display: none; }
  .nav-cta { text-align: center; margin-top: 6px; }
  .nav-toggle { display: block; }

  .pillars, .law-grid, .brand-cards { grid-template-columns: 1fr; }
  .figures-row { grid-template-columns: 1fr 1fr; }
  .security-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }

  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-stage { display: none; }
  .step { min-height: auto; opacity: 1; transform: none; padding: 50px 0; border-top: 1px solid var(--line); }
  .step-device { display: grid; place-items: center; margin-top: 34px; }
  .step-device .phone { transform: scale(0.9); transform-origin: top center; margin-bottom: -60px; }
  .step-device .screen { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .figures-row, .timeline, .sec-list { grid-template-columns: 1fr; }
  .device.laptop { width: 280px; height: 180px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .brand-lockup { clip-path: none; opacity: 1; }
}
