/* ========================================
   OptiMix Landing Page - Visual Enhancements
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Enhanced Shadows */
    --shadow-card-enhanced: 0 4px 20px -4px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px -10px rgba(79, 70, 229, 0.3);
    --shadow-glow-strong: 0 0 60px -15px rgba(79, 70, 229, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    --gradient-cta: linear-gradient(135deg, #1f2937 0%, #111827 100%);

    /* Background Patterns */
    --pattern-dots: radial-gradient(circle, rgba(79, 70, 229, 0.08) 1px, transparent 1px);
    --pattern-grid: linear-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.05) 1px, transparent 1px);
}

/* ========================================
   Reveal on Scroll Animations
   ======================================== */
.reveal-initial {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for card grids */
.reveal-initial.stagger-1 {
    transition-delay: 0.1s;
}

.reveal-initial.stagger-2 {
    transition-delay: 0.2s;
}

.reveal-initial.stagger-3 {
    transition-delay: 0.3s;
}

.reveal-initial.stagger-4 {
    transition-delay: 0.4s;
}

.reveal-initial.stagger-5 {
    transition-delay: 0.5s;
}

/* Scale reveal animation */
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-active.reveal-scale {
    opacity: 1;
    transform: scale(1);
}

/* Left/Right reveal */
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-active.reveal-left,
.reveal-active.reveal-right {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Background Patterns
   ======================================== */
.bg-pattern-dots {
    background-image: var(--pattern-dots);
    background-size: 24px 24px;
}

.bg-pattern-grid {
    background-image: var(--pattern-grid);
    background-size: 40px 40px;
}

/* Subtle noise texture overlay */
.bg-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   Card Enhancements
   ======================================== */
.card-enhanced {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), transparent, rgba(79, 70, 229, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-enhanced:hover {
    transform: translateY(-4px);
}

.card-enhanced:hover::before {
    opacity: 1;
}

/* Glow effect for highlighted cards */
.card-glow {
    box-shadow: var(--shadow-card-enhanced), var(--shadow-glow);
}

.card-glow:hover {
    box-shadow: var(--shadow-card-enhanced), var(--shadow-glow-strong);
}

/* ========================================
   Button Enhancements
   ======================================== */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-enhanced:hover::after {
    transform: translateX(100%);
}

/* Ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.btn-ripple:active::before {
    transform: scale(2);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}

/* ========================================
   Primary Gradient Button
   ======================================== */
.btn-primary-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #4338ca 0%, #5b21b6 100%);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-primary-gradient:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px 0 rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Secondary outline button upgrade */
.btn-secondary-outline {
    background: #f0f4ff;
    border: 1.5px solid #a5b8ff;
    color: #4338ca;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-secondary-outline:hover {
    background: #e0e8ff;
    border-color: #7d96ff;
    color: #3730a3;
    box-shadow: 0 2px 8px 0 rgba(79, 70, 229, 0.15);
    transform: translateY(-1px);
}

/* ========================================
   Gradient Text
   ======================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Floating Animation
   ======================================== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float 8s ease-in-out infinite;
}

.animate-float-fast {
    animation: float 4s ease-in-out infinite;
}

/* ========================================
   Pulse Glow Animation
   ======================================== */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px -5px rgba(79, 70, 229, 0.4);
    }

    50% {
        box-shadow: 0 0 30px -5px rgba(79, 70, 229, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* ========================================
   Header Enhancements
   ======================================== */
.header-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

.header-shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Input & Form Enhancements
   ======================================== */
.input-enhanced {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-enhanced:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ========================================
   Testimonial Card Enhancements
   ======================================== */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px) rotate(0.5deg);
}

/* Staggered testimonial cards */
.testimonial-card:nth-child(1) {
    transition-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    transition-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* ========================================
   Pricing Card Enhancements
   ======================================== */
.pricing-featured {
    position: relative;
    background: linear-gradient(160deg, #eef2ff 0%, #e0e8ff 100%) !important;
    box-shadow: 0 0 40px -10px rgba(79, 70, 229, 0.35), 0 4px 20px -4px rgba(79, 70, 229, 0.2) !important;
}

.pricing-featured::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #4f46e5);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Pricing section tinted background */
.pricing-section-bg {
    background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 40%, #ffffff 60%, #f5f7ff 100%);
}

/* ========================================
   Reduced Motion Preference
   ======================================== */
.reduced-motion .reveal-initial,
.reduced-motion .reveal-active {
    opacity: 1;
    transform: none;
    transition: none;
}

.reduced-motion .card-enhanced:hover,
.reduced-motion .testimonial-card:hover,
.reduced-motion .btn-enhanced:hover {
    transform: none;
}

/* ========================================
   Smooth Scrolling
   ======================================== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Mobile Menu Styles
   ======================================== */
@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }

    .mobile-menu.active {
        display: block;
    }
}

/* ========================================
   Touch-Friendly Improvements
   ======================================== */
@media (pointer: coarse) {

    .btn-enhanced,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   Section Dividers
   ======================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.2), transparent);
}

.section-divider-wave {
    overflow: hidden;
    line-height: 0;
}

.section-divider-wave svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

.section-divider-wave .shape-fill {
    fill: #f9fafb;
}

/* Dark mode section dividers */
.bg-gray-900+.section-divider-wave .shape-fill,
.bg-gray-800+.section-divider-wave .shape-fill {
    fill: #1f2937;
}

/* ========================================
   Analytical SVG Backgrounds & Graphs
   ======================================== */
.analytical-canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.analytical-svg {
    width: 100%;
    height: 100%;
}

.a-grid line {
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 1;
}

.a-axis {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1.5;
}

.a-axis-faint {
    stroke: rgba(255, 255, 255, 0.02);
    stroke-width: 1;
}

.a-curve-primary {
    stroke: #6366F1;
    stroke-width: 2;
    fill: none;
}

.a-curve-secondary {
    stroke: #818CF8;
    stroke-width: 1.5;
    fill: none;
}

.a-curve-tertiary {
    stroke: #4F46E5;
    stroke-width: 1.5;
    fill: none;
}

.a-curve-dashed {
    stroke-dasharray: 4 4;
}

.a-band-primary {
    fill: rgba(99, 102, 241, 0.03);
    stroke: none;
}

.a-point circle {
    fill: #818CF8;
    opacity: 0.5;
}

/* ========================================
   Semantic Headings (Fix for Shrunk Fonts)
   ======================================== */
.h2-intimate {
    font-size: 1.875rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: #ffffff;
}

@media (min-width: 768px) {
    .h2-intimate {
        font-size: 3rem;
    }
}

.h2-climax {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: #ffffff;
}

@media (min-width: 768px) {
    .h2-climax {
        font-size: 3rem;
    }
}

.h2-standard {
    font-size: 1.875rem;
    font-weight: 700;
    color: #ffffff;
}

@media (min-width: 768px) {
    .h2-standard {
        font-size: 2.25rem;
    }
}

.h2-quiet {
    font-size: 1.875rem;
    font-weight: 700;
    color: #ffffff;
}

@media (min-width: 768px) {
    .h2-quiet {
        font-size: 2.25rem;
    }
}

.h2-coda {
    font-size: 1.875rem;
    font-weight: 700;
    color: #ffffff;
}

@media (min-width: 768px) {
    .h2-coda {
        font-size: 2.25rem;
    }
}

/* ========================================
   Pricing Card Layout & Padding Adjustments
   ======================================== */
.pricing-card-tight {
    padding: 2rem; /* Fixes cutoff text by adding back the missing padding */
}

.pricing-badge-integrated {
    position: absolute; /* Takes badge out of document flow to align middle card height */
    top: 0;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 20;
}

/* ========================================
   Data-led Motion System
   ======================================== */
html {
    scroll-behavior: smooth;
}

.journey-progress {
    --page-progress: 0;
    position: fixed;
    inset: 0 0 auto;
    z-index: 70;
    pointer-events: none;
}

.journey-progress__track {
    height: 2px;
    background: rgba(255, 255, 255, 0.045);
}

.journey-progress__track span {
    display: block;
    width: calc(var(--page-progress) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #a5b4fc 70%, #ffffff);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.7);
    transition: width 80ms linear;
}

.journey-progress__status {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(14px);
    color: #b6b6c2;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.journey-progress__pulse {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #818cf8;
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.55);
    animation: journey-pulse 2.2s ease-out infinite;
}

@keyframes journey-pulse {
    70%, 100% { box-shadow: 0 0 0 7px rgba(129, 140, 248, 0); }
}

/* Hero analysis comes into focus */
.hero-line-1,
.hero-line-2 {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
}

.motion-ready .hero-line-1 {
    animation: hero-copy-in 0.85s 0.08s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion-ready .hero-line-2 {
    animation: hero-copy-in 0.95s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-copy-in {
    to { opacity: 1; transform: translateY(0); }
}

.hero-grid line {
    opacity: 0;
    animation: hero-grid-in 1s 0.25s ease-out forwards;
}

@keyframes hero-grid-in { to { opacity: 1; } }

.hero-regression-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.7));
    animation: hero-line-draw 1.8s 0.45s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes hero-line-draw { to { stroke-dashoffset: 0; } }

.hero-confidence-band {
    opacity: 0;
    animation: hero-band-in 1.2s 1.25s ease-out forwards;
}

@keyframes hero-band-in { to { opacity: 1; } }

.hero-points circle {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: hero-point-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-points circle:nth-child(1) { animation-delay: 0.38s; }
.hero-points circle:nth-child(2) { animation-delay: 0.46s; }
.hero-points circle:nth-child(3) { animation-delay: 0.54s; }
.hero-points circle:nth-child(4) { animation-delay: 0.62s; }
.hero-points circle:nth-child(5) { animation-delay: 0.70s; }
.hero-points circle:nth-child(6) { animation-delay: 0.78s; }
.hero-points circle:nth-child(7) { animation-delay: 0.86s; }
.hero-points circle:nth-child(8) { animation-delay: 0.94s; }
.hero-points circle:nth-child(9) { animation-delay: 1.02s; }
.hero-points circle:nth-child(10) { animation-delay: 1.10s; }
.hero-points circle:nth-child(11) { animation-delay: 1.18s; }

@keyframes hero-point-in {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 0.65; transform: scale(1); }
}

.analysis-sweep {
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(280px, 42%, 460px);
    height: 100%;
    opacity: 0;
    background: linear-gradient(90deg, transparent 0 45%, rgba(129, 140, 248, 0.14) 50%, transparent 55%);
    transform: translateX(-70%);
    animation: analysis-sweep 5.5s 2s ease-in-out infinite;
}

@keyframes analysis-sweep {
    0%, 12% { opacity: 0; transform: translateX(-70%); }
    22% { opacity: 1; }
    58% { opacity: 0.75; }
    72%, 100% { opacity: 0; transform: translateX(70%); }
}

/* Interactive dashboard */
.dashboard-stage {
    --tilt-x: 7deg;
    --tilt-y: 0deg;
    --glow-x: 50%;
    --glow-y: 45%;
    margin-top: 1.5rem;
}

.dashboard-shell {
    position: relative;
    padding: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 1rem;
    background: rgba(20, 20, 24, 0.72);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.04);
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(0.965);
    transform-style: preserve-3d;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 320ms ease;
    will-change: transform;
}

.dashboard-stage.motion-visible .dashboard-shell {
    animation: dashboard-arrive 1s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dashboard-arrive {
    from { opacity: 0; transform: perspective(1100px) rotateX(12deg) scale(0.9) translateY(36px); }
}

.dashboard-shell:hover {
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.62), 0 0 45px rgba(99, 102, 241, 0.13);
}

.dashboard-image {
    display: block;
    transform: scale(1.018);
    transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
}

.dashboard-shell:hover .dashboard-image {
    transform: scale(1.045) translate3d(0, -0.7%, 0);
    filter: saturate(1.08) brightness(1.04);
}

.dashboard-glow {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--glow-x) var(--glow-y), rgba(129, 140, 248, 0.14), transparent 62%);
    mix-blend-mode: screen;
}

.dashboard-scan {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(129, 140, 248, 0.13) 49%, rgba(255, 255, 255, 0.2) 50%, transparent 51%);
    transform: translateY(-110%);
}

.dashboard-stage.is-live .dashboard-scan {
    animation: dashboard-scan 2.5s 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes dashboard-scan { to { transform: translateY(110%); } }

.dashboard-kpis {
    position: absolute;
    z-index: 6;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.15rem;
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
    pointer-events: none;
}

.dashboard-kpi {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 8.5rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.7rem;
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(12px);
}

.dashboard-stage.is-live .dashboard-kpi {
    animation: dashboard-kpi-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-stage.is-live .dashboard-kpi:nth-child(2) { animation-delay: 0.12s; }
.dashboard-stage.is-live .dashboard-kpi:nth-child(3) { animation-delay: 0.24s; }

@keyframes dashboard-kpi-in { to { opacity: 1; transform: translateY(0); } }

.dashboard-kpi__label {
    color: #8f8f9d;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-kpi strong { color: #fff; font-size: 0.92rem; }

.dashboard-kpi--action {
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    color: #c7d2fe;
    font-size: 0.7rem;
}

.dashboard-kpi__signal {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.75);
}

.dashboard-focus {
    position: absolute;
    z-index: 7;
    top: 24%;
    right: 7%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(129, 140, 248, 0.32);
    border-radius: 0.6rem;
    background: rgba(26, 25, 45, 0.88);
    color: #a5b4fc;
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    box-shadow: 0 0 26px rgba(99, 102, 241, 0.18);
}

.dashboard-focus strong { color: #fff; font-size: 0.72rem; }
.dashboard-stage.is-live .dashboard-focus { animation: dashboard-kpi-in 0.65s 0.85s ease-out forwards; }

/* Attribution resolves while the story scrolls */
.attribution-resolver {
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(23, 23, 29, 0.95), rgba(12, 12, 15, 0.92));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}

.attribution-resolver.motion-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.attribution-resolver[data-state="resolved"] {
    border-color: rgba(129, 140, 248, 0.28);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.08);
}

.resolver-header,
.resolver-sale,
.resolver-channel__meta,
.resolver-total,
.resolver-budget {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.resolver-header {
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.resolver-eyebrow {
    color: #818cf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.resolver-header h3 {
    margin-top: 0.2rem;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    transition: opacity 0.25s ease;
}

.resolver-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    font-size: 0.62rem;
    transition: color 0.4s ease, background 0.4s ease;
}

.resolver-status i {
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 9px currentColor;
}

.attribution-resolver[data-state="resolved"] .resolver-status {
    color: #34d399;
    background: rgba(52, 211, 153, 0.08);
}

.resolver-sale {
    margin: 1rem 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.025);
    color: #8f8f9d;
    font-size: 0.75rem;
}

.resolver-sale strong { color: #fff; font-size: 1rem; }
.resolver-claims { display: grid; gap: 0.85rem; }
.resolver-channel__meta { margin-bottom: 0.35rem; color: #b6b6c2; font-size: 0.7rem; }
.resolver-channel__meta strong { color: #ef4444; font-weight: 500; transition: opacity 0.4s ease; }
.attribution-resolver[data-state="resolved"] .resolver-channel__meta strong { opacity: 0.38; text-decoration: line-through; }

.resolver-bar {
    height: 0.48rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
}

.resolver-bar span {
    display: block;
    width: var(--claim);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.48), rgba(251, 146, 60, 0.82));
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.16);
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1), background 0.6s ease, box-shadow 0.6s ease;
}

.attribution-resolver[data-state="resolved"] .resolver-bar span {
    width: var(--truth);
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.26);
}

.resolver-total {
    gap: 0.75rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.resolver-total > span:not(.resolver-total__arrow) { display: flex; flex: 1; flex-direction: column; gap: 0.15rem; }
.resolver-total small { color: #71717e; font-size: 0.57rem; text-transform: uppercase; letter-spacing: 0.06em; }
.resolver-total strong { color: #fff; font-size: 1rem; }
.resolver-total__platform strong { color: #f87171; }
.resolver-total__truth { opacity: 0.36; transition: opacity 0.5s ease, transform 0.5s ease; transform: translateX(-6px); }
.resolver-total__truth strong { color: #a5b4fc; }
.resolver-total__arrow { color: #565662; }
.attribution-resolver[data-state="resolved"] .resolver-total__truth { opacity: 1; transform: translateX(0); }
.attribution-resolver[data-state="resolved"] .resolver-total__platform { opacity: 0.4; }

.resolver-budget {
    gap: 0.45rem;
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
    opacity: 0;
    color: #71717e;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: max-height 0.65s ease, margin 0.65s ease, padding 0.65s ease, opacity 0.45s ease;
}

.attribution-resolver[data-state="resolved"] .resolver-budget {
    max-height: 4rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    opacity: 1;
}

.budget-pill { padding: 0.38rem 0.5rem; border-radius: 0.45rem; text-transform: none; }
.budget-pill--down { color: #fca5a5; background: rgba(239, 68, 68, 0.08); }
.budget-pill--up { color: #86efac; background: rgba(34, 197, 94, 0.08); }
.budget-flow { position: relative; flex: 1; height: 1px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.budget-flow i { position: absolute; top: -1px; width: 0.28rem; height: 0.28rem; border-radius: 50%; background: #818cf8; animation: budget-flow 1.8s ease-in-out infinite; }
@keyframes budget-flow { from { left: -0.3rem; } to { left: 100%; } }

.problem-step {
    position: relative;
    display: flex;
    min-height: 68vh;
    flex-direction: column;
    justify-content: center;
    opacity: 0.42;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.problem-step.is-active { opacity: 1; transform: translateX(-4px); }
.problem-step__number {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    margin-bottom: 1.1rem;
    place-items: center;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 50%;
    color: #818cf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.62rem;
}

/* Living feature visualizations */
.feature-motion-card .spotlight-content { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.45s ease; }
.feature-motion-card:hover .spotlight-content { transform: translateY(-4px); }
.feature-orbit { opacity: 0.55; transition: opacity 0.4s ease; }
.feature-motion-card.motion-visible .feature-orbit--outer { animation: orbit-breathe 5.2s ease-in-out infinite; }
.feature-motion-card.motion-visible .feature-orbit--middle { animation: orbit-breathe 5.2s 0.5s ease-in-out infinite reverse; }
.feature-motion-card.motion-visible .feature-orbit--inner { animation: orbit-breathe 5.2s 1s ease-in-out infinite; }
@keyframes orbit-breathe { 50% { transform: scale(1.05); opacity: 0.95; } }

.feature-curve-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.feature-motion-card.motion-visible .feature-curve-line { animation: feature-line-draw 1.4s 0.3s ease-out forwards; }
@keyframes feature-line-draw { to { stroke-dashoffset: 0; } }
.feature-optimal-point { transform-box: fill-box; transform-origin: center; }
.feature-motion-card.motion-visible .feature-optimal-point { animation: optimal-point 2.2s 1.1s ease-out infinite; }
@keyframes optimal-point { 0%, 100% { transform: scale(1); opacity: 1; } 45% { transform: scale(2.1); opacity: 0.45; } }

.feature-budget-bars rect { transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0.12); }
.feature-motion-card.motion-visible .feature-budget-bars rect { animation: budget-bar-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.feature-motion-card.motion-visible .feature-budget-bars rect:nth-child(2) { animation-delay: 0.08s; }
.feature-motion-card.motion-visible .feature-budget-bars rect:nth-child(3) { animation-delay: 0.16s; }
.feature-motion-card.motion-visible .feature-budget-bars rect:nth-child(4) { animation-delay: 0.24s; }
.feature-motion-card.motion-visible .feature-budget-bars rect:nth-child(5) { animation-delay: 0.32s; }
@keyframes budget-bar-rise { to { transform: scaleY(1); } }
.feature-motion-card--bars:hover .feature-budget-bars rect:nth-child(1),
.feature-motion-card--bars:hover .feature-budget-bars rect:nth-child(3) { opacity: 0.22; transform: scaleY(0.72); transition: transform 0.5s ease, opacity 0.5s ease; }
.feature-motion-card--bars:hover .feature-budget-bars rect:nth-child(4) { filter: drop-shadow(0 0 5px #818cf8); transform: scaleY(1.08); transition: transform 0.5s ease; }

/* Pricing and CTA feedback */
.motion-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.motion-cta::after {
    content: '→';
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-cta:hover { transform: translateY(-2px); filter: brightness(1.05); }
.motion-cta:hover::after { transform: translateX(4px); }
.motion-cta:active { transform: translateY(0) scale(0.98); }

.pricing-plan-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.pricing-plan-card:hover { transform: translateY(-8px); }
.pricing-plan-card li svg path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.7s 0.25s ease-out; }
.pricing-plan-card.motion-visible li svg path { stroke-dashoffset: 0; }

.pricing-plan-card--featured::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: 0;
    border: 1px solid rgba(129, 140, 248, 0.45);
    border-radius: inherit;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.1);
    pointer-events: none;
    animation: featured-plan-glow 3.4s ease-in-out infinite;
}

@keyframes featured-plan-glow {
    50% { border-color: rgba(165, 180, 252, 0.75); box-shadow: 0 0 38px rgba(99, 102, 241, 0.22); }
}

@media (max-width: 767px) {
    .journey-progress__status { display: none; }
    .analysis-sweep { width: 72%; opacity: 0.5; }
    .dashboard-stage { --tilt-x: 3deg; }
    .dashboard-kpis { left: 0.75rem; right: 0.75rem; bottom: 0.7rem; gap: 0.35rem; }
    .dashboard-kpi { min-width: 0; padding: 0.45rem 0.55rem; }
    .dashboard-kpi--action { display: none; }
    .dashboard-kpi__label { font-size: 0.48rem; }
    .dashboard-kpi strong { font-size: 0.7rem; }
    .dashboard-focus { display: none; }
    .problem-step { min-height: auto; padding: 4rem 0; opacity: 1; }
    .attribution-steps { order: -1; }
    .attribution-resolver { position: relative; top: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-line-1,
    .hero-line-2,
    .hero-points circle,
    .hero-confidence-band,
    .attribution-resolver,
    .dashboard-kpi,
    .dashboard-focus {
        opacity: 1 !important;
        transform: none !important;
    }
    .hero-regression-line,
    .feature-curve-line,
    .pricing-plan-card li svg path { stroke-dashoffset: 0 !important; }
    .analysis-sweep,
    .dashboard-scan,
    .journey-progress__pulse,
    .budget-flow i { display: none !important; }
    .dashboard-shell,
    .dashboard-image,
    .feature-motion-card .spotlight-content,
    .pricing-plan-card,
    .motion-cta { transform: none !important; }
}
