/* Features Grid - 3 Step Process */
.process-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: transparent;
    transition: transform 0.3s ease;
    position: relative;
    /* Clean, no border for steps to keep it airy */
}

/* Badge for numbers 1, 2, 3 */
.step-badge {
    position: absolute;
    top: 15px;
    right: 30px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Hidden by default, nicer if just icon focus? Or show it? Let's show it subtle */
    transition: all 0.3s;
}

.step-item:hover .step-badge {
    opacity: 1;
    top: 10px;
}

.feature-icon-wrapper {
    width: 70px;
    /* Larger */
    height: 70px;
    background: #eff6ff;
    color: var(--primary-color);
    border-radius: 24px;
    /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 2rem;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.15);
    /* Premium Glow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy */
}

.step-item:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.3);
}

.feature-icon-wrapper.success-icon {
    background: #ecfdf5;
    color: var(--success-color);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.15);
}

.step-item:hover .feature-icon-wrapper.success-icon {
    box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.3);
}

.feature-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 200px;
    margin: 0 auto;
}

/* Connecting Arrows */
.step-arrow {
    color: #cbd5e1;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    /* Align with icons */
    animation: slideRight 2s infinite ease-in-out;
}

@keyframes slideRight {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

/* Protection / Stop Resale Section */
.protection-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 50px 40px;
    margin-top: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Subtle background accent for protection section */
.protection-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #ef4444);
}

.protection-header {
    text-align: center;
    margin-bottom: 40px;
}

.protection-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.protection-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.protection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.protection-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 25px;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.protection-card:hover {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.p-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.p-icon-box.blue {
    background: #eff6ff;
    color: #2563eb;
}

.p-icon-box.teal {
    background: #f0fdf4;
    color: #059669;
}

.p-icon-box.red {
    background: #fef2f2;
    color: #ef4444;
}

.p-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.p-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.p-content strong {
    color: var(--text-main);
    font-weight: 600;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .process-steps {
        flex-direction: column;
        gap: 12px;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin-top: 0;
        margin-bottom: 10px;
        animation: none;
        /* Distracting on vertical scroll sometimes */
    }

    .feature-item {
        width: 100%;
        flex-direction: row;
        text-align: left;
        padding: 20px;
        background: white;
        border: 1px solid #f1f5f9;
        border-radius: 16px;
        box-shadow: var(--shadow-card);
    }

    .feature-item .feature-icon-wrapper {
        margin-bottom: 0;
        margin-right: 12px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .feature-item h3 {
        margin-top: 0;
    }

    .feature-item p {
        margin: 0;
        max-width: 100%;
    }

    .protection-grid {
        grid-template-columns: 1fr;
    }

    .protection-section {
        padding: 30px 20px;
    }
}

/* ── Recovery Story Storyboard ── */

/* Hero unified card modifier */
.hero-search-card {
    padding-top: 36px;
    padding-bottom: 28px;
    text-align: center;
}

/* Hero Text Block */
.hero-text-block {
    margin-bottom: 24px;
}

.hero-text-block h1 {
    margin-bottom: 6px;
    font-size: 2.2rem;
}

.hero-text-block p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 auto;
}

.hero-text-block .mock-alert-container {
    margin-bottom: 16px;
}

/* Card divider between story and input */
.card-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 20px 0 24px;
}

body.dark-mode .card-divider {
    border-color: #334155;
}

.recovery-story {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow: visible;
}

body.dark-mode .recovery-story {
    background: rgba(15, 23, 42, 0.5);
    border-color: #1e293b;
}


/* Each step fades in with stagger (slower, more dramatic) */
.rs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0;
    animation: rsStepIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes rsStepIn {
    from { opacity: 0; transform: translateY(10px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scene bubble (the icon container) */
.rs-scene {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rs-scene:hover {
    transform: scale(1.12) rotate(-3deg);
}

/* Scene color themes */
.rs-scene--scan  { background: #eff6ff; }
.rs-scene--db    { background: #f0f9ff; }
.rs-scene--alert { background: #fff7ed; }
.rs-scene--gps   { background: #fdf4ff; }
.rs-scene--found { background: #ecfdf5; }

/* Main icon inside each scene */
.rs-icon-main {
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.rs-scene--scan  .rs-icon-main { color: #2563eb; }
.rs-scene--db    .rs-icon-main { color: #0284c7; }
.rs-scene--alert .rs-icon-main { color: #ea580c; }
.rs-scene--gps   .rs-icon-main { color: #9333ea; }

/* Mini scooter emoji above scan icon */
.rs-scooter-mini {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    animation: scooterRide 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes scooterRide {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-3px); }
}

/* Scan beam line — fires in first 25% of 7.5s cycle */
.rs-scan-beam {
    position: absolute;
    left: 8px; right: 8px;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    top: 20%;
    animation: scanBeam 7.5s ease-in-out 1.2s infinite;
    z-index: 1;
    opacity: 0;
}

@keyframes scanBeam {
    0%     { top: 15%; opacity: 0; }
    4%     { opacity: 0.9; }
    21%    { opacity: 0.9; }
    25%    { top: 82%; opacity: 0; }
    25.1%  { top: 15%; opacity: 0; }
    100%   { top: 15%; opacity: 0; }
}

/* DB ping ripple — fires in slot 2 (delay 1.5s offset from cycle start) */
.rs-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid #0284c7;
    opacity: 0;
    animation: pingRipple 7.5s ease-out 2.7s infinite;
}

@keyframes pingRipple {
    0%    { transform: scale(0.7); opacity: 0; }
    2%    { opacity: 0.7; }
    25%   { transform: scale(1.65); opacity: 0; }
    25.1% { transform: scale(0.7); opacity: 0; }
    100%  { transform: scale(0.7); opacity: 0; }
}

/* Alert pulse red — fires in slot 3 */
.rs-pulse-red {
    animation: pulseRed 7.5s ease-in-out 4.2s infinite;
}

@keyframes pulseRed {
    0%    { color: #ea580c; text-shadow: none; }
    10%   { color: #ef4444; text-shadow: 0 0 14px rgba(239,68,68,0.7); }
    25%   { color: #ea580c; text-shadow: none; }
    100%  { color: #ea580c; text-shadow: none; }
}

/* Alert ring — fires in slot 3 */
.rs-alert-ring {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 16px;
    border: 2px solid #ef4444;
    opacity: 0;
    animation: alertRing 7.5s ease-out 4.2s infinite;
}

@keyframes alertRing {
    0%    { transform: scale(0.8); opacity: 0; }
    2%    { opacity: 0.75; }
    25%   { transform: scale(1.7); opacity: 0; }
    25.1% { transform: scale(0.8); opacity: 0; }
    100%  { transform: scale(0.8); opacity: 0; }
}

/* GPS bounce pin — fires in slot 4 */
.rs-bounce-pin {
    animation: bouncePin 7.5s ease-in-out 5.7s infinite;
    color: #9333ea;
}

@keyframes bouncePin {
    0%    { transform: translateY(0); }
    8%    { transform: translateY(-7px); }
    14%   { transform: translateY(-3px); }
    22%   { transform: translateY(-6px); }
    25%   { transform: translateY(0); }
    100%  { transform: translateY(0); }
}

/* GPS map dot shadow — fires in slot 4 */
.rs-map-dot {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 4px;
    background: rgba(147, 51, 234, 0.25);
    border-radius: 50%;
    animation: mapShadow 7.5s ease-in-out 5.7s infinite;
}

@keyframes mapShadow {
    0%    { transform: translateX(-50%) scaleX(1); opacity: 0.5; }
    8%    { transform: translateX(-50%) scaleX(0.4); opacity: 0.1; }
    25%   { transform: translateX(-50%) scaleX(1); opacity: 0.5; }
    100%  { transform: translateX(-50%) scaleX(1); opacity: 0.5; }
}

/* Found scene — initial entry + recurring glow in slot 5 */
.rs-scooter-found {
    font-size: 1.4rem;
    top: auto; left: auto;
    position: relative;
    transform: scale(0);
    opacity: 0;
    animation: foundBounce 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s both;
}

@keyframes foundBounce {
    0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
    70%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.rs-icon-found {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 1rem;
    color: #059669;
    background: white;
    border-radius: 50%;
    padding: 1px;
    box-shadow: 0 2px 6px rgba(5,150,105,0.3);
    animation: checkPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.8s both;
}

@keyframes checkPop {
    0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
    70%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Found scene recurring glow — slot 5 */
.rs-scene--found {
    background: #ecfdf5;
    animation: foundGlow 7.5s ease-in-out 7.2s infinite;
}

@keyframes foundGlow {
    0%    { background: #ecfdf5; box-shadow: none; }
    12%   { background: #d1fae5; box-shadow: 0 0 18px rgba(5,150,105,0.35); }
    25%   { background: #ecfdf5; box-shadow: none; }
    100%  { background: #ecfdf5; box-shadow: none; }
}

/* Arrow between steps */
.rs-arrow {
    color: #cbd5e1;
    font-size: 0.85rem;
    flex-shrink: 0;
    opacity: 0;
    animation: rsStepIn 0.7s ease forwards;
    animation-delay: var(--delay, 0s);
    display: flex;
    align-items: center;
}

/* Arrow nudge — slow continuous */
@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); opacity: 0.35; }
    50%       { transform: translateX(3px); opacity: 0.85; }
}

.rs-arrow i {
    animation: arrowSlide 1.5s ease-in-out infinite;
}

/* Step label below */
.rs-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {

    /* Hero card: reduce top/bottom padding on mobile */
    .hero-search-card {
        padding: 24px 20px 20px !important;
    }

    /* Hero text: tighter on mobile */
    .hero-text-block {
        margin-bottom: 18px;
    }

    .hero-text-block h1 {
        font-size: 1.8rem;
        margin-bottom: 4px;
    }

    .hero-text-block p {
        font-size: 0.95rem;
    }

    /* Mock alert: slightly smaller */
    .mock-alert-container {
        padding: 5px 12px;
        margin-bottom: 12px;
    }

    /* Recovery story: tighter gaps, smaller bubbles */
    .recovery-story {
        gap: 5px;
        padding: 12px 6px;
    }

    /* Scene bubbles: smaller on mobile */
    .rs-scene {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .rs-icon-main {
        font-size: 1.25rem;
    }

    /* Arrows: smaller */
    .rs-arrow {
        font-size: 0.7rem;
    }

    /* Result icons (ok + found): scale down too */
    .flow-icon--ok,
    .flow-icon--stolen,
    .rs-icon-found {
        font-size: 1rem;
    }

    /* Labels: smaller */
    .rs-label {
        font-size: 0.55rem;
        letter-spacing: 0.03em;
    }

    /* Scooter emoji on scan step: adjust position */
    .rs-scooter-mini {
        font-size: 0.75rem;
        top: -8px;
    }
}

/* Very small phones (< 380px): hide labels to save space */
@media (max-width: 380px) {
    .rs-label {
        display: none;
    }

    .recovery-story {
        gap: 4px;
        padding: 12px 4px;
    }

    .rs-scene {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .rs-icon-main {
        font-size: 1.1rem;
    }

    .hero-text-block h1 {
        font-size: 1.6rem;
    }

    .rs-arrow {
        font-size: 0.6rem;
    }
}
