/* ==========================================================================
   MicareSoft — estilos
   Paleta: Void #000 · Porcelain #ECEEF2 · Graphite #16181D · Steel #8B91A1
           Ion #7C6BFF (acento) · Signal #2FE39B (estado "activo")
   Tipografía: Unbounded (titulares) + Geist (texto)
   ========================================================================== */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --void: #000000;
  --porcelain: #eceef2;
  --graphite: #16181d;
  --graphite-2: #22252c;
  --steel: #8b91a1;
  --ink: #0d0f14;
  --ion: #7c6bff;
  --ion-soft: #b9b0ff;
  --signal: #2fe39b;
  --danger: #ff6b6b;

  /* Variables de tema que cambian con el scroll */
  --bg: var(--void);
  --fg: #f4f5f8;
  --muted: #9aa0ae;
  --line: rgba(255, 255, 255, 0.12);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1280px;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 32px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: var(--ion);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ion-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 500 1rem/1 var(--font-body);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.3s,
    border-color 0.3s,
    box-shadow 0.4s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn--primary {
  --btn-bg: var(--ion);
  --btn-fg: #fff;
  box-shadow: 0 0 0 0 rgba(124, 107, 255, 0);
}
.btn--primary:hover {
  box-shadow: 0 10px 40px -8px rgba(124, 107, 255, 0.75);
}
.btn--ghost {
  border-color: color-mix(in srgb, var(--fg) 28%, transparent);
}
.btn--ghost:hover {
  border-color: var(--fg);
}
.btn--small {
  min-height: 2.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.9375rem;
}
.btn__icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

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

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: transform 0.5s var(--ease-out);
}
.nav.is-hidden {
  transform: translateY(-110%);
}
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: calc(var(--maxw) + 2rem);
  margin: 0.75rem auto 0;
  width: calc(100% - 1.5rem);
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background-color 0.4s,
    border-color 0.4s,
    backdrop-filter 0.4s;
}
.nav.is-solid .nav__bar {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.brand__mark {
  width: 28px;
  height: 28px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--muted);
  transition:
    color 0.2s,
    background-color 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav__toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform 0.4s var(--ease-out);
}
.nav__toggle span:first-child {
  top: calc(50% - 4px);
}
.nav__toggle span:last-child {
  top: calc(50% + 3px);
}
.nav.is-open .nav__toggle span:first-child {
  transform: translateX(-50%) translateY(3.5px) rotate(45deg);
}
.nav.is-open .nav__toggle span:last-child {
  transform: translateX(-50%) translateY(-3.5px) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2rem;
  padding: 6rem var(--gutter) 2.5rem;
  background: var(--void);
  color: #f4f5f8;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-out);
  visibility: hidden;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li a {
  display: block;
  padding: 0.4rem 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  letter-spacing: -0.04em;
  text-decoration: none;
}

@media (max-width: 860px) {
  .nav__links,
  .nav__actions .btn {
    display: none;
  }
  .nav__toggle {
    display: block;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero__inner {
  position: relative;
  text-align: center;
  padding-inline: var(--gutter);
  max-width: 1240px;
}
.hero__inner::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.35) 60%, transparent);
  pointer-events: none;
}
.hero__title {
  font-size: clamp(2.3rem, 6.1vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.hero__title .line {
  display: block;
}
@media (min-width: 761px) {
  .hero__title .line {
    white-space: nowrap;
  }
}
.hero__sub {
  max-width: 36rem;
  margin: 1.75rem auto 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.25rem;
}
.hero__hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--fg) 60%, transparent));
  overflow: hidden;
}
.hero__hint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  animation: hint 2.4s var(--ease-out) infinite;
}
@keyframes hint {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* ---------- Manifiesto (texto que se ilumina con el scroll) ---------- */

.manifesto {
  padding: clamp(6rem, 18vh, 12rem) 0;
}
.manifesto__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.65rem, 3.9vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 22ch;
}
.manifesto__text .word {
  display: inline-block;
}

/* ---------- Encabezados de sección ---------- */

.section-head > * {
  max-width: 46rem;
}
.section-head h2 {
  font-size: clamp(2rem, 4.8vw, 4.25rem);
}
.section-head p {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  color: var(--muted);
}

/* ---------- WhatsApp ---------- */

.wa {
  padding-top: clamp(4rem, 12vh, 8rem);
}
.wa__stage {
  position: relative;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.45fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wa__captions {
  position: relative;
  display: grid;
}
.wa__steps {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
  max-width: 18rem;
}
.wa__steps i {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.wa__steps i b {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform-origin: left;
  transform: scaleX(0);
}
.wa__caption-list {
  display: grid;
}
.wa__caption {
  grid-area: 1 / 1;
}
.wa__caption h3 {
  font-size: clamp(1.75rem, 3.4vw, 3rem);
}
.wa__caption p {
  margin-top: 1rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

/* Teléfono */
.phone {
  --ph-h: min(680px, 80svh);
  position: relative;
  height: var(--ph-h);
  aspect-ratio: 9 / 19;
  border-radius: calc(var(--ph-h) * 0.085);
  padding: calc(var(--ph-h) * 0.016);
  background: linear-gradient(145deg, #3a3d46, #121318 40%, #2a2c33);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 50px 120px -30px rgba(124, 107, 255, 0.55),
    0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.phone__screen {
  position: relative;
  height: 100%;
  border-radius: calc(var(--ph-h) * 0.07);
  overflow: hidden;
  background: #0b0e11;
  display: flex;
  flex-direction: column;
  font-size: clamp(11px, calc(var(--ph-h) * 0.0205), 14px);
  color: #e9edef;
}
.phone__island {
  position: absolute;
  top: 1.2%;
  left: 50%;
  translate: -50% 0;
  width: 30%;
  height: 3.6%;
  border-radius: 99px;
  background: #000;
  z-index: 3;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 3.3em 1em 0.8em;
  background: #161b20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.chat__avatar {
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ion), #46c7ff);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.9em;
  font-weight: 600;
  color: #fff;
}
.chat__name {
  font-weight: 600;
  line-height: 1.2;
}
.chat__status {
  font-size: 0.82em;
  color: var(--signal);
  line-height: 1.2;
}
.chat__body > * {
  flex-shrink: 0;
}
.chat__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45em;
  padding: 1em 0.85em;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 107, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(47, 227, 155, 0.05), transparent 40%),
    #0b0e11;
}
.chat__day {
  align-self: center;
  margin-bottom: 0.5em;
  padding: 0.25em 0.8em;
  border-radius: 0.6em;
  background: #1a2026;
  color: #8696a0;
  font-size: 0.82em;
}
.msg {
  max-width: 82%;
  padding: 0.5em 0.75em 0.4em;
  border-radius: 0.9em;
  line-height: 1.35;
  position: relative;
}
.msg time {
  display: block;
  text-align: right;
  font-size: 0.72em;
  color: rgba(233, 237, 239, 0.55);
  margin-top: 0.1em;
}
.msg--in {
  align-self: flex-start;
  background: #1f262c;
  border-top-left-radius: 0.25em;
}
.msg--out {
  align-self: flex-end;
  background: #134d3b;
  border-top-right-radius: 0.25em;
}
.msg--card {
  padding: 0;
  overflow: hidden;
  width: 82%;
}
.msg--card .card__top {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.75em;
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.35), rgba(70, 199, 255, 0.15));
}
.msg--card .card__check {
  width: 2em;
  height: 2em;
  flex: none;
  border-radius: 50%;
  background: var(--signal);
  color: #04281a;
  display: grid;
  place-items: center;
}
.msg--card .card__check svg {
  width: 1.1em;
  height: 1.1em;
}
.msg--card strong {
  display: block;
  font-size: 1.02em;
}
.msg--card .card__meta {
  font-size: 0.85em;
  color: rgba(233, 237, 239, 0.75);
}
.msg--card p {
  padding: 0.6em 0.75em 0;
}
.msg--card time {
  padding: 0 0.75em 0.4em;
}
.typing {
  align-self: flex-start;
  display: flex;
  gap: 0.25em;
  padding: 0.75em 0.9em;
  border-radius: 0.9em;
  border-top-left-radius: 0.25em;
  background: #1f262c;
}
.typing i {
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: #8696a0;
  animation: typing 1.2s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-0.3em);
    opacity: 1;
  }
}
.chat__input {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.7em 0.8em 1.8em;
  background: #0b0e11;
}
.chat__input span {
  flex: 1;
  padding: 0.6em 0.9em;
  border-radius: 99px;
  background: #1f262c;
  color: #8696a0;
}
.chat__input i {
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: #1d8f6b;
}

/* Etiquetas que salen del teléfono al final */
.wa__sync {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sync-pill {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--graphite) 85%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
  color: #f4f5f8;
  white-space: nowrap;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.sync-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}
.sync-pill:nth-child(1) {
  top: 18%;
  right: calc(100% - 1.5rem);
}
.sync-pill:nth-child(2) {
  top: 48%;
  left: calc(100% - 1.5rem);
}
.sync-pill:nth-child(3) {
  bottom: 16%;
  right: calc(100% - 2.5rem);
}
.wa__phone-wrap {
  position: relative;
}

@media (max-width: 860px) {
  .wa__stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 1.25rem;
    padding-top: 5.25rem;
    padding-bottom: 1.25rem;
  }
  .wa__steps {
    margin-bottom: 1rem;
  }
  .wa__caption p {
    margin-top: 0.5rem;
    font-size: 0.95rem;
  }
  .wa__phone-wrap {
    justify-self: center;
    align-self: center;
  }
  .phone {
    --ph-h: min(560px, 56svh);
  }
  .sync-pill {
    font-size: 0.78rem;
    padding: 0.5rem 0.8rem;
  }
  .sync-pill:nth-child(1) {
    right: auto;
    left: -15%;
    top: 22%;
  }
  .sync-pill:nth-child(2) {
    left: auto;
    right: -15%;
  }
  .sync-pill:nth-child(3) {
    right: auto;
    left: -10%;
  }
}

/* ---------- Correo ---------- */

.mail {
  padding-top: 0;
}
.mail__stage {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 6vh, 4rem);
}
.mail__board {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1rem);
}
.inbox,
.lane {
  position: relative;
  border-radius: var(--radius-m);
  padding: 0.9rem;
  min-height: 21rem;
}
.inbox {
  background: var(--ink);
  color: #f4f5f8;
}
.lane {
  border: 1px dashed color-mix(in srgb, var(--fg) 22%, transparent);
}
.board__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.board__label .count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.lane .board__label::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--tag);
  margin-right: auto;
  order: -1;
}
.lane .board__label {
  justify-content: flex-start;
}
.lane .board__label span:first-of-type {
  margin-right: auto;
}
.lane__slots {
  display: grid;
  gap: 0.6rem;
}
.slot {
  height: 5.25rem;
}
.inbox__pile {
  position: relative;
  height: calc(5.25rem + 50px);
}
.inbox__done {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  top: 3.5rem;
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  color: #b9bdc8;
  font-size: 0.9rem;
}
.inbox__done strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.motion .inbox__done {
  opacity: 0;
}
.mail-card {
  position: absolute;
  z-index: 2;
  height: 5.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 30px -16px rgba(13, 15, 20, 0.45);
  font-size: 0.85rem;
  line-height: 1.3;
  overflow: hidden;
  will-change: transform;
}
.mail-card__from {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
}
.mail-card__from small {
  font-weight: 400;
  color: #6b7180;
}
.mail-card__subject {
  margin-top: 0.15rem;
  color: #3a3f4b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-card__tags {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--tag) 16%, #fff);
  color: color-mix(in srgb, var(--tag) 75%, #000);
}
.tag--auto {
  --tag: #0aa66b;
}
.lane--urgente,
.mail-card[data-lane="urgente"] {
  --tag: #ff4d5e;
}
.lane--ventas,
.mail-card[data-lane="ventas"] {
  --tag: #7c6bff;
}
.lane--soporte,
.mail-card[data-lane="soporte"] {
  --tag: #1fa3ff;
}
.lane--facturas,
.mail-card[data-lane="facturas"] {
  --tag: #f2a516;
}

@media (max-width: 960px) {
  .mail__stage {
    justify-content: flex-start;
    gap: 1.25rem;
    padding-top: 5.25rem;
  }
  .mail__stage .section-head h2 {
    font-size: clamp(1.6rem, 6.5vw, 2.4rem);
  }
  .mail__stage .section-head p {
    display: none;
  }
  .inbox__pile {
    height: calc(4.4rem + 30px);
  }
  .inbox__done {
    top: 2.6rem;
  }
  .mail__board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inbox {
    grid-column: 1 / -1;
    min-height: 0;
    padding-bottom: 0.9rem;
  }
  .lane {
    min-height: 0;
    padding: 0.7rem;
  }
  .slot,
  .mail-card {
    height: 4.1rem;
  }
  .mail-card {
    font-size: 0.75rem;
    padding: 0.55rem 0.6rem;
  }
  .mail-card__from small {
    display: none;
  }
  .board__label {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
  }
  .lane__slots {
    gap: 0.45rem;
  }
}

/* ---------- Integraciones ---------- */

.api {
  padding-block: clamp(6rem, 16vh, 11rem);
}
.api__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  min-height: 100svh;
}
.flows {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 30rem;
}
.flows li {
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}
.flows li strong {
  display: block;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.network {
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
}
.network .link {
  fill: none;
  stroke: url(#linkGrad);
  stroke-width: 1.5;
}
.network .node rect {
  fill: var(--graphite);
  stroke: rgba(255, 255, 255, 0.14);
}
.network .node text {
  fill: #e9ebf0;
  font: 500 21px var(--font-body);
  text-anchor: middle;
  dominant-baseline: central;
}
.network .core circle.ring {
  fill: none;
  stroke: rgba(124, 107, 255, 0.35);
}
.network .core text {
  fill: #fff;
  font: 600 21px var(--font-display);
  letter-spacing: -0.03em;
  text-anchor: middle;
  dominant-baseline: central;
}
.network .packet {
  fill: var(--signal);
}

@media (max-width: 960px) {
  .api__grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .network {
    max-width: 560px;
    margin-inline: auto;
  }
}

/* ---------- Sectores (scroll horizontal) ---------- */

.sectors {
  position: relative;
  overflow: hidden;
}
.sectors__pin {
  height: 100svh;
  display: flex;
  align-items: center;
}
.sectors__track {
  display: flex;
  gap: clamp(1rem, 3vw, 3rem);
  padding-inline: var(--gutter);
  will-change: transform;
}
.sector {
  container-type: inline-size;
  flex: none;
  width: min(78vw, 980px);
  min-height: min(62svh, 560px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--fg) 3%, transparent);
}
.sector--intro {
  width: min(70vw, 760px);
  border: 0;
  background: none;
  padding-left: 0;
  justify-content: center;
}
.sector--intro h2 {
  font-size: clamp(2.2rem, 5.2vw, 4.75rem);
}
.sector--intro p {
  margin-top: 1.25rem;
  color: var(--muted);
  max-width: 28rem;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
}
.sector__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: min(7rem, calc(100cqi / var(--len, 10)));
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--fg) 55%, transparent);
  background: linear-gradient(90deg, var(--fg) 0 50%, transparent 50% 100%) no-repeat;
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
}
.sector__chat {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100%, 24rem);
  font-size: 0.95rem;
  line-height: 1.35;
}
.bubble {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 1rem;
  color: #e9edef;
}
.bubble--out {
  align-self: flex-end;
  background: #134d3b;
  border-top-right-radius: 0.3rem;
}
.bubble--in {
  align-self: flex-start;
  background: #1f262c;
  border-top-left-radius: 0.3rem;
}
.sector__body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}
.sector__body p {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.45;
  max-width: 30rem;
}
.sector__body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.sector__body li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}
.sector__body li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ion);
  flex: none;
}
.sectors__progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 2rem;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.sectors__progress b {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform-origin: left;
  transform: scaleX(0);
}

@media (max-width: 760px) {
  .sector {
    width: 86vw;
    min-height: 66svh;
  }
  .sector--intro {
    width: 86vw;
  }
  .sector__body {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .sector__chat {
    font-size: 0.85rem;
    align-self: stretch;
    width: auto;
  }
  .sector__body ul {
    display: none;
  }
}

/* ---------- Proceso ---------- */

.process {
  padding-block: clamp(6rem, 16vh, 11rem);
}
.steps {
  position: relative;
  margin-top: clamp(3rem, 8vh, 5rem);
}
.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2.5rem, 7vh, 4.5rem);
}
.steps__line {
  position: absolute;
  left: 1.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line);
}
.steps__line b {
  position: absolute;
  inset: 0;
  background: var(--ion);
  transform-origin: top;
  transform: scaleY(0);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
}
.step__num {
  position: relative;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    border-color 0.4s,
    background-color 0.4s,
    color 0.4s;
}
.step.is-active .step__num {
  border-color: var(--ion);
  background: var(--ion);
  color: #fff;
}
.step__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 3rem;
  padding-top: 0.35rem;
}
.step h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}
.step p {
  color: var(--muted);
  max-width: 30rem;
}

@media (max-width: 760px) {
  .step__text {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA final ---------- */

.final {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding-block: 8rem;
  isolation: isolate;
}
.final__glow {
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(120vw, 1400px);
  aspect-ratio: 2 / 1;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(124, 107, 255, 0.55), rgba(124, 107, 255, 0.12) 55%, transparent);
  filter: blur(20px);
  z-index: -1;
}
.final h2 {
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  letter-spacing: -0.05em;
  max-width: 14ch;
  margin-inline: auto;
}
.final p {
  margin: 1.5rem auto 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}
.final .hero__ctas {
  margin-top: 2.5rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer .brand {
  color: var(--fg);
}
.footer__tagline {
  margin-top: 0.75rem;
  max-width: 22rem;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__nav a {
  text-decoration: none;
}
.footer__nav a:hover {
  color: var(--fg);
}
.footer__bottom {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

/* ---------- Páginas simples (contacto, legales, blog, 404) ---------- */

.page-simple main {
  min-height: 70svh;
}
.simple {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(8rem, 20vh, 12rem) var(--gutter) 6rem;
}
.simple__title {
  font-size: clamp(2.2rem, 5.5vw, 4.25rem);
}
.simple__lead {
  margin: 1.25rem 0 2rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
}
.prose {
  margin-top: 3rem;
  color: color-mix(in srgb, var(--fg) 82%, transparent);
}
.prose h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
  color: var(--fg);
}
.prose p,
.prose ul {
  margin: 0 0 1rem;
}
.prose ul {
  padding-left: 1.2rem;
}
.prose a {
  color: var(--ion-soft);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.fill {
  background: rgba(242, 165, 22, 0.18);
  color: #ffd27a;
  padding: 0 0.3em;
  border-radius: 4px;
}

/* Contacto */
.contact {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(8rem, 18vh, 11rem) var(--gutter) 6rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact__aside {
  position: sticky;
  top: 8rem;
}
.contact__aside h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}
.contact__aside p {
  margin-top: 1.25rem;
  color: var(--muted);
  max-width: 26rem;
}
.contact__alt {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.contact__alt p {
  margin: 0 0 1rem;
}
.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-l);
  background: var(--graphite);
  border: 1px solid var(--line);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.field {
  display: grid;
  gap: 0.45rem;
}
.field label,
.field legend {
  font-size: 0.9rem;
  font-weight: 500;
}
.field .opt {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ion);
  box-shadow: 0 0 0 4px rgba(124, 107, 255, 0.25);
}
.field input::placeholder,
.field textarea::placeholder {
  color: #6c7282;
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}
.field__error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 0;
}
fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
}
.chip {
  position: relative;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.chip input:checked + span {
  background: var(--ion);
  border-color: var(--ion);
  color: #fff;
}
.chip input:focus-visible + span {
  outline: 2px solid var(--ion-soft);
  outline-offset: 2px;
}
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
}
.consent input {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--ion);
  flex: none;
}
.consent a {
  color: var(--fg);
}
.hp {
  position: absolute !important;
  left: -9999px !important;
}
.form__status {
  font-size: 0.95rem;
  min-height: 1.5em;
}
.form__status.is-error {
  color: var(--danger);
}
.form button[type="submit"] {
  justify-self: start;
}
.form button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
  .contact__aside {
    position: static;
  }
  .form__row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Estados iniciales de animación (solo si hay JS y movimiento) ---------- */

.motion .msg,
.motion .typing,
.motion .sync-pill {
  opacity: 0;
}
.motion .wa__caption:not(:first-child) {
  opacity: 0;
}

/* Sin JS o con movimiento reducido: todo visible y sin pins */
html:not(.motion) .typing {
  display: none;
}
html:not(.motion) .wa__stage,
html:not(.motion) .mail__stage,
html:not(.motion) .sectors__pin {
  height: auto;
  padding-block: 4rem;
}
html:not(.motion) .wa__caption-list {
  gap: 2rem;
}
html:not(.motion) .wa__caption {
  grid-area: auto;
}
html:not(.motion) .wa__steps,
html:not(.motion) .wa__sync,
html:not(.motion) .sectors__progress,
html:not(.motion) .hero__hint {
  display: none;
}
html:not(.motion) .sectors__track {
  flex-direction: column;
}
html:not(.motion) .sector {
  width: auto;
  min-height: 0;
}
html:not(.motion) .sector__name {
  color: var(--fg);
  -webkit-text-stroke: 0;
}
html:not(.motion) .mail-card {
  position: relative;
}
html:not(.motion) .inbox__pile {
  height: auto;
}
html:not(.motion) .step .step__num {
  border-color: var(--ion);
}
html:not(.motion) [data-theme="light"] {
  --bg: var(--porcelain);
  --fg: var(--ink);
  --muted: #4d5363;
  --line: rgba(13, 15, 20, 0.14);
  background: var(--bg);
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Entrada suave de los títulos en páginas interiores */
.motion .simple__title,
.motion .contact__aside h1 {
  animation: rise 1.1s var(--ease-out) both;
}
.motion .simple__lead,
.motion .contact__aside p,
.motion .form {
  animation: rise 1.1s var(--ease-out) 0.12s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}
