/* ============================================================
   ADASK — auditoria.css
   Página «Auditoría 360°» adaptada al sistema de la web:
   Satoshi + Roboto Mono · negro #131313 · lima #98FE00 ·
   grises #F3F3F3/#E5E5E5 · esquinas recortadas.
   ============================================================ */

:root {
  --ok: #1D7A46;   --ok-bg: #E7F3EB;
  --warn: #B26F0E; --warn-bg: #F8EFDD;
  --risk: #BB3A2E; --risk-bg: #F9E9E7;
}

/* Resaltador lima sobre blanco (como la sección ROI de la home) */
.mark {
  background: var(--accent);
  padding: 0 .1em .05em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ============================================================
   HERO
   ============================================================ */
.aud-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 56px) 0 60px;
  overflow: hidden;
  background: var(--bg);
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.aud-hero .container { position: relative; z-index: 2; }
.aud-label { margin-bottom: 26px; }
.aud-title {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.04em;
  max-width: 21ch;
  margin-bottom: 24px;
}
.aud-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 44rem;
  margin-bottom: 24px;
}
.aud-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }
.aud-chips span {
  font: 700 10px/1 var(--mono);
  letter-spacing: .1em;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, .82);
  padding: 9px 14px;
  border-radius: 4px;
}
.live { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 38px; }
.live div { border-left: 2px solid var(--accent); padding-left: 14px; }
.live b { display: block; font: 700 1.8rem/1.1 var(--sans); letter-spacing: -.03em; }
.live span { font: 400 10px/1.6 var(--mono); color: var(--muted); letter-spacing: .05em; }
.aud-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue {
  margin-top: 52px;
  font: 700 10px/1 var(--mono);
  letter-spacing: .16em;
  color: #9b9b9b;
  display: flex;
  align-items: center;
  gap: 12px;
}
.scroll-cue i { display: block; width: 2px; height: 34px; background: linear-gradient(var(--ink), transparent); animation: cue 1.8s ease infinite; }
@keyframes cue {
  0% { transform: scaleY(.2); transform-origin: top; opacity: .4; }
  55% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(.2); transform-origin: bottom; opacity: .3; }
}

/* ============================================================
   EL VIAJE — grid escenas + oficina 3D
   ============================================================ */
.viaje { padding: 60px 0 90px; }
.viaje-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 46%);
  gap: 60px;
  align-items: start;
}
.sec-head { max-width: 50rem; margin-bottom: 40px; }
.sec-head .section-title { margin-bottom: 14px; }
.sec-sub { color: var(--muted); font-size: 1.02rem; max-width: 46ch; }

.stage3d-wrap { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; }

/* Sin WebGL (three.js no disponible): el viaje se lee a una columna */
body.no3d .viaje-grid { display: block; max-width: 54rem; }
body.no3d .scene { min-height: auto; padding: 56px 0; }
#scene3d { width: 100%; height: min(84vh, 840px); display: block; }
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 11px 18px;
  margin: -14px auto 0;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  width: max-content;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.hud .floor-ind { font: 700 10px/1 var(--mono); letter-spacing: .16em; color: #9b9b9b; }
.hud .floor-ind b { color: var(--ink); font-size: .95rem; letter-spacing: .06em; }
.hud .floor-ind span { color: var(--ink); }
.hud .dots { display: flex; gap: 7px; }
.hud .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: all .3s ease; }
.hud .dots i.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(152, 254, 0, .3); transform: scale(1.25); }

/* — Escenas — */
.scene {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.scene:last-of-type { border-bottom: none; }
.ghost {
  position: absolute;
  top: 30px; right: -6px;
  font: 700 clamp(6rem, 10vw, 9.5rem)/1 var(--sans);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(19, 19, 19, .14);
  letter-spacing: -.04em;
  user-select: none;
  pointer-events: none;
}
.sc-kicker {
  font: 700 10.5px/1.6 var(--mono);
  letter-spacing: .12em;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.sc-kicker .dur { color: #9b9b9b; font-weight: 400; }
.sc-title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin-bottom: 18px;
  max-width: 22ch;
}
.law {
  display: inline-flex;
  align-items: center;
  font: 700 9px/1 var(--mono);
  letter-spacing: .08em;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--risk-bg);
  color: var(--risk);
}
.law.soon { background: var(--warn-bg); color: var(--warn); }

.plain {
  background: rgba(152, 254, 0, .16);
  border: 1px solid rgba(19, 19, 19, .16);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  padding: 15px 20px;
  font-size: 1rem;
  margin-bottom: 26px;
  max-width: 36rem;
}
.plain b { font-weight: 700; }

.sc-list { margin-bottom: 26px; list-style: none; }
.sc-list li {
  position: relative;
  padding: 0 0 12px 26px;
  font-size: .95rem;
  color: #3d3d3d;
  max-width: 34rem;
}
.sc-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 13px; height: 2px;
  background: var(--ink);
}
.sc-list b { color: var(--ink); font-weight: 700; }

/* — Tarjetas de ejemplo — */
.example h4 { font: 700 10px/1 var(--mono); letter-spacing: .16em; color: #9b9b9b; margin-bottom: 12px; }
.example-card {
  background: var(--card, #FCFBF8);
  background: #fff;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  padding: 20px;
  font-size: .86rem;
  max-width: 34rem;
}
.ex-label {
  display: inline-block;
  font: 700 9px/1 var(--mono);
  letter-spacing: .12em;
  color: var(--ink);
  background: var(--tile);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.stat-row:last-child { border-bottom: none; }
.stat-row .v { font: 700 1.2rem/1 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.stat-row .v small { font: 700 .68rem/1 var(--mono); color: var(--ok); }
.stat-row .k { color: var(--muted); font-size: .85rem; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td { padding: 9px 4px; border-bottom: 1px dashed var(--line); vertical-align: middle; font-size: .84rem; }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table .t { font-weight: 700; }
.mini-table .d { color: #9b9b9b; font: 400 .62rem/1.5 var(--mono); letter-spacing: .05em; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-risk { background: var(--risk); }
.risk-txt { font: 700 .64rem/1 var(--mono); white-space: nowrap; letter-spacing: .05em; text-transform: uppercase; }
.rt-ok { color: var(--ok); } .rt-warn { color: var(--warn); } .rt-risk { color: var(--risk); }
.bar-item { margin-bottom: 11px; }
.bar-item:last-child { margin-bottom: 0; }
.bar-item .bl { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 5px; color: var(--muted); }
.bar-item .bl b { font-weight: 700; color: var(--ink); }
.bar { height: 7px; background: var(--tile-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i.warm { background: var(--risk); }
.bar i.good { background: var(--ok); }
.quickwin {
  margin-top: 14px;
  background: var(--ink);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.quickwin span { font-size: .78rem; opacity: .85; }
.quickwin b { font: 700 1.3rem/1 var(--sans); color: var(--accent); white-space: nowrap; }
.flow { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 14px; }
.flow .fbox {
  flex: 1;
  border: 1px solid var(--line-2);
  padding: 11px 8px;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  background: var(--tile);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.flow .fbox span { display: block; font: 400 .6rem/1.5 var(--mono); color: #9b9b9b; margin-top: 2px; }
.flow .fbox.core { border-color: var(--ink); background: rgba(152, 254, 0, .22); }
.flow .arr { align-self: center; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font: 700 9px/1 var(--mono); letter-spacing: .04em; padding: 6px 10px; border-radius: 4px; background: var(--ok-bg); color: var(--ok); }
.check-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .85rem; gap: 10px; }
.check-row:last-child { border-bottom: none; }
.check-row .cs { font: 700 .62rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.cs.ok { color: var(--ok); } .cs.warn { color: var(--warn); } .cs.pend { color: #9b9b9b; }

/* — Escáner (parada 01) — */
.scanner { position: relative; overflow: hidden; }
.scan-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 2px; border-bottom: 1px dashed var(--line); gap: 8px; }
.scan-row:last-of-type { border-bottom: none; }
.scan-tool b { font-size: .86rem; font-weight: 700; display: block; }
.scan-tool span { font: 400 .6rem/1.6 var(--mono); color: #9b9b9b; letter-spacing: .05em; }
.tag {
  font: 700 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  animation: tagin 9s ease infinite;
  animation-delay: var(--d);
}
@keyframes tagin {
  0% { opacity: 0; transform: translateY(4px); }
  8% { opacity: 1; transform: none; }
  90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(4px); }
}
.tag-risk { background: var(--risk-bg); color: var(--risk); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px rgba(152, 254, 0, .7);
  animation: sweep 9s linear infinite;
  pointer-events: none;
}
@keyframes sweep {
  0% { top: 16%; opacity: 0; }
  4% { opacity: 1; }
  86% { top: 94%; opacity: 1; }
  92% { opacity: 0; }
  100% { top: 16%; opacity: 0; }
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; display: inline-block; }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(152, 254, 0, .5); }
  50% { opacity: .55; box-shadow: 0 0 0 8px rgba(152, 254, 0, 0); }
}
.scanner-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.scanner-head .st { display: flex; align-items: center; gap: 8px; font: 700 9px/1 var(--mono); letter-spacing: .14em; color: #9b9b9b; }

/* ============================================================
   PILARES
   ============================================================ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar-card {
  background: var(--tile);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  padding: 30px 26px 22px;
  position: relative;
  transition: transform .25s ease, background .25s ease;
}
.pillar-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.pillar-card:hover { transform: translateY(-5px); background: var(--tile-2); }
.p-icon {
  width: 52px; height: 52px;
  background: var(--ink);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 18px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.pillar-card h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.p-claim { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.p-list { list-style: none; margin-bottom: 18px; }
.p-list li { position: relative; padding: 0 0 10px 24px; font-size: .87rem; color: #3d3d3d; }
.p-list li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; }
.p-stages { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.p-stages .lbl { font: 700 9px/1 var(--mono); letter-spacing: .12em; }
.p-stages span:not(.lbl) { font: 700 10px/1 var(--mono); background: #fff; border: 1px solid var(--line); color: var(--muted); padding: 5px 10px; border-radius: 4px; }

/* ============================================================
   MARCO LEGAL
   ============================================================ */
.law-band {
  background: var(--tile);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
  padding: 40px 40px 32px;
}
.law-top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 34px; }
.law-top h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; max-width: 26rem; }
.fine {
  background: var(--risk-bg);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  padding: 16px 20px;
  max-width: 23rem;
}
.fine b { display: block; font-size: 1.5rem; font-weight: 700; color: var(--risk); letter-spacing: -.01em; }
.fine span { font-size: .78rem; color: #7A2620; }
.lt { display: grid; grid-template-columns: repeat(4, 1fr); }
.lt-item { position: relative; padding: 24px 18px 0 0; }
.lt-item::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.lt-item.done::before { background: var(--risk); }
.lt-item i { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #C9C9C9; }
.lt-item.done i { background: var(--risk); box-shadow: 0 0 0 4px var(--risk-bg); }
.lt-item.next i { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.lt-date { font: 700 10px/1 var(--mono); letter-spacing: .12em; color: #9b9b9b; }
.lt-chip { display: inline-block; font: 700 9px/1 var(--mono); letter-spacing: .1em; padding: 5px 10px; border-radius: 4px; margin: 8px 0 10px; }
.chip-vigor { background: var(--risk-bg); color: var(--risk); }
.chip-next { background: var(--warn-bg); color: var(--warn); }
.chip-later { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.lt-item h4 { font-size: .98rem; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.lt-item p { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.lt-item p b { color: var(--ink); }
.law-note { margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--line-2); font-size: .88rem; color: var(--muted); max-width: 54rem; }
.law-note b { color: var(--ink); }

/* ============================================================
   CTA de la página
   ============================================================ */
.cta-kicker {
  font: 400 12px/1 var(--mono);
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding-top: 14px;
  margin-bottom: 30px;
  text-transform: uppercase;
}
.cta .cta-title { max-width: 22ch; }
.cta-note { margin-top: 26px; font: 700 10px/1.7 var(--mono); letter-spacing: .12em; color: rgba(255, 255, 255, .45); }

/* ============================================================
   ENTRADAS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .tag { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — móvil: el viaje en modo «ascensor»
   ============================================================ */
@media (max-width: 1020px) {
  .viaje-grid { display: block; }
  .stage3d-wrap {
    position: fixed; inset: 0; height: 100vh;
    z-index: 0; margin: 0; padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .9s ease;
    justify-content: stretch;
  }
  body.ride .stage3d-wrap { opacity: 1; }
  #scene3d { width: 100%; height: 100%; }
  .hud {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 9px 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(19, 19, 19, .14);
    z-index: 6;
    opacity: 0;
    transition: opacity .5s ease;
    max-width: calc(100vw - 88px);
  }
  body.ride .hud { opacity: 1; }
  .hud .dots { display: none; }
  .hud .floor-ind { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail {
    position: fixed;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 11px;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
  }
  body.ride .rail { opacity: 1; pointer-events: auto; }
  .rail i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: block; transition: all .3s ease; cursor: pointer; }
  .rail i.on { background: var(--accent); box-shadow: 0 0 0 4px rgba(152, 254, 0, .25); transform: scale(1.25); }
  .gyro-hint {
    position: fixed;
    bottom: 22px; left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--ink);
    color: var(--accent);
    font: 700 10px/1 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 10px 18px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    opacity: 0;
    transition: all .5s ease;
    z-index: 6;
    pointer-events: none;
    white-space: nowrap;
  }
  .gyro-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .scenes { position: relative; z-index: 2; }
  .viaje-grid .sec-head, .scene {
    background: rgba(255, 255, 255, .93);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
    padding: 26px 20px;
    box-shadow: 0 24px 60px rgba(19, 19, 19, .1);
  }
  .viaje-grid .sec-head { margin: 40px 0 30vh; }
  .scene { margin: 0 0 30vh; min-height: auto; }
  .scene:last-of-type { margin-bottom: 36vh; border-bottom: 1px solid var(--line); }
  /* sin WebGL, el viaje se lee como página normal */
  body.no3d .viaje-grid .sec-head { margin-bottom: 26px; }
  body.no3d .scene { margin-bottom: 18px; }
  .ghost { font-size: 4.2rem; top: 12px; right: 12px; opacity: .75; }
  .pillars { grid-template-columns: 1fr; }
  .lt { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .law-band { padding: 28px 22px 24px; }
  .aud-hero { min-height: auto; }
  .scroll-cue { margin-top: 38px; }
}

@media (max-width: 560px) {
  .lt { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .flow .arr { transform: rotate(90deg); align-self: center; }
  .live { gap: 18px; }
  .live b { font-size: 1.35rem; }
  .aud-btns .btn { width: 100%; }
  .law-top h3 { font-size: 1.2rem; }
}
