/* ==========================================================
   "Quick tour" hero animation — ported verbatim (selectors, timings,
   keyframe percentages, colors) from app.py's inline <style> block
   (search app.py for "R12 DataSense D-to-product portal") and the
   render_auth_showcase() markup. There is no real video file in the
   production app: this *is* the "hero video" — a 26-second looping
   CSS/HTML animation simulating brand intro -> portal door opening ->
   six product scenes (upload, ask, chart, quality, lab, insights),
   synced to a sidebar nav-cursor and a progress bar. Only the parts
   specific to the embedded sign-in/sign-up form (which this static
   prototype does not include — CTAs link out to the app subdomain
   instead: ds-pro-robot, ds-speech, OAuth button icons, auth forms)
   were left out; see the PR description's animation inventory. */

/* max-width removed (was 980px, centered) - .ds-auth-left now lives in
   the hero's right column (see css/marketing.css's .ds-hero-tour-wrap),
   which already controls this element's available width; a second cap
   here would stop the tour from filling that column. */
.ds-auth-left { padding-top: .25rem; width: 100%; }
.ds-auth-left-label {
    color:#91dcff; font-size:.72rem; font-weight:800; letter-spacing:.16em; margin:0 0 .55rem .15rem;
}
.ds-tour-shell {
    position:relative; height:600px; overflow:hidden; border-radius:28px;
    background:linear-gradient(150deg,rgba(5,10,28,.98),rgba(10,14,38,.96));
    border:1px solid rgba(130,145,220,.16);
    box-shadow:0 26px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.03);
}
.ds-tour-topbar {
    height:48px; display:flex; align-items:center; gap:8px; padding:0 16px;
    background:linear-gradient(180deg,rgba(22,31,67,.98),rgba(12,18,44,.96));
    border-bottom:1px solid rgba(126,143,210,.13);
}
.ds-tour-dots { display:flex; gap:6px; }
.ds-tour-dots i { display:block; width:9px; height:9px; border-radius:50%; background:#f87171; }
.ds-tour-dots i:nth-child(2){background:#fbbf24}.ds-tour-dots i:nth-child(3){background:#34d399}
.ds-tour-title { color:rgba(238,243,255,.9); font-size:.8rem; font-weight:700; margin-left:5px; }
.ds-tour-progress { height:3px; background:rgba(255,255,255,.05); }
.ds-tour-progress span { display:block; height:100%; width:100%; transform-origin:left center; background:linear-gradient(90deg,#39d5ef,#735fff); animation:tourProgress 26s linear infinite; }
.ds-tour-pause-toggle { position:absolute; width:0; height:0; opacity:0; pointer-events:none; }
.ds-tour-control {
    position:absolute; right:16px; bottom:14px; width:38px; height:38px; border-radius:50%;
    display:flex; align-items:center; justify-content:center; background:rgba(230,235,246,.92);
    color:#0b1325; font-size:.72rem; font-weight:900; box-shadow:0 8px 18px rgba(0,0,0,.18);
    cursor:pointer; z-index:12;
}
.ds-tour-control-play { display:none; }
#dsTourPause:checked ~ .ds-tour-shell .ds-tour-control-pause { display:none; }
#dsTourPause:checked ~ .ds-tour-shell .ds-tour-control-play { display:inline; }
#dsTourPause:checked ~ .ds-tour-shell .ds-brand-intro,
#dsTourPause:checked ~ .ds-tour-shell .ds-brand-glow,
#dsTourPause:checked ~ .ds-tour-shell .ds-brand-d,
#dsTourPause:checked ~ .ds-tour-shell .ds-brand-rest span,
#dsTourPause:checked ~ .ds-tour-shell .ds-brand-tagline,
#dsTourPause:checked ~ .ds-tour-shell .ds-portal-reveal,
#dsTourPause:checked ~ .ds-tour-shell .ds-portal-door,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-demo,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-scene,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-nav,
#dsTourPause:checked ~ .ds-tour-shell .ds-nav-cursor,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-bar,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-upload-progress span,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-upload-pct span,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-typing,
#dsTourPause:checked ~ .ds-tour-shell .ds-preview-row,
#dsTourPause:checked ~ .ds-tour-shell .ds-quality-chips div,
#dsTourPause:checked ~ .ds-tour-shell .ds-lab-progress span,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-kpis > div,
#dsTourPause:checked ~ .ds-tour-shell .ds-product-insights > div,
#dsTourPause:checked ~ .ds-tour-shell .ds-tour-progress span {
    animation-play-state: paused !important;
}

@keyframes tourProgress { from{transform:scaleX(0)}to{transform:scaleX(1)} }

@media (max-height: 820px) and (min-width: 901px) {
  .ds-tour-shell { height:540px; }
}
@media (max-width: 1100px) {
  .ds-tour-shell { height:540px; }
}
@media (max-width: 900px) {
  .ds-tour-shell { height:500px; }
}

/* ---------- R12 DataSense D-to-product portal ---------- */
/* R15: six-scene product journey, retimed to a 26s loop. Brand
   intro and door-opening keep the exact percentage timings they
   always had - only the scenes after the door reveal changed. */
/* CSS-only fallback size, used only until the hero-tour fit script's
   first measurement lands (and if JS is unavailable). */
.ds-portal-tour { height: clamp(340px, 44vh, 560px); }
.ds-brand-intro, .ds-portal-reveal, .ds-product-demo {
    position:absolute; left:0; right:0; top:52px; bottom:0;
}
.ds-brand-intro {
    z-index:8; display:flex; align-items:center; justify-content:center;
    background:
        radial-gradient(circle at 50% 45%, rgba(75,145,255,.15), transparent 26%),
        radial-gradient(circle at 50% 50%, rgba(124,92,255,.13), transparent 38%);
    animation:dsBrandIntro 26s infinite;
}
.ds-brand-glow {
    position:absolute; width:330px; height:330px; border-radius:50%;
    background:radial-gradient(circle, rgba(57,215,239,.16), rgba(124,92,255,.12) 38%, transparent 70%);
    filter:blur(12px); animation:dsBrandGlow 2.2s ease-in-out infinite;
}
.ds-brand-stage { position:relative; z-index:2; display:flex; align-items:center; justify-content:center; min-width:540px; height:190px; }
.ds-brand-d {
    position:relative; z-index:3; color:#f8fbff; font-family:"Space Grotesk","Inter",sans-serif;
    font-size:150px; font-weight:800; line-height:1; letter-spacing:-.09em;
    text-shadow:0 0 25px rgba(101,195,255,.35), 0 0 70px rgba(96,70,230,.24);
    animation:dsLetterD 26s infinite;
}
.ds-brand-rest { display:flex; align-items:center; margin-left:8px; overflow:hidden; }
.ds-brand-rest span {
    display:inline-block; color:#edf5ff; font-family:"Space Grotesk","Inter",sans-serif;
    font-size:72px; font-weight:760; letter-spacing:-.05em; opacity:0; transform:translateX(-30px) scale(.92);
    animation:dsLetterRest 26s infinite;
}
.ds-brand-rest span:nth-child(1){animation-delay:.05s}.ds-brand-rest span:nth-child(2){animation-delay:.10s}
.ds-brand-rest span:nth-child(3){animation-delay:.15s}.ds-brand-rest span:nth-child(4){animation-delay:.20s}
.ds-brand-rest span:nth-child(5){animation-delay:.25s}.ds-brand-rest span:nth-child(6){animation-delay:.30s}
.ds-brand-rest span:nth-child(7){animation-delay:.35s}.ds-brand-rest span:nth-child(8){animation-delay:.40s}
.ds-brand-tagline {
    position:absolute; top:150px; left:50%; transform:translateX(-50%); white-space:nowrap;
    color:rgba(195,223,245,.68); font-size:.78rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase;
    opacity:0; animation:dsTagline 26s infinite;
}
.ds-portal-reveal {
    z-index:9; display:flex; align-items:center; justify-content:center; pointer-events:none;
    opacity:0; animation:dsPortalLayer 26s infinite;
}
.ds-portal-frame { position:relative; width:210px; height:300px; perspective:900px; }
.ds-portal-door {
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    border-radius:40px 40px 34px 34px; transform-origin:left center;
    background:linear-gradient(150deg, rgba(75,127,255,.96), rgba(91,63,222,.95) 58%, rgba(20,162,198,.90));
    border:1px solid rgba(204,226,255,.55); box-shadow:0 0 42px rgba(74,112,255,.30), inset 0 1px 0 rgba(255,255,255,.22);
    animation:dsDoorOpen 26s infinite;
}
.ds-portal-door span { color:white; font-family:"Space Grotesk","Inter",sans-serif; font-size:126px; font-weight:820; letter-spacing:-.10em; transform:translateX(-5px); }
.ds-product-demo {
    z-index:5; display:flex; opacity:0; transform:scale(.92); transform-origin:center;
    background:linear-gradient(145deg, rgba(5,10,29,.98), rgba(8,14,36,.98));
    animation:dsProductReveal 26s infinite;
}
.ds-product-sidebar {
    position:relative; width:155px; flex:0 0 155px; padding:22px 14px; background:rgba(6,12,30,.94); border-right:1px solid rgba(133,149,210,.11);
}
.ds-product-brand {
    display:grid; place-items:center; width:42px; height:42px; margin:0 auto 24px; border-radius:14px;
    color:#fff; font-weight:800; background:linear-gradient(145deg,#7c5cff,#2478c8); box-shadow:0 10px 22px rgba(78,66,220,.22);
}
.ds-nav-cursor {
    position:absolute; left:6px; width:3px; height:26px; border-radius:3px;
    background:linear-gradient(180deg,#4fc3ff,#7c5cff); box-shadow:0 0 8px rgba(79,195,255,.55);
    animation:dsNavCursor 26s infinite;
}
.ds-product-nav { position:relative; padding:9px 10px; margin:5px 0; border-radius:9px; color:rgba(181,194,222,.64); font-size:.69rem; font-weight:650; }
.ds-nav-workspace { animation:dsNavWorkspace 26s infinite; }
.ds-nav-viz { animation:dsNavViz 26s infinite; }
.ds-nav-quality { animation:dsNavQuality 26s infinite; }
.ds-nav-lab { animation:dsNavLab 26s infinite; }
.ds-nav-insights { animation:dsNavInsights 26s infinite; }
.ds-product-main { position:relative; flex:1; overflow:hidden; padding:28px 34px; }
.ds-product-scene { position:absolute; inset:28px 34px; opacity:0; transform:translateY(8px); }
.ds-scene-upload { animation:dsUploadScene 26s infinite; }
.ds-scene-question { animation:dsQuestionScene 26s infinite; }
.ds-scene-chart { animation:dsChartScene 26s infinite; }
.ds-scene-quality { animation:dsQualityScene 26s infinite; }
.ds-scene-lab { animation:dsLabScene 26s infinite; }
.ds-scene-insights { animation:dsInsightsScene 26s infinite; }
.ds-product-eyebrow { color:#91dcff; font-size:.68rem; font-weight:800; letter-spacing:.16em; }
.ds-product-heading { margin-top:.6rem; color:#f5f8ff; font-size:1.45rem; font-weight:760; letter-spacing:-.025em; }

/* Upload scene: progress bar, stepped percentage readout, dataset preview */
.ds-product-upload {
    position:relative; display:flex; align-items:center; gap:14px; margin-top:1.1rem; padding:18px; border-radius:18px;
    background:rgba(15,27,64,.78); border:1px dashed rgba(139,220,255,.32); max-width:520px;
}
.ds-product-upload-icon { display:grid; place-items:center; width:52px; height:52px; border-radius:16px; color:#a6f5ff; background:rgba(34,75,145,.45); font-size:1.35rem; }
.ds-product-upload b { display:block; color:#fff; }.ds-product-upload small { display:block; margin-top:3px; color:rgba(199,212,238,.63); }
.ds-product-upload-progress { position:absolute; left:18px; right:88px; bottom:8px; height:3px; overflow:hidden; background:rgba(255,255,255,.06); border-radius:99px; }
.ds-product-upload-progress span { display:block; width:100%; height:100%; background:linear-gradient(90deg,#22d3ee,#7c5cff); animation:dsUploadProgress 26s infinite; transform-origin:left; }
.ds-product-upload-pct { position:absolute; right:18px; bottom:4px; width:60px; height:14px; }
.ds-product-upload-pct span {
    position:absolute; inset:0; color:#9ae6c8; font-size:.72rem; font-weight:700; text-align:right; opacity:0;
}
.ds-product-upload-pct span:nth-child(1) { animation:dsPct1 26s infinite; }
.ds-product-upload-pct span:nth-child(2) { animation:dsPct2 26s infinite; }
.ds-product-upload-pct span:nth-child(3) { animation:dsPct3 26s infinite; }
.ds-product-upload-pct span:nth-child(4) { animation:dsPct4 26s infinite; }
.ds-product-file-ready { margin-top:.85rem; color:#9ae6c8; font-size:.78rem; font-weight:650; }
.ds-product-preview { margin-top:.7rem; max-width:520px; border-radius:14px; overflow:hidden; border:1px solid rgba(127,146,219,.14); }
.ds-preview-row {
    display:grid; grid-template-columns:1fr 1fr 1fr; padding:7px 12px; font-size:.74rem;
    color:rgba(216,226,247,.78); background:rgba(15,27,64,.55); opacity:0; transform:translateY(4px);
    animation:dsPreviewRow 26s infinite;
}
.ds-preview-row span:last-child { text-align:right; }
.ds-preview-head { color:#91dcff; font-weight:700; background:rgba(23,38,84,.7); }
.ds-preview-row:nth-child(2) { animation-delay:.1s; }
.ds-preview-row:nth-child(3) { animation-delay:.22s; }
.ds-preview-row:nth-child(4) { animation-delay:.34s; }

/* Ask DataSense scene: typing indicator then a real, specific answer */
.ds-product-question { margin-top:1.1rem; width:fit-content; max-width:78%; padding:12px 15px; border-radius:16px 16px 16px 6px; background:rgba(105,88,255,.16); color:#fff; font-weight:650; }
.ds-product-typing {
    margin:10px 0 0 auto; width:fit-content; display:flex; gap:4px; padding:11px 14px;
    border-radius:16px 16px 6px 16px; background:rgba(17,31,72,.86); opacity:0; animation:dsTyping 26s infinite;
}
.ds-product-typing i { width:6px; height:6px; border-radius:50%; background:rgba(198,213,245,.75); animation:dsTypingDot 1s ease-in-out infinite; }
.ds-product-typing i:nth-child(2) { animation-delay:.15s; }
.ds-product-typing i:nth-child(3) { animation-delay:.3s; }
.ds-product-answer { margin:10px 0 0 auto; width:fit-content; max-width:82%; padding:11px 14px; border-radius:16px 16px 6px 16px; background:rgba(17,31,72,.86); color:rgba(218,228,248,.85); font-size:.82rem; opacity:0; animation:dsAnswer 26s infinite; }

/* Visualisation scene: skeleton, then bars grow from zero */
.ds-product-chart-skeleton { display:flex; gap:14px; height:24px; margin-top:1rem; opacity:0; animation:dsChartSkeleton 26s infinite; }
.ds-product-chart-skeleton span { flex:1; border-radius:8px; background:linear-gradient(90deg,rgba(255,255,255,.05),rgba(255,255,255,.12),rgba(255,255,255,.05)); background-size:200% 100%; animation:dsSkeletonShimmer 1.1s linear infinite; }
.ds-product-chart { display:flex; align-items:flex-end; gap:14px; height:215px; margin-top:.5rem; padding:10px 12px 30px; border-radius:18px; background:rgba(14,25,59,.58); }
.ds-product-bar {
    position:relative; flex:1; border-radius:14px 14px 5px 5px; height:0;
    background:linear-gradient(180deg,rgba(95,159,255,.78),rgba(73,87,209,.78)); box-shadow:0 10px 20px rgba(45,74,190,.15);
    animation:dsBarGrow 26s infinite;
}
.ds-product-bar:nth-child(2) { animation-delay:.12s; }
.ds-product-bar:nth-child(3) { animation-delay:.24s; }
.ds-product-bar:nth-child(4) { animation-delay:.36s; }
.ds-product-bar.highlight { background:linear-gradient(180deg,#71e1f5,#6e61ff); box-shadow:0 12px 28px rgba(75,145,255,.25); }
.ds-product-bar span { position:absolute; left:50%; bottom:-23px; transform:translateX(-50%); color:rgba(201,212,236,.63); font-size:.68rem; }
.ds-product-caption { margin-top:.65rem; color:rgba(214,224,244,.72); font-size:.82rem; }

/* Data Quality scene: score ring + issue chips */
.ds-product-quality-row { display:flex; align-items:center; gap:22px; margin-top:1.2rem; }
.ds-quality-ring {
    width:96px; height:96px; border-radius:50%; flex:0 0 96px; display:grid; place-items:center;
    background:conic-gradient(#4fc3ff 0deg, #7c5cff calc(var(--ring,94)*3.6deg), rgba(255,255,255,.08) 0deg);
    animation:dsQualityRing 26s infinite;
}
.ds-quality-ring span { width:74px; height:74px; border-radius:50%; background:#0b1329; display:grid; place-items:center; color:#fff; font-weight:750; font-size:.95rem; }
.ds-quality-chips { display:grid; gap:8px; }
.ds-quality-chips div {
    padding:8px 12px; border-radius:11px; background:rgba(17,30,70,.72); border:1px solid rgba(127,146,219,.12);
    color:rgba(214,224,244,.8); font-size:.75rem; opacity:0; transform:translateX(-6px); animation:dsChip 26s infinite;
}
.ds-quality-chips div:nth-child(2) { animation-delay:.12s; }
.ds-quality-chips div:nth-child(3) { animation-delay:.24s; }

/* Data Science Lab scene: training progress -> trained result */
.ds-product-lab-row { margin-top:1.2rem; max-width:480px; }
.ds-lab-progress { position:relative; height:8px; border-radius:99px; overflow:hidden; background:rgba(255,255,255,.06); }
.ds-lab-progress span { display:block; height:100%; width:100%; transform:scaleX(0); transform-origin:left; background:linear-gradient(90deg,#4fc3ff,#7c5cff); animation:dsLabProgress 26s infinite; }
.ds-lab-status { margin-top:.6rem; color:rgba(214,224,244,.72); font-size:.8rem; }
.ds-product-lab-result { margin-top:1rem; display:inline-flex; padding:9px 14px; border-radius:11px; background:rgba(52,211,153,.14); border:1px solid rgba(52,211,153,.25); color:#9ae6c8; font-size:.8rem; font-weight:700; opacity:0; animation:dsLabResult 26s infinite; }

/* Insights scene: KPI row, generate action, staggered insight cards */
.ds-product-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:1.1rem; max-width:560px; }
.ds-product-kpis > div {
    padding:10px 12px; border-radius:13px; background:rgba(17,30,70,.72); border:1px solid rgba(127,146,219,.10);
    opacity:0; transform:translateY(6px) scale(.96); animation:dsKpi 26s infinite;
}
.ds-product-kpis > div:nth-child(2) { animation-delay:.1s; }
.ds-product-kpis > div:nth-child(3) { animation-delay:.2s; }
.ds-product-kpis small { display:block; color:rgba(199,211,236,.62); font-size:.68rem; }
.ds-product-kpis b { display:block; margin-top:3px; color:#fff; font-size:1rem; }
.ds-product-generate {
    margin-top:1rem; display:inline-flex; padding:9px 14px; border-radius:11px;
    background:linear-gradient(110deg,#7c5cff,#5b3fde); color:#fff; font-size:.78rem; font-weight:720;
    box-shadow:0 10px 24px rgba(91,63,222,.22); animation:dsGeneratePress 26s infinite;
}
.ds-product-insights { display:grid; gap:8px; margin-top:.85rem; max-width:560px; }
.ds-product-insights > div {
    padding:10px 12px; border-radius:13px; background:rgba(17,30,70,.72); border:1px solid rgba(127,146,219,.10);
    opacity:0; transform:translateY(6px); animation:dsInsightCard 26s infinite;
}
.ds-product-insights > div:nth-child(2) { animation-delay:.12s; }
.ds-product-insights > div:nth-child(3) { animation-delay:.24s; }
.ds-product-insights b { display:block; color:#f6f8ff; font-size:.78rem; }.ds-product-insights small { display:block; margin-top:2px; color:rgba(199,211,236,.62); font-size:.69rem; }

/* R14: fast branded flash, then move immediately into the product tour. */
@keyframes dsBrandIntro {
    0%, 7% { opacity:1; visibility:visible; }
    9%, 100% { opacity:0; visibility:hidden; }
}
@keyframes dsBrandGlow {
    0%,100% { transform:scale(.92); opacity:.52; }
    50% { transform:scale(1.07); opacity:.86; }
}
@keyframes dsLetterD {
    0% { opacity:0; transform:scale(.62) rotateY(-24deg); filter:blur(3px); }
    1.5%, 5.5% { opacity:1; transform:scale(1) rotateY(0); filter:blur(0); }
    7.5%,100% { opacity:0; transform:scale(1.08); }
}
@keyframes dsLetterRest {
    0%, 2% { opacity:0; transform:translateX(-28px) scale(.92); filter:blur(3px); }
    4%, 6.5% { opacity:1; transform:translateX(0) scale(1); filter:blur(0); }
    8.5%,100% { opacity:0; transform:translateX(10px); }
}
@keyframes dsTagline {
    0%, 4.5% { opacity:0; transform:translate(-50%,7px); }
    5.5%, 7.5% { opacity:1; transform:translate(-50%,0); }
    9%,100% { opacity:0; }
}
@keyframes dsPortalLayer {
    0%, 6% { opacity:0; }
    7%, 12% { opacity:1; }
    14%,100% { opacity:0; }
}
@keyframes dsDoorOpen {
    0%, 6.5% { transform:rotateY(0) scale(.72); opacity:1; }
    7.5% { transform:rotateY(0) scale(1); opacity:1; }
    10.5% { transform:rotateY(-76deg) scale(2.05); opacity:1; }
    13%,100% { transform:rotateY(-94deg) scale(2.65); opacity:0; }
}
@keyframes dsProductReveal {
    0%, 10% { opacity:0; transform:scale(.88); filter:blur(3px); }
    13%, 98% { opacity:1; transform:scale(1); filter:blur(0); }
    100% { opacity:0; transform:scale(.98); }
}

/* Scene sequence (percentages of the 26s loop):
   Upload 15-29 | Ask 29-43 | Visualisation 43-57 |
   Data Quality 57-71 | Data Science Lab 71-85 | Insights 85-99 */
@keyframes dsUploadScene {
    0%, 13% { opacity:0; }
    15%, 27% { opacity:1; transform:translateY(0); }
    29%,100% { opacity:0; }
}
@keyframes dsQuestionScene {
    0%, 27% { opacity:0; }
    29%, 41% { opacity:1; transform:translateY(0); }
    43%,100% { opacity:0; }
}
@keyframes dsChartScene {
    0%, 41% { opacity:0; }
    43%, 55% { opacity:1; transform:translateY(0); }
    57%,100% { opacity:0; }
}
@keyframes dsQualityScene {
    0%, 55% { opacity:0; }
    57%, 69% { opacity:1; transform:translateY(0); }
    71%,100% { opacity:0; }
}
@keyframes dsLabScene {
    0%, 69% { opacity:0; }
    71%, 83% { opacity:1; transform:translateY(0); }
    85%,100% { opacity:0; }
}
@keyframes dsInsightsScene {
    0%, 83% { opacity:0; }
    85%, 97% { opacity:1; transform:translateY(0); }
    99%,100% { opacity:0; }
}

/* Sidebar nav highlight, synced to the active scene */
@keyframes dsNavCursor {
    0%, 14% { top:9px; opacity:0; }
    15%, 42% { top:9px; opacity:1; }
    43%, 56% { top:49px; opacity:1; }
    57%, 70% { top:89px; opacity:1; }
    71%, 84% { top:129px; opacity:1; }
    85%, 98% { top:169px; opacity:1; }
    99%,100% { opacity:0; }
}
@keyframes dsNavWorkspace {
    0%, 14% { background:transparent; color:rgba(181,194,222,.64); }
    15%, 42% { background:rgba(124,92,255,.15); color:#fff; }
    43%,100% { background:transparent; color:rgba(181,194,222,.64); }
}
@keyframes dsNavViz {
    0%, 42% { background:transparent; color:rgba(181,194,222,.64); }
    43%, 56% { background:rgba(124,92,255,.15); color:#fff; }
    57%,100% { background:transparent; color:rgba(181,194,222,.64); }
}
@keyframes dsNavQuality {
    0%, 56% { background:transparent; color:rgba(181,194,222,.64); }
    57%, 70% { background:rgba(124,92,255,.15); color:#fff; }
    71%,100% { background:transparent; color:rgba(181,194,222,.64); }
}
@keyframes dsNavLab {
    0%, 70% { background:transparent; color:rgba(181,194,222,.64); }
    71%, 84% { background:rgba(124,92,255,.15); color:#fff; }
    85%,100% { background:transparent; color:rgba(181,194,222,.64); }
}
@keyframes dsNavInsights {
    0%, 84% { background:transparent; color:rgba(181,194,222,.64); }
    85%, 98% { background:rgba(124,92,255,.15); color:#fff; }
    99%,100% { background:transparent; color:rgba(181,194,222,.64); }
}

/* Upload: progress bar, stepped % readout, dataset preview rows */
@keyframes dsUploadProgress {
    0%, 15% { transform:scaleX(0); }
    25%,100% { transform:scaleX(1); }
}
@keyframes dsPct1 { 0%,15%{opacity:1} 17%,100%{opacity:0} }
@keyframes dsPct2 { 0%,17%{opacity:0} 18%,20%{opacity:1} 22%,100%{opacity:0} }
@keyframes dsPct3 { 0%,21%{opacity:0} 22%,24%{opacity:1} 25%,100%{opacity:0} }
@keyframes dsPct4 { 0%,24%{opacity:0} 25%,29%{opacity:1} 29%,100%{opacity:0} }
@keyframes dsPreviewRow {
    0%, 25% { opacity:0; transform:translateY(4px); }
    27%, 29% { opacity:1; transform:translateY(0); }
    29%,100% { opacity:0; }
}

/* Ask DataSense: typing indicator, then the answer */
@keyframes dsTyping {
    0%, 29% { opacity:0; }
    30%, 34% { opacity:1; }
    36%,100% { opacity:0; }
}
@keyframes dsTypingDot {
    0%,60%,100% { transform:translateY(0); opacity:.55; }
    30% { transform:translateY(-3px); opacity:1; }
}
@keyframes dsAnswer {
    0%, 35% { opacity:0; }
    37%, 41% { opacity:1; }
    43%,100% { opacity:0; }
}

/* Visualisation: skeleton shimmer, then bars grow */
@keyframes dsChartSkeleton {
    0%, 43% { opacity:0; }
    44%, 47% { opacity:1; }
    48%,100% { opacity:0; }
}
@keyframes dsSkeletonShimmer {
    0% { background-position:200% 0; }
    100% { background-position:-200% 0; }
}
@keyframes dsBarGrow {
    0%, 47% { height:0; opacity:.5; }
    53%, 55% { height:var(--bar-h); opacity:1; }
    57%,100% { height:0; opacity:0; }
}

/* Data Quality: ring fill and issue chips */
@keyframes dsQualityRing {
    0%, 58% { --ring:0; }
    67%, 69% { --ring:94; }
    71%,100% { --ring:0; }
}
@keyframes dsChip {
    0%, 59% { opacity:0; transform:translateX(-6px); }
    61%, 69% { opacity:1; transform:translateX(0); }
    71%,100% { opacity:0; }
}

/* Data Science Lab: training progress, then trained result */
@keyframes dsLabProgress {
    0%, 72% { transform:scaleX(0); }
    81%,100% { transform:scaleX(1); }
}
@keyframes dsLabResult {
    0%, 80% { opacity:0; }
    82%, 83% { opacity:1; }
    85%,100% { opacity:0; }
}

/* Insights: KPI cards, generate button press, insight cards */
@keyframes dsKpi {
    0%, 85% { opacity:0; transform:translateY(6px) scale(.96); }
    87%, 97% { opacity:1; transform:translateY(0) scale(1); }
    99%,100% { opacity:0; }
}
@keyframes dsGeneratePress {
    0%, 88% { transform:scale(1); }
    89% { transform:scale(.94); }
    90%, 97% { transform:scale(1); }
}
@keyframes dsInsightCard {
    0%, 89% { opacity:0; transform:translateY(6px); }
    91%, 97% { opacity:1; transform:translateY(0); }
    99%,100% { opacity:0; }
}

@media (max-height:820px) and (min-width:901px){ .ds-brand-d{font-size:126px}.ds-brand-rest span{font-size:62px}.ds-product-chart{height:175px} }
@media (max-height:700px) and (min-width:901px){ .ds-portal-tour{height:clamp(400px,54vh,440px)}.ds-brand-d{font-size:96px}.ds-brand-rest span{font-size:46px}.ds-product-chart{height:145px}.ds-product-heading{font-size:1.2rem}.ds-product-scene{inset:18px 22px}.ds-product-sidebar{padding:16px 12px}.ds-product-brand{margin-bottom:14px} }
@media (max-width:1100px){ .ds-portal-tour{height:520px}.ds-brand-stage{min-width:450px}.ds-brand-d{font-size:120px}.ds-brand-rest span{font-size:56px}.ds-product-sidebar{width:130px;flex-basis:130px}.ds-product-main{padding:22px 24px}.ds-product-scene{inset:22px 24px}.ds-product-kpis{grid-template-columns:1fr 1fr} }
@media (max-width:900px){ .ds-product-quality-row{flex-direction:column;align-items:flex-start;gap:12px} }

/* DELIBERATE DEVIATION FROM PRODUCTION: app.py's own tour CSS has no
   prefers-reduced-motion handling at all — the 26s loop keeps animating
   regardless of the user's OS setting (see the PR description's
   animation inventory and risk list). This prototype task explicitly
   requires respecting prefers-reduced-motion with a USABLE static
   fallback — merely pausing the infinite loop (animation-play-state)
   was tried first and rejected: it freezes on whatever frame happened
   to be showing at pause time, which is often one of the brief
   cross-fade gaps between scenes (just an empty glow, no content).
   Instead, skip straight to one deterministic, fully-readable frame:
   the brand intro/portal-door layers are hidden outright, the product
   frame is forced visible, and only the Insights scene (the most
   summarizing of the six) is shown, statically, with its own
   animations turned off rather than paused mid-flight. */
@media (prefers-reduced-motion: reduce) {
  .ds-tour-progress span { animation: none !important; transform: scaleX(1) !important; }
  .ds-brand-intro, .ds-portal-reveal { display: none !important; }
  .ds-product-demo {
    animation: none !important; opacity: 1 !important; transform: scale(1) !important; filter: none !important;
  }
  .ds-nav-cursor { display: none !important; }
  .ds-nav-insights { animation: none !important; background: rgba(124,92,255,.15) !important; color: #fff !important; }
  .ds-nav-workspace, .ds-nav-viz, .ds-nav-quality, .ds-nav-lab { animation: none !important; }
  .ds-product-scene { display: none !important; }
  .ds-scene-insights {
    display: block !important; animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .ds-product-kpis > div, .ds-product-insights > div {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .ds-product-generate { animation: none !important; transform: scale(1) !important; }
}
