/* Demostración de los dos sistemas · adaptación de la referencia funcional al estilo del sitio */
.sw-hero { padding-top: 64px; padding-bottom: var(--section-y); }
.sw-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.sw-hero h1 { font-size: clamp(56px, 5.2vw, 76px); letter-spacing: -.03em; line-height: 1; }
.sw-hero h1 b { display: block; }
.sw-hero .lead { margin: 24px 0 36px; }
.sw-art { position: relative; min-height: 460px; }
.sw-art__desktop { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; width: 88%; }
.sw-art__desktop img { width: 100%; }
.sw-art__phone { position: absolute; right: 0; bottom: -24px; width: 34%; max-width: 190px; border: 5px solid var(--ink); border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow-float); }
.sw-art__phone img { width: 100%; }
.sw-art .demo-tag { position: absolute; left: 0; bottom: -40px; }
@media (max-width: 1023px) {
  .sw-hero { padding-top: 40px; }
  .sw-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .sw-art { min-height: 0; padding-bottom: 56px; }
  .sw-art__phone { bottom: 8px; }
  .sw-art .demo-tag { bottom: 0; }
}

.product { scroll-margin-top: 120px; }
.product-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin-bottom: 56px; }
.product-heading h2 b { display: block; }
.product-heading > p { font-size: 22px; line-height: 1.5; color: var(--ink-2); max-width: 56ch; margin: 0; }
@media (max-width: 1023px) { .product-heading { grid-template-columns: 1fr; margin-bottom: 36px; } }

/* Lista de funciones (reutiliza .fn del sitio) */
.function-list { min-width: 0; }
.list-foot { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin: 24px 0 0; }

/* ---- Sistema de Información: espacio de trabajo ---- */
.info-panel { min-width: 0; }
.workspace { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-height: 560px; }
.workspace-top { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.workspace-top > div { display: flex; align-items: center; gap: 10px; }
.workspace-top > span { margin-left: auto; color: var(--ink-2); }
.app-monogram { height: 28px; width: 28px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; border-radius: 8px; }
.expand { font-size: 15px; font-weight: 600; color: var(--ink); padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.expand:hover { background: var(--bg-soft); }
.workspace-nav { height: 48px; display: flex; align-items: center; padding: 0 20px; gap: 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.workspace-nav #workspace-mode { font-weight: 600; }
.demo-dot { font-size: 14px; color: var(--ink-2); margin-left: auto; }
.workspace-body { min-height: 450px; position: relative; }
.workspace-body.changed, .phone-body.changed { animation: swEnter 300ms var(--ease) both; }
@keyframes swEnter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.interaction-hint { font-size: 16px; color: var(--ink-2); margin: 16px 0 0; min-height: 1.5em; }

.map-controls { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 15px; background: var(--bg-soft); flex-wrap: wrap; }
.map-controls label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.map-controls input { width: 90px; padding: 9px 12px; border: 1px solid var(--line); font-size: 15px; border-radius: var(--r-sm); background: #fff; }
.map-controls select { font-size: 15px; border: 1px solid var(--line); background: #fff; padding: 9px 10px; border-radius: var(--r-sm); max-width: 170px; }
.map-controls button { font-size: 15px; font-weight: 600; background: var(--ink); color: #fff; padding: 9px 18px; border-radius: var(--r-pill); }
.map-controls button:hover { background: #2A2A45; }
.map-scene { position: relative; height: 386px; background: #F8FAF9; overflow: hidden; }
.interactive-map { display: block; height: 100%; width: 100%; padding-right: 200px; }
.section-shape { stroke: #fff; stroke-width: 1.3; cursor: pointer; transition: fill 180ms, opacity 180ms; }
.section-shape:hover, .section-shape.selected { fill: var(--accent) !important; stroke: var(--ink); stroke-width: 1.5; }
.section-shape:focus { outline: none; fill: var(--accent) !important; stroke: var(--ink); stroke-width: 3; }
.map-road { stroke: #E6E9E8; stroke-width: 1.5; fill: none; }
.map-detail { position: absolute; top: 20px; right: 20px; width: 200px; padding: 18px 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float); }
.micro { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); }
.map-detail h3 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 700; }
.map-detail dl { margin: 0; }
.map-detail dt { font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.map-detail dd { font-size: 18px; margin: 2px 0 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.map-legend { position: absolute; bottom: 16px; left: 20px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); background: rgba(255,255,255,.9); padding: 8px 12px; border-radius: var(--r-pill); }
.legend-colors { display: flex; gap: 2px; }
.legend-colors i { width: 12px; height: 10px; border-radius: 2px; }

.data-view { padding: 28px 24px; min-height: 450px; }
.data-view h3 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.data-sub { font-size: 15px; color: var(--ink-2); margin: 0 0 24px; }
.bars { display: grid; gap: 16px; margin: 12px 0 28px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 56px; gap: 14px; align-items: center; font-size: 15px; }
.bar-track { height: 22px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; transform-origin: left; animation: swGrow 350ms var(--ease) both; border-radius: 6px; }
@keyframes swGrow { from { transform: scaleX(.6); } to { transform: scaleX(1); } }
.bar-row > b { font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; white-space: nowrap; }
.mini-table th { font-weight: 700; padding: 12px 10px; background: var(--bg-soft); position: sticky; top: 0; }
.mini-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mini-table tr.highlight td { background: var(--accent-tint); }
.mini-table button { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.sw-table-wrap { overflow: auto; max-height: 300px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.metric-row { display: flex; gap: 28px; margin: 20px 0 24px; flex-wrap: wrap; }
.metric-row > div { border-left: 1px solid var(--line); padding-left: 18px; }
.metric-row > div:first-child { border-left: 0; padding-left: 0; }
.metric-row span { font-size: 14px; color: var(--ink-2); display: block; margin-bottom: 4px; }
.metric-row b { font-size: 30px; letter-spacing: -.03em; font-weight: 600; font-variant-numeric: tabular-nums; }
.table-search { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.table-search input { width: 180px; border: 1px solid var(--line); padding: 10px 14px; font-size: 15px; border-radius: var(--r-sm); }
.product-caption { display: flex; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; align-items: center; flex-wrap: wrap; }
.product-caption p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; margin: 0; }

/* ---- App de Captura ---- */
.capture-explorer { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }
.capture-explanation { margin-top: 24px; }
.capture-explanation p { font-size: 17px; line-height: 1.6; color: var(--ink-2); min-height: 4.8em; margin: 0 0 20px; }
.sequence { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); margin-bottom: 20px; }
.sequence i { height: 1px; width: 24px; background: var(--line); }
.sequence .on { color: var(--ink); font-weight: 700; }
.capture-stage { position: relative; min-height: 680px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; gap: 32px; padding: 56px 32px 40px; overflow: hidden; }
.stage-caption { position: absolute; top: 20px; left: 24px; right: 24px; display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.phone { width: 300px; flex-shrink: 0; background: #fff; border: 6px solid var(--ink); border-radius: 36px; overflow: hidden; position: relative; height: 620px; }
.phone-camera { position: absolute; top: 10px; left: calc(50% - 34px); width: 68px; height: 8px; border-radius: 6px; background: var(--ink); z-index: 2; }
.phone-status { height: 34px; display: flex; justify-content: space-between; align-items: end; font-size: 12px; padding: 0 18px 6px; font-weight: 600; }
.phone-signal { letter-spacing: 1px; font-size: 10px; }
.phone-app-bar { height: 46px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); font-size: 14px; padding: 0 14px; }
.mini-brand { height: 22px; width: 22px; background: var(--ink); color: #fff; display: grid; place-items: center; border-radius: 6px; font-size: 10px; font-weight: 700; }
.phone-app-bar > span:last-child { font-size: 12px; margin-left: auto; color: var(--ink-2); }
.phone-body { height: 510px; background: var(--bg-soft); overflow-y: auto; padding: 16px 14px 28px; scrollbar-width: thin; }
.phone-home { position: absolute; bottom: 6px; height: 4px; width: 70px; background: var(--ink); border-radius: 5px; left: calc(50% - 35px); }
.phone-title { font-size: 20px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 700; }
.phone-note { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 0 0 12px; }
.phone-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.phone-card h4 { font-size: 14px; margin: 0 0 10px; font-weight: 700; }
.document { height: 100px; background: var(--bg-soft); display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.document-mark { width: 48px; height: 64px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border-radius: 6px; }
.document-head { width: 13px; height: 13px; border-radius: 50%; background: #CBD0CE; }
.document-shoulders { width: 24px; height: 13px; border-radius: 8px 8px 0 0; background: #CBD0CE; }
.document-lines { flex: 1; display: grid; gap: 8px; }
.document-lines i { height: 4px; background: #CBD0CE; display: block; border-radius: 2px; }
.document-lines i:nth-child(2) { width: 65%; }
.document-lines span { font-size: 11px; color: var(--ink-2); }
.phone-button { width: 100%; padding: 12px 10px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: var(--r-pill); font-size: 14px; font-weight: 600; min-height: 42px; }
.phone-button:hover { background: #2A2A45; }
.phone-button.secondary { background: #fff; color: var(--ink); margin-top: 8px; }
.phone-button.secondary:hover { background: var(--bg-soft); }
.phone-button:disabled { opacity: .6; cursor: wait; }
.phone-field { display: block; font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-bottom: 10px; }
.phone-field input { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 9px 10px; font-size: 14px; min-width: 0; }
.scan-progress { width: 100%; height: 4px; background: var(--line); margin: 12px 0; overflow: hidden; border-radius: 2px; }
.scan-progress::after { content: ""; display: block; height: 100%; background: var(--accent); width: 45%; animation: swScan 600ms var(--ease) 1; }
@keyframes swScan { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
.receipt { width: 240px; background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: var(--r-md); box-shadow: var(--shadow-float); }
.receipt-label { font-size: 13px; color: var(--ink-2); }
.receipt-state { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: -.02em; margin: 12px 0 8px; font-weight: 700; }
.receipt-indicator { height: 10px; width: 10px; border-radius: 50%; background: #CBD0CE; flex: 0 0 auto; }
.receipt.pending .receipt-indicator { background: var(--ink-2); }
.receipt.done .receipt-indicator { background: var(--accent); outline: 1px solid var(--ink); }
.receipt > p { font-size: 14px; color: var(--ink-2); line-height: 1.6; min-height: 4.8em; margin: 0 0 12px; }
.receipt-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.receipt-line > span { color: var(--ink-2); }
.receipt button { margin-top: 12px; width: 100%; padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 14px; font-weight: 600; background: #fff; }
.receipt button:hover { background: var(--bg-soft); }
.receipt button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-dark); }
.phone-success { text-align: center; padding: 28px 6px; }
.success-mark { height: 48px; width: 48px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--ink); }
.success-mark svg { width: 48px; height: 48px; }
.phone-success h4 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.15; font-weight: 700; }
.phone-success p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0 0 20px; }
.occupancy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.occupancy > div { padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.occupancy b { font-size: 24px; font-weight: 600; display: block; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.occupancy span { font-size: 12px; color: var(--ink-2); line-height: 1.4; display: block; margin-top: 4px; }
.position { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.position:last-child { border-bottom: 0; }
.position b { font-weight: 600; font-variant-numeric: tabular-nums; }
.casilla { border: 1px solid var(--line); padding: 12px; border-radius: 10px; margin-bottom: 10px; }
.casilla > div { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; }
.casilla > button { font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: var(--r-pill); margin-right: 6px; }
.casilla > button.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.phone-status-row { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.phone-status-row i { width: 8px; height: 8px; background: var(--ink-2); border-radius: 50%; }
.phone-status-row.received i { background: var(--accent); outline: 1px solid var(--ink); }
.capture-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 64px; }
.capture-details article { padding-top: 24px; border-top: 1px solid var(--line); }
.capture-details h3 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 12px; }
.capture-details p { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin: 0; }

/* ---- Galería ---- */
.gallery { width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: 16px auto; padding: 24px; border-radius: var(--r-lg); background: #fff; overflow: auto; }
.gallery-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.gallery-top h2 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.gallery-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.gallery-nav button { font-size: 15px; font-weight: 500; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; }
.gallery-nav button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.gallery-image { min-height: 200px; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); border-radius: var(--r-md); padding: 16px; }
.gallery-image img { max-width: 100%; max-height: 66vh; width: auto; object-fit: contain; border-radius: 12px; }
.gallery > p { font-size: 15px; color: var(--ink-2); margin: 14px 0 0; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .capture-explorer { grid-template-columns: 1fr; gap: 28px; }
  .capture-stage { padding: 56px 20px 32px; }
}
@media (max-width: 1023px) {
  .workspace { min-height: 0; }
  .interactive-map { padding-right: 0; height: 280px; }
  .map-scene { height: auto; padding-bottom: 150px; }
  .map-detail { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px 16px; align-items: center; }
  .map-detail h3 { margin: 0; font-size: 20px; }
  .map-detail dl { display: flex; justify-content: space-between; gap: 12px; grid-column: 2; grid-row: 1 / 3; }
  .map-detail dt { margin-top: 0; }
  .map-legend { top: 12px; bottom: auto; left: 16px; }
  .bar-row { grid-template-columns: 110px 1fr 50px; gap: 8px; font-size: 14px; }
  .capture-details { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }
}
@media (max-width: 700px) {
  .capture-stage { flex-direction: column; gap: 24px; padding: 56px 16px 24px; min-height: 0; }
  .phone { width: min(300px, 100%); height: 600px; }
  .receipt { width: min(300px, 100%); box-shadow: none; }
  .workspace-top > span { display: none; }
  .metric-row { gap: 18px; }
  .metric-row b { font-size: 24px; }
  .data-view { padding: 20px 14px; }
}
