/* Bespotech V3 — «Del caos al sistema». Fuente editable; build.py genera styles.<hash>.css */
@font-face {
  font-family: Urbanist;
  src: url("assets/fonts/urbanist-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Urbanist;
  src: url("assets/fonts/urbanist-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Urbanist;
  src: url("assets/fonts/urbanist-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --ink: #1c1c1c;
  --night: #161517;
  --paper: #f4f3f3;
  --white: #fff;
  --purple: #7457c1;
  --deep: #3c2a55;
  --lilac: #a88fcb;
  --green: #10e87a;
  --mint: #a0d0ab;
  --petrol: #005562;
  --wine: #9e1b66;
  --line: rgba(28, 28, 28, 0.14);
  --line-dark: rgba(244, 243, 243, 0.14);
  --muted: rgba(28, 28, 28, 0.66);
  --muted-dark: rgba(244, 243, 243, 0.68);
  --shell: 1240px;
  --header: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--header) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 Urbanist, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(2.2rem, 1.3rem + 3vw, 4rem);
}
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.shell {
  width: min(var(--shell), calc(100% - 64px));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}
.kicker {
  margin-bottom: 20px;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.intro-text {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 36rem;
}

/* ---------- Botones ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  overflow: hidden;
  font-weight: 600;
  isolation: isolate;
  transition: color 0.35s var(--ease);
}
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.button:hover::before,
.button:focus-visible::before {
  transform: none;
}
.button-green {
  background: var(--green);
  color: var(--ink);
}
.button-green::before {
  background: var(--white);
}
.button-light {
  background: var(--white);
  color: var(--ink);
}
.button-light::before {
  background: var(--green);
}
.plain-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 14px) / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.plain-link:hover {
  background-size: 100% 1px;
}

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header);
  background: rgba(22, 21, 23, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-dark);
  color: var(--paper);
  transition: transform 0.45s var(--ease);
}
.site-header.is-hidden {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand img {
  width: 158px;
  height: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.95rem;
  font-weight: 600;
}
.main-nav a:not(.header-cta) {
  color: var(--muted-dark);
  transition: color 0.25s;
}
.main-nav a:not(.header-cta):hover {
  color: var(--paper);
}
.header-cta {
  padding: 10px 16px;
  border: 1px solid rgba(244, 243, 243, 0.35);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.header-cta:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--paper);
  padding: calc(var(--header) + 64px) 0 72px;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 45%, rgba(116, 87, 193, 0.34), transparent 70%),
    radial-gradient(40% 40% at 12% 90%, rgba(16, 232, 122, 0.08), transparent 70%);
}
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 7px 12px;
  border: 1px solid var(--line-dark);
  color: var(--muted-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 232, 122, 0.18);
}
.hero h1 {
  font-size: clamp(2.8rem, 1.1rem + 4.4vw, 5.1rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero h1 em {
  position: relative;
  display: inline-block;
  color: var(--green);
  font-style: normal;
}
.underline {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.28em;
  overflow: visible;
}
.underline path {
  fill: none;
  stroke: var(--purple);
  stroke-width: 6;
  stroke-linecap: round;
}
.hero-lead {
  max-width: 34rem;
  margin: 34px 0 36px;
  color: var(--muted-dark);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.scroll-hint {
  display: none;
}

/* Escenario */
.hero-visual {
  width: min(100%, calc((100svh - var(--header) - 190px) * 1.111));
  min-width: min(100%, 520px);
  justify-self: end;
}
.stage {
  position: relative;
  aspect-ratio: 10 / 9;
  container-type: inline-size;
}
.stage-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.stage-lines .l-base {
  fill: none;
  stroke: rgba(244, 243, 243, 0.22);
  stroke-width: 1.5;
}
.stage-lines .l-flow {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 16;
}
.motion .stage-lines .l-flow {
  animation: flow 1.1s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -18;
  }
}
.frag {
  position: absolute;
  left: 0;
  width: 31%;
  z-index: 2;
}
.frag-1 { top: 6%; }
.frag-2 { top: 28.5%; }
.frag-3 { top: 51%; }
.frag-4 { top: 73.5%; }
.frag-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}
.motion .frag-card {
  animation: bob 5s ease-in-out infinite;
}
.frag-2 .frag-card { animation-delay: -1.3s; }
.frag-3 .frag-card { animation-delay: -2.6s; }
.frag-4 .frag-card { animation-delay: -3.7s; }
@keyframes bob {
  50% {
    transform: translateY(-5px);
  }
}
.frag-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  font-weight: 700;
}
.icon-excel { background: #1d6f42; color: var(--white); }
.icon-sensor { background: var(--deep); }
.icon-sensor i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--green);
}
.icon-note { background: #ffe9a8; color: #7a5a00; }
.icon-mail { background: rgba(116, 87, 193, 0.14); color: var(--purple); }
.frag-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}
.frag-text strong {
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frag-text small {
  grid-area: 2 / 1;
  font-size: 0.74rem;
  color: rgba(28, 28, 28, 0.62);
}
.frag-text .s-after {
  color: #0a7d45;
  font-weight: 600;
}
.frag-text .s-before {
  visibility: hidden;
}
.core {
  position: absolute;
  left: 36.5%;
  top: 42.8%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 13%;
  aspect-ratio: 1;
  background: #211f24;
  border: 1px solid rgba(16, 232, 122, 0.4);
  box-shadow: 0 0 0 8px rgba(16, 232, 122, 0.05), 0 0 48px rgba(16, 232, 122, 0.22);
}
.core-iso {
  width: 64%;
  overflow: visible;
}
.core-iso path,
.cap-iso path {
  fill: var(--green);
  transform-box: fill-box;
  transform-origin: center;
}
.core-ring {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--green);
  opacity: 0;
}
.motion .core-ring {
  animation: ring 2.4s var(--ease) infinite;
}
@keyframes ring {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.7); }
}
.dash {
  position: absolute;
  left: 55.5%;
  right: 0;
  top: 2%;
  bottom: 2%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.dash-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.dash-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.22);
}
.dash-bar small {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
}
.dash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4cqi;
  padding: 4cqi 3.4cqi;
  min-height: 0;
}
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: max(0.78rem, 2.2cqi);
  font-weight: 600;
}
.dash-head b {
  padding: 3px 7px;
  background: rgba(16, 232, 122, 0.2);
  color: #055f33;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4cqi;
}
.dash-metrics i {
  display: grid;
  gap: 2px;
  padding: 1.6cqi 1.8cqi;
  background: var(--white);
  border-top: 3px solid var(--purple);
  font-style: normal;
}
.dash-metrics i:nth-child(2) { border-color: var(--petrol); }
.dash-metrics i:nth-child(3) { border-color: var(--green); }
.dash-metrics small {
  font-size: max(0.64rem, 1.6cqi);
  color: var(--muted);
}
.dash-metrics strong {
  font-size: max(1.05rem, 3.6cqi);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.dash-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 1.2cqi;
  min-height: 60px;
  padding: 2cqi;
  background: var(--white);
}
.dash-chart span,
.report-chart span {
  flex: 1;
  height: var(--h);
  background: var(--purple);
  transform-origin: 50% 100%;
}
.dash-chart span:nth-child(1), .report-chart span:nth-child(1) { --h: 38%; }
.dash-chart span:nth-child(2), .report-chart span:nth-child(2) { --h: 56%; }
.dash-chart span:nth-child(3), .report-chart span:nth-child(3) { --h: 46%; }
.dash-chart span:nth-child(4), .report-chart span:nth-child(4) { --h: 70%; }
.dash-chart span:nth-child(5), .report-chart span:nth-child(5) { --h: 60%; }
.dash-chart span:nth-child(6), .report-chart span:nth-child(6) { --h: 90%; }
.dash-chart span:nth-child(7) { --h: 76%; }
.dash-chart span:nth-child(8) { --h: 96%; }
.dash-chart span:nth-child(n + 6) {
  background: var(--green);
}
.dash-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.8cqi 2cqi;
  background: rgba(16, 232, 122, 0.16);
  border-left: 3px solid var(--green);
}
.dash-alert b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--green);
  font-size: 0.8rem;
}
.dash-alert span {
  display: grid;
  line-height: 1.25;
}
.dash-alert strong {
  font-size: max(0.74rem, 1.9cqi);
  font-weight: 600;
}
.dash-alert small {
  font-size: max(0.66rem, 1.6cqi);
  color: var(--muted);
}
.stage-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted-dark);
}
.stage-steps li {
  transition: color 0.4s;
}
.stage-steps b {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(244, 243, 243, 0.4);
  transition: color 0.4s;
}
.motion .stage-steps li {
  color: rgba(244, 243, 243, 0.42);
}
.motion .stage-steps li.is-active {
  color: var(--paper);
}
.motion .stage-steps li.is-active b {
  color: var(--green);
}
.stage-progress {
  display: block;
  height: 2px;
  margin-top: 12px;
  background: var(--line-dark);
}
.stage-progress i {
  display: block;
  height: 100%;
  background: var(--green);
  transform-origin: 0 50%;
}
.motion .stage-progress i {
  transform: scaleX(0);
}
.stage-caption {
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(244, 243, 243, 0.5);
}

/* ---------- Marquesina ---------- */
.marquee {
  overflow: hidden;
  background: var(--green);
  color: var(--ink);
  border-block: 1px solid var(--ink);
}
.marquee-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
.marquee-track li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 30px;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-track li::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 30px;
  background: var(--ink);
  transform: rotate(45deg);
}
.marquee-track b {
  font-weight: 700;
}
.marquee-track i {
  font-style: normal;
  color: var(--deep);
}
.motion .marquee-track {
  flex-wrap: nowrap;
  max-width: none;
  animation: marquee 38s linear infinite;
}
.motion .marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Soluciones ---------- */
.solutions {
  padding: 128px 0 120px;
}
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.section-intro .kicker {
  grid-column: 1 / -1;
  margin: 0;
}
.section-intro .intro-text {
  padding-bottom: 6px;
}
.muted {
  color: #737272;
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: border-color 0.4s, transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(116, 87, 193, 0.14), transparent 60%);
  transition: opacity 0.4s;
}
.card:hover {
  border-color: rgba(116, 87, 193, 0.45);
  box-shadow: 0 30px 60px -40px rgba(60, 42, 85, 0.55);
}
.card:hover::before {
  opacity: 1;
}
.card-portal {
  grid-column: span 4;
  flex-direction: row;
  align-items: stretch;
}
.card-portal .viz {
  flex: 1.25;
}
.card-portal .card-copy {
  flex: 1;
  justify-content: center;
}
.card-report {
  grid-column: span 2;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card-label,
.card-sensor,
.card-upgrade {
  grid-column: span 2;
}
.card-sensor {
  background: var(--deep);
  color: var(--paper);
  border-color: var(--deep);
}
.card-report::before,
.card-sensor::before {
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(16, 232, 122, 0.13), transparent 60%);
}
.card-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-before {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
}
.card-before span {
  padding: 3px 6px;
  border: 1px solid currentColor;
  letter-spacing: 0.04em;
}
.card-report .card-before,
.card-sensor .card-before {
  color: var(--green);
}
.card h3 {
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
  letter-spacing: -0.03em;
}
.card-copy > p:not(.card-before):not(.card-result) {
  color: var(--muted);
}
.card-report .card-copy > p:not(.card-before):not(.card-result),
.card-sensor .card-copy > p:not(.card-before):not(.card-result) {
  color: var(--muted-dark);
}
.card-result {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 600;
}
.card-report .card-result,
.card-sensor .card-result {
  border-color: var(--line-dark);
}
.viz {
  position: relative;
  min-height: 190px;
}

/* Viz 1: Excel → portal */
.viz-portal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(rgba(116, 87, 193, 0.22) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--paper);
  border: 1px solid var(--line);
}
.portal-window {
  max-width: 460px;
}
.portal-window {
  width: 100%;
  background: var(--white);
  box-shadow: 0 20px 44px -26px rgba(28, 28, 28, 0.45);
  font-size: 0.78rem;
}
.portal-top {
  position: relative;
  height: 38px;
  border-bottom: 1px solid var(--line);
}
.portal-top > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 600;
}
.portal-file b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: #1d6f42;
  color: var(--white);
  font-size: 0.65rem;
}
.portal-file {
  opacity: 0;
}
.portal-app i {
  width: 18px;
  height: 18px;
  background: var(--purple);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.portal-tools {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}
.portal-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
}
.portal-search i {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(28, 28, 28, 0.5);
  border-radius: 50%;
}
.portal-search em {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  font-style: normal;
  font-weight: 600;
  width: 4.4em;
  border-right: 1px solid var(--purple);
}
.portal-chip {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(116, 87, 193, 0.12);
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
}
.portal-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.portal-row i {
  font-style: normal;
}
.portal-row i:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.portal-head {
  height: 28px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.portal-row u {
  padding: 2px 7px;
  text-decoration: none;
  background: rgba(158, 27, 102, 0.1);
  color: var(--wine);
  font-weight: 600;
  font-size: 0.72rem;
}
.portal-row u.ok {
  background: rgba(16, 232, 122, 0.18);
  color: #0a7d45;
}
.live .portal-file { animation: p-file 9s infinite; }
.live .portal-app { animation: p-app 9s infinite; }
.live .portal-search em { animation: p-type 9s steps(6) infinite; }
.live .portal-chip { animation: p-chip 9s infinite; }
.live .portal-row.r2,
.live .portal-row.r4 { animation: p-hide 9s var(--ease) infinite; }
.live .portal-row.r1,
.live .portal-row.r3 { animation: p-hit 9s infinite; }
@keyframes p-file {
  0%, 16% { opacity: 1; transform: none; }
  22%, 100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes p-app {
  0%, 18% { opacity: 0; transform: translateY(8px); }
  24%, 100% { opacity: 1; transform: none; }
}
@keyframes p-type {
  0%, 28% { width: 0; }
  44%, 100% { width: 4.4em; }
}
@keyframes p-chip {
  0%, 48% { opacity: 0; transform: scale(0.85); }
  53%, 100% { opacity: 1; transform: none; }
}
@keyframes p-hide {
  0%, 56% { height: 34px; opacity: 1; }
  64%, 92% { height: 0; opacity: 0; border-color: transparent; }
  100% { height: 34px; opacity: 1; }
}
@keyframes p-hit {
  0%, 60% { background: transparent; }
  66%, 92% { background: rgba(16, 232, 122, 0.1); }
  100% { background: transparent; }
}

/* Viz 2: reportes */
.viz-report {
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background: rgba(244, 243, 243, 0.05);
  border: 1px solid var(--line-dark);
}
.report-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  height: 120px;
}
.report-chart span {
  background: var(--lilac);
}
.report-chart span:last-child {
  background: var(--green);
}
.report-toast {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6);
}
.report-toast b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--purple);
  color: var(--white);
  font-size: 0.8rem;
}
.report-toast span {
  display: grid;
  line-height: 1.2;
}
.report-toast strong {
  font-size: 0.8rem;
  font-weight: 600;
}
.report-toast small {
  font-size: 0.7rem;
  color: var(--muted);
}
.live .report-chart span { animation: r-bar 7s var(--ease) infinite; }
.live .report-chart span:nth-child(2) { animation-delay: 0.08s; }
.live .report-chart span:nth-child(3) { animation-delay: 0.16s; }
.live .report-chart span:nth-child(4) { animation-delay: 0.24s; }
.live .report-chart span:nth-child(5) { animation-delay: 0.32s; }
.live .report-chart span:nth-child(6) { animation-delay: 0.4s; }
.live .report-toast { animation: r-toast 7s var(--ease) infinite; }
@keyframes r-bar {
  0% { transform: scaleY(0.04); }
  18%, 90% { transform: none; }
  100% { transform: scaleY(0.04); }
}
@keyframes r-toast {
  0%, 34% { opacity: 0; transform: translate(24px, -6px); }
  42%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-10px); }
}

/* Viz 3: etiquetado */
.viz-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}
.printer {
  position: relative;
  z-index: 2;
  width: 72%;
  height: 46px;
  background: var(--ink);
}
.printer-slot {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8px;
  height: 4px;
  background: #000;
}
.printer-led {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.label-paper {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: 58%;
  margin-top: -6px;
  padding: 16px 14px 14px;
  background: var(--white);
  box-shadow: 0 16px 30px -18px rgba(28, 28, 28, 0.5);
  overflow: hidden;
}
.label-lot {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.barcode {
  display: flex;
  gap: 3px;
  height: 34px;
}
.barcode i {
  flex: 1;
  background: var(--ink);
}
.barcode i:nth-child(3n) { flex: 0.4; }
.barcode i:nth-child(4n + 1) { flex: 1.8; }
.barcode i:nth-child(5n) { flex: 0.6; }
.label-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--green);
  box-shadow: 0 0 14px 3px rgba(16, 232, 122, 0.7);
  opacity: 0;
}
.label-ok {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: var(--green);
  font-size: 0.74rem;
  font-weight: 700;
}
.live .printer-led { animation: l-led 6s infinite; }
.live .label-paper { animation: l-print 6s var(--ease) infinite; }
.live .label-scan { animation: l-scan 6s linear infinite; }
.live .label-ok { animation: l-ok 6s var(--ease) infinite; }
@keyframes l-led {
  0%, 30% { opacity: 1; }
  5%, 15%, 25% { opacity: 0.2; }
}
@keyframes l-print {
  0% { transform: translateY(-105%); }
  30%, 90% { transform: none; }
  100% { transform: translateY(-105%); }
}
@keyframes l-scan {
  0%, 38% { opacity: 0; left: 0; }
  40% { opacity: 1; left: 0; }
  60% { opacity: 1; left: calc(100% - 3px); }
  62%, 100% { opacity: 0; left: calc(100% - 3px); }
}
@keyframes l-ok {
  0%, 60% { opacity: 0; transform: translateY(8px) scale(0.9); }
  66%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; }
}

/* Viz 4: sensores */
.viz-sensor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(244, 243, 243, 0.06);
  border: 1px solid var(--line-dark);
}
.sensor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-dark);
}
.sensor-head span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sensor-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.live .sensor-head i {
  animation: blink 1.4s infinite;
}
@keyframes blink {
  50% { opacity: 0.25; }
}
.sensor-value {
  color: var(--paper);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.sensor-value.is-high {
  color: var(--green);
}
.sensor-plot {
  position: relative;
  flex: 1;
  min-height: 110px;
  overflow: hidden;
}
.sensor-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sensor-wave {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.live .sensor-wave {
  animation: wave 6s linear infinite;
}
@keyframes wave {
  to {
    transform: translateX(-400px);
  }
}
.sensor-limit {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  border-top: 1px dashed rgba(244, 243, 243, 0.4);
}
.sensor-limit small {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.66rem;
  color: var(--muted-dark);
}

/* Viz 5: mejoras */
.viz-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.legacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: var(--white);
  box-shadow: 0 20px 44px -26px rgba(28, 28, 28, 0.45);
}
.legacy-bar {
  grid-column: 1 / -1;
  height: 12px;
  background: rgba(28, 28, 28, 0.1);
}
.legacy-block {
  height: 38px;
  background: rgba(28, 28, 28, 0.08);
}
.legacy-slot {
  position: relative;
  height: 38px;
  border: 1px dashed rgba(116, 87, 193, 0.5);
}
.legacy-slot.s3 {
  grid-column: 1 / -1;
}
.legacy-slot em {
  position: absolute;
  inset: -1px;
  display: grid;
  place-items: center;
  background: rgba(16, 232, 122, 0.16);
  border: 1px solid var(--green);
  color: #0a6a3b;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
}
.live .legacy-slot em { animation: u-snap 7s var(--ease) infinite; }
.live .legacy-slot.s2 em { animation-delay: 0.35s; }
.live .legacy-slot.s3 em { animation-delay: 0.7s; }
@keyframes u-snap {
  0%, 12% { opacity: 0; transform: translate(40px, -18px) rotate(6deg); }
  24%, 86% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}

/* ---------- Capacidades ---------- */
.capabilities {
  position: relative;
  padding: 128px 0;
  background: var(--night);
  color: var(--paper);
}
.cap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
}
.cap-aside {
  position: sticky;
  top: calc(var(--header) + 56px);
  align-self: start;
}
.capabilities .kicker {
  color: var(--green);
}
.cap-emblem {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-top: 56px;
}
.cap-iso {
  width: clamp(140px, 16vw, 220px);
  overflow: visible;
}
.cap-iso .iso-a {
  fill: var(--purple);
}
.cap-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted-dark);
  font-variant-numeric: tabular-nums;
}
.cap-count b {
  display: block;
  font-size: clamp(3rem, 2rem + 3vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--paper);
}
.cap {
  padding: 48px 0;
  border-top: 1px solid var(--line-dark);
  transition: opacity 0.5s var(--ease);
}
.cap:last-child {
  border-bottom: 1px solid var(--line-dark);
}
.cap {
  position: relative;
}
.cap::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.6s var(--ease);
}
.motion .cap.is-active::before {
  transform: none;
}
.cap h3 {
  transition: color 0.5s var(--ease);
}
.motion .cap.is-active h3 {
  color: var(--green);
}
.cap-number {
  display: block;
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
}
.cap h3 {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  letter-spacing: -0.04em;
}
.cap p {
  max-width: 32rem;
  margin: 16px 0 24px;
  color: var(--muted-dark);
  font-size: 1.1rem;
}
.cap ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cap li {
  padding: 8px 14px;
  border: 1px solid var(--line-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Proceso ---------- */
.process {
  padding: 128px 0;
}
.process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
}
.process-title .intro-text {
  margin-top: 24px;
}
.steps-wrap {
  position: relative;
}
.steps-track {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23px;
  width: 2px;
  background: var(--line);
}
.steps-track i {
  display: block;
  height: 100%;
  background: var(--purple);
  transform-origin: 50% 0;
}
.motion .steps-track i {
  transform: scaleY(0);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 28px;
  padding: 0 0 56px;
}
.step:last-child {
  padding-bottom: 0;
}
.step-node {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.motion .step-node {
  background: var(--paper);
  color: var(--purple);
  box-shadow: inset 0 0 0 2px var(--line);
}
.motion .step.is-on .step-node {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(116, 87, 193, 0.16);
}
.step h3 {
  padding-top: 10px;
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2.1rem);
  letter-spacing: -0.03em;
}
.step p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  overflow: hidden;
  padding: 128px 0;
  background: var(--purple);
  color: var(--white);
}
.contact-blobs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.contact-blobs i:nth-child(1) {
  width: 520px;
  height: 520px;
  left: -140px;
  top: -200px;
  background: var(--deep);
}
.contact-blobs i:nth-child(2) {
  width: 380px;
  height: 380px;
  right: 8%;
  bottom: -220px;
  background: #b7a4ea;
  opacity: 0.45;
}
.contact-blobs i:nth-child(3) {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -140px;
  background: var(--lilac);
}
.motion .contact-blobs i {
  animation: drift 16s ease-in-out infinite alternate;
}
.motion .contact-blobs i:nth-child(2) { animation-duration: 12s; animation-delay: -4s; }
.motion .contact-blobs i:nth-child(3) { animation-duration: 19s; animation-delay: -8s; }
@keyframes drift {
  to { transform: translate(80px, 60px) scale(1.12); }
}
.contact-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
}
.contact .kicker {
  color: var(--white);
  opacity: 0.8;
}
.contact h2 {
  font-size: clamp(2.4rem, 1.2rem + 3.8vw, 4.6rem);
  letter-spacing: -0.045em;
}
.contact-action {
  padding-left: 40px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}
.contact-action > p:first-child {
  margin-bottom: 26px;
  font-size: 1.15rem;
}
.contact-note {
  margin-top: 10px;
  font-size: 0.82rem;
}
.email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 26px;
}
.email-link {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  font-weight: 600;
}
.copy-email {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.copy-email:hover {
  background: var(--white);
  color: var(--purple);
}
.copy-status {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.86rem;
}

/* ---------- Pie ---------- */
.site-footer {
  background: var(--night);
  color: var(--muted-dark);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 110px;
}
.footer-brand img {
  width: 132px;
  height: auto;
}
.site-footer a:last-child:hover {
  color: var(--paper);
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 22px;
  padding: calc(var(--header) + 40px) 0 80px;
}
.not-found h1 {
  font-size: clamp(2.8rem, 1.5rem + 4vw, 5rem);
}
.not-found p:not(.kicker) {
  color: var(--muted);
  font-size: 1.15rem;
}

/* ---------- Estados iniciales con movimiento ---------- */
.motion [data-reveal] {
  opacity: 0;
}
.motion [data-intro],
.motion [data-split],
.motion .stage .frag,
.motion .stage .core,
.motion .stage .dash,
.motion .underline {
  visibility: hidden;
}
.split-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.split-i {
  display: inline-block;
}

/* ---------- Responsive ---------- */
@media (min-width: 1024px) and (min-height: 680px) {
  .motion .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 56px;
  }
  .motion .scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(244, 243, 243, 0.5);
  }
  .scroll-hint span {
    position: relative;
    width: 18px;
    height: 28px;
    border: 1.5px solid currentColor;
    border-radius: 10px;
  }
  .scroll-hint span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 5px;
    width: 2px;
    height: 6px;
    margin-left: -1px;
    background: var(--green);
    animation: wheel 1.6s var(--ease) infinite;
  }
  @keyframes wheel {
    to { transform: translateY(9px); opacity: 0; }
  }
}
@media (max-width: 1100px) {
  .card-portal {
    grid-column: span 6;
  }
  .card-report {
    grid-column: span 3;
  }
  .card-label {
    grid-column: span 3;
  }
  .card-sensor,
  .card-upgrade {
    grid-column: span 3;
  }
}
@media (max-width: 1023px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero-visual {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    justify-self: center;
  }
  .cap-layout,
  .process-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .cap-aside {
    position: static;
  }
  .cap-emblem {
    margin-top: 36px;
  }
  .cap-iso {
    width: 110px;
  }
  .cap::before {
    display: none;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-action {
    padding-left: 0;
    padding-top: 32px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }
  .section-intro {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .shell {
    width: calc(100% - 36px);
  }
  .main-nav a:not(.header-cta) {
    display: none;
  }
  .brand img {
    width: 132px;
  }
  .hero {
    padding: calc(var(--header) + 40px) 0 56px;
  }
  .hero-lead {
    margin: 24px 0 28px;
  }
  .stage {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .frag,
  .core,
  .dash {
    position: relative;
    inset: auto;
    width: auto;
  }
  .frag-card {
    padding: 10px;
    gap: 8px;
  }
  .frag-icon {
    width: 26px;
    height: 26px;
  }
  .frag-text strong {
    font-size: 0.8rem;
  }
  .frag-text small {
    font-size: 0.7rem;
  }
  .core {
    grid-column: 1 / -1;
    justify-self: center;
    width: 76px;
    margin: 22px 0;
  }
  .dash {
    grid-column: 1 / -1;
    min-height: 330px;
  }
  .dash-body {
    gap: 12px;
    padding: 14px 12px;
  }
  .dash-metrics {
    gap: 6px;
  }
  .dash-metrics i {
    padding: 8px 9px;
  }
  .dash-chart {
    gap: 5px;
    padding: 8px;
    min-height: 100px;
  }
  .dash-alert {
    padding: 9px 10px;
  }
  .stage-steps {
    font-size: 0.78rem;
    gap: 8px;
  }
  .solutions,
  .capabilities,
  .process,
  .contact {
    padding: 88px 0;
  }
  .section-intro {
    margin-bottom: 36px;
  }
  .bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card,
  .card-portal,
  .card-report,
  .card-label,
  .card-sensor,
  .card-upgrade {
    grid-column: auto;
  }
  .card {
    padding: 20px;
    gap: 20px;
  }
  .card-portal {
    flex-direction: column;
  }
  .viz {
    min-height: 170px;
  }
  .marquee-track li {
    padding: 16px 20px;
  }
  .marquee-track li::after {
    margin-left: 20px;
  }
  .cap {
    padding: 36px 0;
  }
  .step {
    gap: 20px;
    padding-bottom: 40px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 32px 0;
  }
}
@media (max-width: 400px) {
  .portal-chip {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =====================================================================
   Brief «Tu caso» — formulario conversacional (brief.js)
   ===================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.brief-only {
  display: none;
}
.has-brief .brief-only {
  display: inline;
}
.has-brief .no-brief {
  display: none;
}
button.button {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button-ink {
  background: var(--ink);
  color: var(--paper);
}
.button-ink::before {
  background: var(--green);
}
.button-ink:hover,
.button-ink:focus-visible {
  color: var(--ink);
}

/* ---------- Puntos de entrada a lo largo de la página ---------- */
.card-cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 4px 0;
  color: var(--purple);
  font-size: 0.92rem;
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.card-report .card-cta,
.card-sensor .card-cta {
  color: var(--green);
}
.card-cta span {
  transition: transform 0.4s var(--ease);
}
.card-cta:hover {
  background-size: 100% 1px;
}
.card-cta:hover span {
  transform: translateX(5px);
}
.inline-cta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: -32px;
}
.inline-cta p {
  max-width: 24rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}
.inline-cta p span {
  display: block;
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 1rem;
  font-weight: 400;
}
.step-start {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: -40px;
  padding: 16px 22px 16px 16px;
  border: 1px solid var(--purple);
  background: var(--white);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.step-start b {
  font-weight: 600;
}
.step-start-node {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  transition: background 0.4s, color 0.4s;
}
.step-start-arrow {
  font-size: 1.3rem;
  transition: transform 0.4s var(--ease);
}
.step-start:hover {
  background: var(--purple);
  color: var(--white);
}
.step-start:hover .step-start-node {
  background: var(--green);
  color: var(--ink);
}
.step-start:hover .step-start-arrow {
  transform: translateX(6px);
}
.brief-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border: 1px solid rgba(244, 243, 243, 0.14);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  transform: translateY(calc(100% + 30px));
  transition: transform 0.6s var(--ease), background 0.3s, color 0.3s;
}
.brief-fab.is-visible {
  transform: none;
}
.brief-fab:hover {
  background: var(--green);
  color: var(--ink);
}
.brief-fab-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 232, 122, 0.6);
}
.motion .brief-fab-dot {
  animation: fab-ping 2.4s var(--ease) infinite;
}
.brief-fab:hover .brief-fab-dot {
  background: var(--ink);
}
@keyframes fab-ping {
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(16, 232, 122, 0);
  }
}

/* ---------- Diálogo ---------- */
html.brief-open {
  overflow: hidden;
}
.brief {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.brief::backdrop {
  background: rgba(22, 21, 23, 0.55);
}
.brief-sprite {
  position: absolute;
  width: 0;
  height: 0;
}
.brief-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}
.brief-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: var(--header);
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.brief-logo {
  width: 132px;
  height: auto;
}
.brief-progress {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brief-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.brief-count small {
  color: var(--muted);
  font-size: 0.8rem;
}
.brief-count-roll {
  position: relative;
  display: inline-block;
  height: 1.3em;
  overflow: hidden;
  line-height: 1.3;
}
.brief-count-roll b {
  display: block;
  font-weight: 700;
}
.brief-bars {
  display: flex;
  gap: 4px;
}
.brief-bars i {
  position: relative;
  width: clamp(16px, 3vw, 34px);
  height: 3px;
  background: var(--line);
  overflow: hidden;
}
.brief-bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease), background 0.3s;
}
.brief-bars i.is-done::after {
  transform: none;
}
.brief-bars i.is-current::after {
  background: var(--green);
  transform: scaleX(0.5);
}
.brief-close {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.brief-close svg {
  width: 36px;
  height: 36px;
  padding: 9px;
  border: 1px solid var(--line);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 0.5s var(--ease), background 0.3s, border-color 0.3s;
}
.brief-close:hover svg {
  background: var(--ink);
  border-color: var(--ink);
  stroke: var(--paper);
  transform: rotate(90deg);
}

.brief-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  min-height: 0;
}
.brief-form {
  position: relative;
  display: grid;
  grid-template: minmax(100%, auto) / minmax(0, 1fr);
  min-height: 0;
  padding: clamp(28px, 5vh, 64px) clamp(24px, 7vw, 112px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brief-step {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: auto 0;
  padding: 0;
  border: 0;
}
.brief-step[hidden] {
  display: none;
}
.brief-kicker {
  margin-bottom: 18px;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brief-q {
  display: block;
  float: left;
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  font-size: clamp(1.85rem, 1.15rem + 2.3vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.brief-step > :not(.brief-q) {
  clear: both;
}
.brief-q:focus {
  outline: none;
}
[data-echo] {
  color: var(--purple);
}
.brief-lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.15rem;
}
.brief-hint,
.brief-sub {
  margin: -12px 0 22px;
  color: var(--muted);
}
.brief-sub {
  color: var(--ink);
  font-weight: 600;
}
.brief-sub-2 {
  margin: 34px 0 14px;
}
.brief-sub small,
.field-label small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}
.brief-sub-2 + .brief-hint {
  margin: -8px 0 14px;
  font-size: 0.92rem;
}
.pick-count {
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(116, 87, 193, 0.12);
  color: var(--purple);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.brief-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.brief-promises li {
  display: grid;
  gap: 6px;
  padding: 18px 18px 0 0;
  font-weight: 600;
}
.brief-promises b {
  color: var(--purple);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
.brief-resume {
  margin-top: 30px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  background: var(--white);
}
.text-button {
  padding: 0;
  border: 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  color: var(--purple);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Campos de texto */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}
.field {
  position: relative;
  display: grid;
  gap: 4px;
}
.field-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(28, 28, 28, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 600 clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem) / 1.3 Urbanist, Arial, sans-serif;
  letter-spacing: -0.02em;
  outline: none;
}
.field textarea {
  min-height: 9.5em;
  padding: 16px 18px;
  border: 1px solid rgba(28, 28, 28, 0.2);
  background: var(--white);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  resize: vertical;
}
.field ::placeholder {
  color: rgba(28, 28, 28, 0.38);
}
.field-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.55s var(--ease), background 0.3s;
}
.field input:focus ~ .field-line,
.field textarea:focus ~ .field-line {
  transform: none;
}
.field.is-invalid .field-line {
  background: var(--wine);
  transform: none;
}
.meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}
.meter-bars {
  display: flex;
  gap: 4px;
}
.meter-bars i {
  width: 26px;
  height: 4px;
  background: var(--line);
  transition: background 0.4s;
}
.meter[data-level="1"] i:nth-child(-n + 1) {
  background: var(--lilac);
}
.meter[data-level="2"] i:nth-child(-n + 2) {
  background: var(--purple);
}
.meter[data-level="3"] i {
  background: var(--green);
}
.meter[data-level="3"] .meter-text {
  color: var(--ink);
  font-weight: 600;
}
.brief-error {
  min-height: 1.5em;
  margin-top: 18px;
  color: var(--wine);
  font-weight: 600;
}
.brief-privacy {
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.86rem;
}
.is-shake {
  animation: shake 0.42s var(--ease);
}
@keyframes shake {
  20% { transform: translateX(-8px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-3px); }
}

/* Opciones: tarjetas */
.opt input,
.chip input,
.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.opts-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.opt {
  position: relative;
  display: block;
  cursor: pointer;
}
.opt-box {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 600;
  line-height: 1.3;
  transition: border-color 0.3s, transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.opts-cards-sm .opt-box {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 58px;
}
.opt-box::before {
  content: "";
  position: absolute;
  inset: -9px;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--purple), var(--purple)) 0 0 / 14px 2px,
    linear-gradient(var(--purple), var(--purple)) 0 0 / 2px 14px,
    linear-gradient(var(--purple), var(--purple)) 100% 0 / 14px 2px,
    linear-gradient(var(--purple), var(--purple)) 100% 0 / 2px 14px,
    linear-gradient(var(--purple), var(--purple)) 0 100% / 14px 2px,
    linear-gradient(var(--purple), var(--purple)) 0 100% / 2px 14px,
    linear-gradient(var(--purple), var(--purple)) 100% 100% / 14px 2px,
    linear-gradient(var(--purple), var(--purple)) 100% 100% / 2px 14px;
  background-repeat: no-repeat;
  transition: inset 0.45s var(--ease), opacity 0.25s;
}
.opt:hover .opt-box {
  border-color: rgba(28, 28, 28, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -22px rgba(28, 28, 28, 0.6);
}
.opt input:checked + .opt-box {
  border-color: var(--purple);
  transform: none;
  box-shadow: none;
}
.opt input:checked + .opt-box::before {
  inset: -5px;
  opacity: 1;
}
.opt input:focus-visible + .opt-box,
.chip input:focus-visible + span,
.seg input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 600 0.72rem/1 Urbanist, Arial, sans-serif;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.opt input:checked + .opt-box kbd {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.opt-ico {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--purple);
  stroke-width: 1.6;
  stroke-linecap: square;
}
.opt-check {
  width: 24px;
  height: 24px;
  padding: 4px;
  background: var(--ink);
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.45s var(--ease);
}
.opt-check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.45s var(--ease) 0.12s;
}
input:checked + * .opt-check {
  opacity: 1;
  transform: none;
}
input:checked + * .opt-check path {
  stroke-dashoffset: 0;
}

/* Opciones: chips */
.opts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  cursor: pointer;
}
.chip > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 600;
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s, opacity 0.3s;
}
.chip:hover > span {
  border-color: rgba(28, 28, 28, 0.42);
}
.chip .opt-check {
  width: 0;
  padding: 4px 0;
  margin-left: -10px;
  background: transparent;
  transition: width 0.4s var(--ease), margin 0.4s var(--ease), opacity 0.25s;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip input:checked + span kbd {
  border-color: rgba(244, 243, 243, 0.3);
  color: var(--paper);
}
.chip input:checked + span .opt-check {
  width: 18px;
  margin-left: 0;
  padding: 0;
}
.opts.is-capped .chip input:not(:checked) + span {
  opacity: 0.42;
}

/* Opciones: segmento con indicador deslizante */
.opts-segment {
  position: relative;
  display: flex;
  border: 1px solid var(--line);
  background: var(--white);
}
.opts-segment::before {
  content: "";
  position: absolute;
  left: var(--sx, 0);
  top: var(--sy, 0);
  width: var(--sw, 0);
  height: var(--sh, 0);
  background: var(--purple);
  opacity: 0;
  transition: left 0.5s var(--ease), top 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease), opacity 0.3s;
}
.opts-segment.has-pick::before {
  opacity: 1;
}
.seg {
  position: relative;
  flex: 1 1 0;
  cursor: pointer;
}
.seg + .seg {
  border-left: 1px solid var(--line);
}
.seg > span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 6px 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  transition: color 0.35s;
}
.seg:hover > span {
  background: rgba(116, 87, 193, 0.06);
}
.seg input:checked + span {
  color: var(--white);
  background: transparent;
}
.opts-segment:not(.has-pick) .seg input:checked + span {
  background: var(--purple);
}
.opts-segment-wrap {
  flex-wrap: wrap;
}
.opts-segment-wrap .seg {
  flex: 1 1 auto;
}

/* Revisión */
.brief-story {
  max-width: 44rem;
  font-size: clamp(1.15rem, 0.95rem + 0.7vw, 1.5rem);
  line-height: 1.6;
  letter-spacing: -0.015em;
}
.story-bit {
  padding: 0 1px;
  background: linear-gradient(var(--green), var(--green)) 0 100% / 0 3px no-repeat;
  color: var(--purple);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.7s var(--ease), color 0.3s;
}
.story-bit.is-drawn {
  background-size: 100% 3px;
}
.story-bit:hover {
  color: var(--ink);
  background-size: 100% 100%;
}
.brief-story + .brief-hint {
  margin-top: 24px;
}

/* Listo */
.done-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 30px;
  background: var(--ink);
  fill: none;
  stroke: var(--green);
}
.done-box {
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.done-tick {
  stroke-width: 5;
  stroke-linecap: square;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.brief-done.is-in .done-box {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s var(--ease);
}
.brief-done.is-in .done-tick {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s var(--ease) 0.45s;
}
.brief-done .brief-lead {
  margin-bottom: 26px;
}
.done-fallback {
  margin-bottom: 30px;
  padding: 16px 18px;
  border-left: 3px solid var(--purple);
  background: var(--white);
}
.done-fallback p {
  margin-bottom: 8px;
}
.done-fallback a {
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.copy-feedback {
  margin-left: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.brief-burst {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Navegación inferior */
.brief-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.brief-back {
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s;
}
.brief-back:hover {
  color: var(--ink);
}
.brief-back[hidden],
.brief-nav[hidden] {
  display: none;
}
.brief-keys {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.86rem;
}
.brief-keys kbd {
  margin: 0 4px;
}
.brief-next {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.brief-next.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

/* Panel «Tu caso» */
.brief-case {
  --p: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 30px 30px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(116, 87, 193, 0.35), transparent 55%),
    radial-gradient(rgba(244, 243, 243, 0.1) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--night);
  color: var(--paper);
}
.case-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted-dark);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.case-head b {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.case-iso {
  flex: none;
  width: 108px;
  margin: 4px auto 6px;
  overflow: visible;
}
.case-iso path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.9s var(--ease), fill 0.6s, opacity 0.6s;
}
.case-iso .iso-a {
  fill: var(--purple);
  transform: translate(calc((1 - var(--p)) * 46px), calc((1 - var(--p)) * -38px)) rotate(calc((1 - var(--p)) * 48deg));
}
.case-iso .iso-b {
  fill: var(--green);
  opacity: calc(0.35 + var(--p) * 0.65);
  transform: translate(calc((1 - var(--p)) * -46px), calc((1 - var(--p)) * 38px)) rotate(calc((1 - var(--p)) * -48deg));
}
.brief-case.is-complete .case-iso {
  filter: drop-shadow(0 0 22px rgba(16, 232, 122, 0.45));
}
.case-list {
  display: grid;
  gap: 7px;
  min-height: 0;
}
.case-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 12px;
  border: 1px dashed rgba(244, 243, 243, 0.2);
  color: var(--muted-dark);
  font-size: 0.86rem;
  transform: translate(var(--cx, 0), 0) rotate(var(--cr, 0deg));
  transition: transform 0.8s var(--ease), background 0.5s, color 0.5s, border-color 0.5s;
}
.case-list li:nth-child(1) { --cx: 10px; --cr: -1.6deg; }
.case-list li:nth-child(2) { --cx: -8px; --cr: 1.2deg; }
.case-list li:nth-child(3) { --cx: 14px; --cr: 1.8deg; }
.case-list li:nth-child(4) { --cx: -12px; --cr: -1.2deg; }
.case-list li:nth-child(5) { --cx: 6px; --cr: 2deg; }
.case-list li:nth-child(6) { --cx: -10px; --cr: -1.8deg; }
.case-list li:nth-child(7) { --cx: 12px; --cr: 1deg; }
.case-list small {
  color: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.case-list span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.case-list li.is-current {
  border-color: var(--green);
  border-style: solid;
  color: var(--paper);
}
.case-list li.is-filled {
  --cx: 0;
  --cr: 0deg;
  background: var(--white);
  border-color: var(--white);
  border-style: solid;
  color: var(--ink);
  font-weight: 600;
}
.case-list li.is-filled small {
  color: var(--purple);
  opacity: 1;
}
.case-foot {
  margin-top: auto;
  color: var(--muted-dark);
  font-size: 0.82rem;
}

/* Responsive del brief */
@media (max-width: 1023px) {
  .brief-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .brief-case {
    display: none;
  }
  .inline-cta,
  .step-start {
    grid-column: auto;
    margin-top: 0;
  }
}
@media (max-width: 760px) {
  .brief-top {
    grid-template-columns: auto 1fr auto;
    padding: 0 14px 0 18px;
    gap: 12px;
  }
  .brief-logo {
    width: 104px;
  }
  .brief-progress {
    justify-self: center;
    flex-direction: column;
    gap: 6px;
  }
  .brief-bars i {
    width: 12px;
  }
  .brief-close span {
    display: none;
  }
  .brief-form {
    padding: 28px 18px 32px;
  }
  .brief-q {
    margin-bottom: 22px;
  }
  .brief-promises {
    grid-template-columns: 1fr;
  }
  .brief-promises li {
    grid-template-columns: 32px 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .field-grid,
  .opts-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .opt-box {
    min-height: 56px;
    gap: 12px;
  }
  .opts-segment:not(.opts-segment-wrap) .seg > span {
    padding: 6px 4px;
    font-size: 0.9rem;
  }
  .opts-segment-wrap .seg {
    flex: 1 1 40%;
  }
  .opts-segment-wrap .seg + .seg {
    border-left: 0;
  }
  .opts-segment-wrap .seg {
    outline: 1px solid var(--line);
  }
  .brief-nav {
    min-height: 72px;
    padding: 0 18px;
  }
  .brief-keys {
    display: none;
  }
  .brief-fab {
    right: 12px;
    bottom: 12px;
    left: auto;
  }
}
@media (pointer: coarse) {
  .opt kbd,
  .chip kbd,
  .brief-keys {
    display: none;
  }
  .opt-box {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .opts-cards-sm .opt-box {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .chip > span {
    padding-left: 14px;
  }
}
@media (hover: none) {
  .brief-next:hover::before {
    transform: translateY(101%);
  }
}

/* ---------- Brief: aviso simplificado, agenda y extras ---------- */
.brief-privacy {
  max-width: 46rem;
  line-height: 1.55;
}
.brief-privacy b {
  color: var(--ink);
  font-weight: 600;
}
.brief-privacy a {
  color: var(--purple);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.brief-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.brief-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.opts-segment-6 .seg {
  flex: 1 1 0;
}
.agenda-days {
  display: flex;
  gap: 8px;
  padding: 4px 2px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.day,
.slot {
  position: relative;
  flex: none;
  cursor: pointer;
}
.day input,
.slot input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.day span {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 64px;
  padding: 10px 0 9px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s, transform 0.45s var(--ease);
}
.day small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.35s;
}
.day b {
  font-size: 1.45rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.day:hover span {
  border-color: rgba(28, 28, 28, 0.42);
  transform: translateY(-2px);
}
.day input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: none;
}
.day input:checked + span small {
  color: var(--green);
}
.agenda-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 6px;
  max-width: 760px;
}
.slot span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.slot:hover span {
  border-color: var(--purple);
}
.slot input:checked + span {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.day input:focus-visible + span,
.slot input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
.agenda-status {
  min-height: 1.4em;
  margin-top: 14px;
  color: var(--muted);
}
.agenda-skip {
  margin-top: 6px;
}
.footer-legal {
  margin-left: 10px;
  padding-bottom: 1px;
  border-bottom: 1px solid currentColor;
}
.footer-legal:hover {
  color: var(--paper);
}
@media (max-width: 760px) {
  .opts-segment-6 .seg {
    flex: 1 1 30%;
  }
  .agenda-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Aviso de privacidad ---------- */
.legal {
  padding: calc(var(--header) + 72px) 0 110px;
}
.legal-inner {
  max-width: 820px;
}
.legal h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 1.4rem + 3vw, 3.8rem);
  letter-spacing: -0.045em;
}
.legal-meta {
  margin-bottom: 44px;
  color: var(--muted);
}
.legal h2 {
  margin: 48px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  letter-spacing: -0.03em;
}
.legal p,
.legal li {
  color: rgba(28, 28, 28, 0.82);
  font-size: 1.05rem;
  line-height: 1.7;
}
.legal p + p,
.legal p + ul,
.legal ul + p,
.legal ol + p {
  margin-top: 14px;
}
.legal ul,
.legal ol {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 0;
}
.legal li {
  position: relative;
  padding-left: 22px;
}
.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--purple);
}
.legal a {
  color: var(--purple);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}
.legal strong {
  color: var(--ink);
  font-weight: 600;
}
.legal-card {
  margin-top: 16px;
  padding: 18px 20px;
  border-left: 3px solid var(--green);
  background: var(--white);
}
.legal-header {
  background: var(--night);
}
