/* /audit/ round 4 (2026-11-23): free-report preview, hook, horizon steps, nav feedback and the motion layer.
   Mobile first (390 px is the base). Motion animates transform and opacity only, and every effect has a
   prefers-reduced-motion state that shows the final frame. */

/* Report preview (hero), 2026-11-29: a miniature of the free report as the visitor receives it. Same three
   phases and problem mark as the live report (ui/live.js: carta celeste, iris, paralaje; oxide diamond = problem).
   The metro-line rows with check circles and the Bien / Te resta / Sin datos legend were rejected by the operator. */
.report-preview{--oxide:#9c3b2c;--sheet:#fbf7ef;margin:4px 0 0;max-width:470px;padding:16px 16px 14px;background:#f6f1e8;border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 40px -30px #6e552b80}
.rp-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin-bottom:12px}
.rp-title{font:600 21px/1.15 var(--serif);color:var(--ink)}
.rp-note{font:13px/1.3 var(--sans);color:var(--muted)}
.rp-sheet{position:relative;padding:14px 14px 12px;background:var(--sheet);border:1px solid #dccfb6;border-radius:10px;box-shadow:0 1px 0 #fff inset,0 10px 18px -16px #6e552b99}
.rp-mast{display:flex;align-items:baseline;gap:6px;margin:0 0 4px;padding-bottom:9px;border-bottom:3px double #d6c6a6;font:12px/1.2 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.rp-mast em{font:italic 600 18px/1 var(--serif);letter-spacing:0;text-transform:none;color:var(--gold)}
.rp-chapters{list-style:none;margin:0;padding:0}
.rp-ch{display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;align-items:start;padding:11px 0;border-bottom:1px solid #e6dcc8}
.rp-glyph{width:30px;height:30px;margin-top:1px;fill:none;stroke:var(--gold);stroke-width:1.4}
.rp-glyph path,.rp-glyph .fill{fill:var(--brass);stroke:var(--gold);stroke-width:.8}
.rp-q{margin:0;font:600 18px/1.2 var(--serif);color:var(--ink);text-wrap:balance}
.rp-f{position:relative;margin:5px 0 0;padding-left:17px;font:15px/1.45 var(--sans);color:var(--ink);text-wrap:pretty}
.rp-f::before{content:'';position:absolute;left:1px;top:.52em;width:7px;height:7px;background:var(--oxide);transform:rotate(45deg)}
.rp-f::after{content:'';position:absolute;left:10px;right:-6px;top:-3px;bottom:-3px;z-index:-1;background:#f0e3c2;border-radius:6px;transform:scaleX(0);transform-origin:left center;opacity:0}
.rp-ch>div{position:relative;z-index:0}
.rp-locked{display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;align-items:start;padding-top:12px}
.rp-lock{justify-self:center;width:16px;height:16px;margin-top:2px;fill:none;stroke:var(--gold);stroke-width:1.4}
.rp-locked p{margin:0 0 7px;font:600 14px/1.3 var(--sans);color:var(--gold)}
.rp-bars{display:grid;gap:5px}
.rp-bars span{display:block;height:7px;border-radius:4px;background:#e4d8bf}
.rp-bars span:nth-child(1){width:88%}.rp-bars span:nth-child(2){width:64%}.rp-bars span:nth-child(3){width:76%}
.rp-promise{display:flex;flex-wrap:wrap;gap:6px 18px;margin:12px 2px 0;font:13px/1.3 var(--sans);color:var(--muted)}
.rp-promise span{display:inline-flex;align-items:center;gap:7px}
.rp-promise span::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--brass)}
body[data-page=audit] .hero .report-preview+.actions{margin-top:22px}
@media(min-width:900px){
 .report-preview{margin-top:10px;padding:18px 20px 16px}
 .rp-title{font-size:23px}
 .rp-sheet{padding:16px 18px 14px}
 .rp-q{font-size:19px}
}
@media(prefers-reduced-motion:no-preference){
 .rp-sheet{animation:rp-rise .6s cubic-bezier(.16,1,.3,1) both .1s}
 .rp-ch{animation:rp-rise .5s cubic-bezier(.16,1,.3,1) both}
 .rp-ch:nth-child(1){animation-delay:.25s}.rp-ch:nth-child(2){animation-delay:.33s}.rp-ch:nth-child(3){animation-delay:.41s}
 .rp-locked{animation:rp-rise .5s cubic-bezier(.16,1,.3,1) both .49s}
 /* One highlighter pass under each finding, finished within 5 s of each entry into view (WCAG 2.2.2); audit-motion.js re-arms it. */
 .report-preview.is-scanning .rp-f::after{animation:rp-mark 2.4s cubic-bezier(.45,0,.2,1) both}
 .report-preview.is-scanning .rp-ch:nth-child(1) .rp-f::after{animation-delay:.7s}
 .report-preview.is-scanning .rp-ch:nth-child(2) .rp-f::after{animation-delay:1.3s}
 .report-preview.is-scanning .rp-ch:nth-child(3) .rp-f::after{animation-delay:1.9s}
}
@keyframes rp-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes rp-mark{0%{transform:scaleX(0);opacity:.9}30%{transform:scaleX(1);opacity:.9}80%{transform:scaleX(1);opacity:.9}100%{transform:scaleX(1);opacity:0}}

/* Case block: the hook replaces the «qué analizamos» lists (round 4). */
.case-hook{margin:18px 0 0;max-width:38ch;font:17px/1.6 var(--sans);color:var(--ink);text-wrap:pretty}
@media(min-width:900px){
 .case-hook{font-size:19px}
 .case-main{position:sticky;top:32px;align-self:start}
}

/* Gate: the message after a nav click into the closed page is visible, not only announced. */
.gate-status{margin:20px 0 0;padding:12px 16px;border:1px solid var(--brass);border-radius:12px;background:#f3e8d2;color:var(--ink);font:600 15px/1.45 var(--sans)}
.gate-status:empty{display:none}
@media(min-width:900px){.gate-status{margin-left:auto;max-width:785px}}
@media(prefers-reduced-motion:no-preference){
 .segment-gate.is-calling .gate-option{animation:gate-call .9s cubic-bezier(.34,1.56,.64,1) both}
 .segment-gate.is-calling .gate-option:nth-child(2){animation-delay:70ms}
 .segment-gate.is-calling .gate-option:nth-child(3){animation-delay:140ms}
 .segment-gate.is-calling .gate-option:nth-child(4){animation-delay:210ms}
 .segment-gate.is-calling .gate-status{animation:arrive .5s cubic-bezier(.16,1,.3,1) both}
}
@keyframes gate-call{0%,100%{transform:none}35%{transform:scale(1.03)}}

/* Arrival: the heading of a nav target settles into place, or gets a static underline under reduced motion. */
@media(prefers-reduced-motion:no-preference){.is-arrived{animation:arrive .9s cubic-bezier(.16,1,.3,1) both}}
@media(prefers-reduced-motion:reduce){.is-arrived{text-decoration:underline 3px var(--brass);text-underline-offset:8px}}
@keyframes arrive{0%{opacity:.2;transform:translateY(12px)}100%{opacity:1;transform:none}}

/* Header nav: a single underline marks the section in view; aria-current carries the same state in the mobile menu. */
.site-header .header-inner>nav{position:relative}
.nav-ink{position:absolute;left:0;bottom:-7px;width:100px;height:2px;border-radius:1px;background:var(--gold);transform-origin:left center;opacity:0;pointer-events:none;transition:transform .45s cubic-bezier(.16,1,.3,1),opacity .25s ease}
.nav-ink.is-on{opacity:1}
.site-header nav a[aria-current]{color:var(--gold)}
@media(prefers-reduced-motion:reduce){.nav-ink{transition:none}}

/* Horizon: three steps under «Ampliar la mirada», with a rail that fills as each step is reached. */
.horizon-steps-wrap{--p:1;position:relative;margin-top:30px;padding-left:34px}
.horizon-rail{position:absolute;left:8px;top:10px;bottom:12px;width:2px;background:var(--line)}
.horizon-rail i{position:absolute;inset:0;background:var(--gold);transform-origin:top center;transform:scaleY(var(--p));transition:transform .7s cubic-bezier(.16,1,.3,1)}
.horizon-steps{list-style:none;margin:0;padding:0;display:grid;gap:26px}
.horizon-steps li{position:relative;display:grid;gap:6px}
.horizon-steps li::before{content:'';position:absolute;left:-34px;top:2px;width:18px;height:18px;box-sizing:border-box;border:2px solid var(--gold);border-radius:50%;background:var(--paper)}
.horizon-steps li::after{content:'';position:absolute;left:-29px;top:7px;width:8px;height:8px;border-radius:50%;background:var(--gold);transition:transform .45s cubic-bezier(.34,1.56,.64,1)}
.horizon-steps span{font:700 12px/1.3 var(--sans);letter-spacing:.14em;color:var(--gold)}
.horizon-steps strong{font:500 27px/1.12 var(--serif);color:var(--ink);text-wrap:balance}
@media(min-width:900px){.horizon-steps strong{font-size:32px}.horizon-steps{gap:32px}}
.is-scrubbed li{opacity:.6;transform:translateX(-6px);transition:opacity .5s ease,transform .6s cubic-bezier(.16,1,.3,1)}
.is-scrubbed li::after{transform:scale(0)}
.is-scrubbed li.is-on{opacity:1;transform:none}
.is-scrubbed li.is-on::after{transform:scale(1)}
/* The telescope mascot sweeps the horizon as the section crosses the screen (CSS scroll-driven; static elsewhere). */
@supports (animation-timeline:view()){
 @media(prefers-reduced-motion:no-preference){
  .horizon-art .telescope-launch img{animation:scope-sweep linear both;animation-timeline:view();animation-range:cover 0% cover 100%}
 }
}
@keyframes scope-sweep{from{transform:rotate(-5deg) translateY(16px) scale(.94)}to{transform:rotate(4deg) translateY(-14px) scale(.94)}}
/* The rotated bounding box must never widen the page at 390 px. */
.horizon-section{overflow-x:clip}

/* Scroll reveal for the gated page (only once JS has confirmed motion is allowed). */
.motion-ok [data-reveal]{transition:opacity .7s cubic-bezier(.16,1,.3,1) var(--d,0ms),transform .7s cubic-bezier(.16,1,.3,1) var(--d,0ms)}
.motion-ok [data-reveal]:not(.is-in){opacity:0;transform:translateY(22px)}

/* Futuros servicios: the locked cards showed only a padlock until hover or tap. Their names stay visible on the lock. */
.future-preview-lock{grid-auto-flow:row;align-content:center;gap:12px}
.future-lock-name{font:500 26px/1.1 var(--serif);text-align:center;color:#f7edd9;text-shadow:0 1px 12px #0006}
@media(max-width:600px){.future-lock-name{font-size:24px}}
