/* Vista previa de los módulos */
.hero-product {
  border: 1px solid #514159;
  border-radius: 23px;
  overflow: hidden;
  background: #292230;
  box-shadow: 0 20px 55px #100b1566;
}
.hero-product figure { margin: 0; padding: clamp(12px, 1.5vw, 18px); }
.hero-product figcaption { color: #e0d5e4; font-size: 13px; margin-bottom: 10px; }
.hero-product .shot-hero, .demo-caja {
  --frame: 1020 / 535; --zoom: 129.41%; --x: -26.76%; --y: -38.88%;
}
.hero-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #514159; }
.hero-modules a { padding: 13px 5px; color: #f6edf9; font-size: clamp(11px, 1.18vw, 14px); font-weight: 700; text-align: center; }
.hero-modules a + a { border-left: 1px solid #514159; }
.hero-modules a:hover, .hero-modules a:focus-visible { background: #3a2b43; color: #fff; }
.hero-modules a:focus-visible { outline-offset: -3px; }
.hero-modules span { color: #d9b2ea; margin-left: 3px; }

/* Contenido de cada módulo y controles del recorrido */
.demo-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin-bottom: 12px;
  background: #eee9f0;
  border: 1px solid #e5dce9;
  border-radius: 14px;
}
.demo-tabs[hidden], .demo-panel[hidden], .demo-controls[hidden] { display: none; }
.demo-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #4d4155;
  font: 700 clamp(12px, 1.22vw, 15px) var(--font);
  cursor: pointer;
}
.demo-tabs button:hover { background: #e6dceb; }
.demo-tabs button[aria-selected="true"] { background: #442753; color: #fff; }
.demo-panel {
  display: grid;
  grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr);
  min-height: 355px;
  scroll-margin-top: 70px;
  background: #fff;
  border: 1px solid var(--line-c);
  border-radius: 20px;
  overflow: hidden;
}
.demo-panel + .demo-panel { margin-top: 12px; }
.demo-tabs:not([hidden]) ~ .demo-panel { margin-top: 0; }
.demo-copy { padding: clamp(22px, 3.2vw, 40px); align-self: center; }
.demo-copy h3 { font-size: clamp(22px, 2.7vw, 32px); margin-bottom: 13px; }
.demo-copy > p + p { margin-top: 10px; }
.demo-copy > p, .demo-steps { font-size: 15px; color: var(--ink-c2); line-height: 1.55; }
.demo-steps { display: grid; gap: 7px; margin: 15px 0 0; padding-left: 20px; }
.demo-steps li[aria-current="step"] { color: #592769; font-weight: 800; }
.demo-stage {
  margin: 0;
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: clamp(17px, 2.4vw, 27px);
  background: #eae1ef;
}
.demo-stage figcaption { color: #514158; font-size: 12px; }
.demo-stage .shot-window { border: 1px solid #d7c9e0; box-shadow: 0 12px 28px #39244422; isolation: isolate; }
.demo-agenda { --frame: 780 / 510; --zoom: 100%; --x: 0%; --y: -86%; }
.demo-nomina { --frame: 1020 / 390; --zoom: 129.41%; --x: -26.96%; --y: -70.51%; }
.demo-image { position: absolute; inset: 0; transition: transform 780ms var(--ease); }
.demo-stage[data-preview="0"] .demo-image { transform-origin: var(--ax) var(--ay); transform: scale(1.045); }
.demo-stage[data-preview="1"] .demo-image { transform-origin: var(--bx) var(--by); transform: scale(1.045); }
.demo-caja { --ax: 72%; --ay: 18%; --bx: 90%; --by: 73%; }
.demo-agenda { --ax: 62%; --ay: 60%; --bx: 55%; --by: 83%; }
.demo-nomina { --ax: 24%; --ay: 8%; --bx: 91%; --by: 79%; }
.demo-pointer {
  position: absolute;
  top: 83%;
  left: 11%;
  pointer-events: none;
  opacity: 0;
  transition: top 720ms var(--ease), left 720ms var(--ease), opacity 200ms ease;
}
.demo-pointer::before, .demo-pointer::after { content: ''; position: absolute; display: block; }
.demo-pointer::before {
  inset: -11px auto auto -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #7d2a9f;
  background: #c17ee638;
  box-shadow: 0 0 0 3px #f5dcffc9;
}
.demo-pointer::after {
  width: 18px;
  height: 23px;
  background: #472457;
  clip-path: polygon(0 0, 100% 60%, 57% 66%, 76% 93%, 57% 100%, 32% 70%, 9% 100%);
}
.demo-stage[data-preview="0"] .demo-pointer { opacity: 1; left: var(--ax); top: var(--ay); }
.demo-stage[data-preview="1"] .demo-pointer { opacity: 1; left: var(--bx); top: var(--by); }
.demo-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.demo-controls button {
  border-radius: 100px;
  padding: 8px 14px;
  min-height: 44px;
  background: #fff;
  border: 1px solid #c8b4d2;
  color: #442753;
  font: 700 13px var(--font);
  cursor: pointer;
}
.demo-controls button:hover { background: #f8f2fc; }
.demo-controls output { font-size: 13px; color: #442753; font-weight: 700; }
.client-preview { padding: clamp(16px, 3vw, 27px); background: #fff; border: 1px solid #d8cadf; border-radius: 14px; box-shadow: 0 10px 24px #3924441a; }
.client-preview-label { color: #5b3468; font-size: 13px; font-weight: 700; }
.client-preview-name { display: block; margin-top: 3px; font-size: clamp(20px, 2.7vw, 29px); }
.client-preview-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.client-preview-summary div { background: #f6f1f7; padding: 9px 11px; border-radius: 9px; }
.client-preview-summary dt, .client-preview-visit p { font-size: 12px; color: var(--ink-c2); }
.client-preview-summary dd { margin: 2px 0 0; font-weight: 800; }
.client-preview-visit { padding-top: 12px; border-top: 1px solid #e2d7e8; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.role-overview { display: grid; gap: 9px; margin: 0; }
.role-overview div { padding: 13px 18px; background: #f9f6fa; border: 1px solid #d8cadf; border-radius: 12px; }
.role-overview dt { color: #462354; font-weight: 800; }
.role-overview dd { margin: 3px 0 0; font-size: 14px; color: var(--ink-c2); }

/* Operación del salón */
.workflow {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 52px);
}
.workflow-photo { margin: 0; min-height: 310px; overflow: hidden; border-radius: 20px; background: #ede6dc; }
.workflow-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.workflow-copy { align-self: center; }
.workflow-list { margin: 18px 0 0; }
.workflow-list div { padding: 12px 0; border-top: 1px solid var(--line-c); }
.workflow-list dt { font-weight: 800; color: #462354; }
.workflow-list dd { margin: 3px 0 0; color: var(--ink-c2); font-size: 15px; }

/* Computadora, tablet y teléfono */
.device-section { background: #f0eaf3; }
.device-section .sec-center { margin-bottom: clamp(30px, 5vw, 54px); }
.device-lineup {
  display: grid;
  grid-template-columns: minmax(0, 1.44fr) minmax(0, .95fr) minmax(0, .54fr);
  align-items: end;
  gap: clamp(8px, 2.2vw, 28px);
}
.device { min-width: 0; margin: 0; }
.device figcaption { margin-top: 16px; text-align: center; font-weight: 800; color: #442753; font-size: clamp(10px, 1.3vw, 15px); }
.device-frame {
  position: relative;
  overflow: hidden;
  background: #211827;
  border: clamp(3px, .62vw, 8px) solid #211827;
  border-radius: 9px;
  box-shadow: 0 16px 27px #4a305333;
}
.device-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.device-computer .device-frame { border-radius: 11px 11px 4px 4px; aspect-ratio: 1.68; }
.device-computer .device-frame img { width: 123%; max-width: none; margin-left: -23%; }
.device-base { height: clamp(4px, .75vw, 9px); border-radius: 2px 2px 10px 10px; background: #524459; margin: 0 -4%; }
.device-tablet .device-frame { aspect-ratio: 1.48; border-radius: 12px; }
.device-tablet .device-frame img { width: 123%; max-width: none; height: auto; margin: -16% 0 0 -23%; }
.device-phone .device-frame { aspect-ratio: .59; border-radius: clamp(8px, 2vw, 22px); }
.device-phone .device-frame img { object-position: center; }

/* Preguntas antes de activar */
.faq-layout { display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); gap: clamp(22px, 6vw, 64px); }
.faq-list { border-top: 1px solid var(--line-c); }
.faq-list details { border-bottom: 1px solid var(--line-c); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 16px 5px;
  list-style: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: #5f2670; flex: none; font-size: 25px; line-height: 1; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { color: var(--ink-c2); padding: 0 28px 17px 5px; font-size: 15px; }
.faq-list a { color: #5f2670; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .demo-pointer, .demo-image { transition: none; }
  .demo-stage .shot-window .demo-image { transform: none; }
}
@media (max-width: 760px) {
  .demo-panel, .workflow, .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .demo-panel { min-height: 0; }
  .demo-caja { --frame: 450 / 535; --zoom: 293.33%; --x: -189.55%; --ax: 37%; --bx: 72%; }
  .workflow-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .device figcaption { margin-top: 8px; }
}
@media (max-width: 480px) {
  .hero-modules a { padding-inline: 3px; }
  .demo-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .demo-tabs button { grid-column: span 2; }
  .demo-tabs button:nth-child(n + 4) { grid-column: span 3; }
}
