/* ============================================================
   Elementos compartidos de "escaparate": aparicion al hacer scroll y
   "historia" con dispositivo fijo que cambia de pantalla al leer.
   Lo usan la pagina principal (panel) y la de la app de conductores.
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease var(--d, 0ms), transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

.story { background: linear-gradient(180deg, var(--bg) 0%, #eaf0fb 100%); padding-bottom: 40px; }
.story-head { text-align: center; margin-bottom: 8px; }
.story-head .eyebrow { margin-bottom: 12px; }
.story-grid { display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: 64px; align-items: start; }
.story-grid.wide { grid-template-columns: 0.72fr 1.28fr; gap: 48px; }
.chapter { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.25; transform: translateX(-10px); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.chapter.is-active { opacity: 1; transform: none; }
.chapter-num { font-size: 84px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(47,111,237,0.4); margin-bottom: 6px; letter-spacing: -2px; }
.chapter h3 { font-size: 30px; letter-spacing: -0.3px; margin-bottom: 12px; }
.chapter p { font-size: 17px; color: var(--muted); max-width: 44ch; }
.chapter p strong { color: var(--navy); }
.chapter-shot { display: none; }

.story-stage { --glow: #2f6fed; position: sticky; top: 92px; height: calc(100vh - 120px); min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.story-stage[data-screen="1"] { --glow: #19b5a5; }
.story-stage[data-screen="2"] { --glow: #6a5cf0; }
.story-stage[data-screen="3"] { --glow: #e08a2c; }
.story-glow { position: absolute; width: 470px; height: 470px; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 66%); opacity: 0.4; filter: blur(10px); transition: background 0.9s ease; z-index: 0; }
.story-grid.wide .story-glow { width: 640px; height: 520px; border-radius: 50%; }
.story-stage .device { position: relative; z-index: 1; }
.story-dots { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 24px; }
.story-dots i { display: block; width: 8px; height: 8px; border-radius: 8px; background: rgba(16,35,63,0.2); transition: width 0.35s, background 0.35s; }
.story-dots i.on { width: 26px; background: var(--accent); }

@media (max-width: 1100px) { .story-grid { gap: 40px; } }
@media (max-width: 900px) {
  .story-grid, .story-grid.wide { grid-template-columns: 1fr; }
  .story-stage { display: none; }
  .chapter { min-height: auto; opacity: 1; transform: none; padding: 30px 0 34px; }
  .chapter-num { font-size: 58px; }
  .chapter h3 { font-size: 24px; }
  .chapter-shot { display: block; width: min(250px, 72%); height: auto; margin: 20px auto 0; border: 8px solid #0a1529; border-radius: 30px; box-shadow: 0 26px 50px -24px rgba(16,35,63,0.55); }
  .chapter-shot.wide-shot { width: 100%; max-width: 560px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 22px 44px -24px rgba(16,35,63,0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .chapter { transition-duration: 0.01s !important; transform: none; }
}
