/**
 * Finlo — top marquee stripe
 * Premium: frosted glass, ambient glow, animated highlights, shine hover, pulsing dots
 */
:root {
    --finlo-stripe-h: 0px;
    --finlo-accent: #28a745;
    --finlo-accent-light: #34ce57;
}

html.finlo-has-service-stripe {
    --finlo-stripe-h: 42px;
}

@media (max-width: 576px) {
    html.finlo-has-service-stripe {
        --finlo-stripe-h: 40px;
    }
}

#header.header {
    top: var(--finlo-stripe-h);
}

html.finlo-has-service-stripe main .article-hero,
html.finlo-has-service-stripe .article-hero {
    padding-top: calc(140px + var(--finlo-stripe-h)) !important;
}

html.finlo-has-service-stripe .hero {
    padding-top: calc(100px + var(--finlo-stripe-h)) !important;
}

@media (max-width: 768px) {
    html.finlo-has-service-stripe main .article-hero,
    html.finlo-has-service-stripe .article-hero {
        padding-top: calc(120px + var(--finlo-stripe-h)) !important;
    }
}

/* Bar: frosted + depth */
.finlo-service-stripe {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    height: var(--finlo-stripe-h, 42px);
    min-height: 38px;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        rgba(18, 24, 20, 0.88) 0%,
        rgba(8, 11, 9, 0.92) 100%
    );
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    border-bottom: 1px solid rgba(52, 206, 87, 0.28);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 50px -10px rgba(40, 167, 69, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.07) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.11),
        inset 0 -1px 0 rgba(52, 206, 87, 0.08);
}

@supports not (backdrop-filter: blur(1px)) {
    .finlo-service-stripe {
        background: linear-gradient(180deg, #151c18 0%, #0a0d0b 100%);
    }
}

/* Soft brand wash — slow, not loud */
.finlo-service-stripe::before {
    content: '';
    position: absolute;
    inset: -35% -20%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 70% at 20% 45%, rgba(40, 167, 69, 0.28) 0%, transparent 58%),
        radial-gradient(ellipse 50% 65% at 82% 55%, rgba(52, 206, 87, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 40% 55% at 50% 100%, rgba(30, 126, 52, 0.15) 0%, transparent 50%);
    animation: finloStripeWash 22s ease-in-out infinite alternate;
    opacity: 0.9;
}

@keyframes finloStripeWash {
    0% {
        transform: translate(-2%, 0) scale(1);
    }
    100% {
        transform: translate(3%, -1%) scale(1.04);
    }
}

/* Top highlight — slow traveling gleam */
.finlo-service-stripe::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(255, 255, 255, 0.35) 48%,
        rgba(52, 206, 87, 0.65) 50%,
        rgba(255, 255, 255, 0.3) 52%,
        rgba(255, 255, 255, 0.08) 65%,
        transparent 100%
    );
    background-size: 200% 100%;
    opacity: 0.92;
    animation: finloTopGleam 11s ease-in-out infinite;
}

@keyframes finloTopGleam {
    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0.75;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

.finlo-marquee__viewport {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 4%,
        black 96%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 4%,
        black 96%,
        transparent 100%
    );
}

@media (hover: hover) {
    .finlo-marquee__viewport:hover .finlo-marquee__track {
        animation-play-state: paused;
    }
}

.finlo-marquee__track {
    display: flex;
    width: max-content;
    align-items: center;
    will-change: transform;
    animation: finloMarqueeX 56s linear infinite;
}

@keyframes finloMarqueeX {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .finlo-service-stripe::before,
    .finlo-service-stripe::after {
        animation: none !important;
    }

    .finlo-service-stripe::after {
        background-position: 50% 50%;
        opacity: 0.85;
    }

    .finlo-marquee__accent::before {
        animation: none !important;
    }

    @supports ((-webkit-background-clip: text) or (background-clip: text)) {
        .finlo-marquee__accent {
            animation: none !important;
            background-position: 50% 50% !important;
        }
    }

    .finlo-marquee__link::after {
        display: none;
    }

    .finlo-marquee__track {
        animation: none;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        padding: 4px 12px;
        box-sizing: border-box;
    }

    .finlo-marquee__segment[aria-hidden='true'] {
        display: none;
    }

    .finlo-marquee__segment {
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 4px;
    }
}

.finlo-marquee__segment {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0 14px;
    padding: 0 34px;
    white-space: nowrap;
}

/* Separators — hairline + soft glow */
.finlo-marquee__sep {
    display: inline-block;
    width: 1px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(52, 206, 87, 0.55) 50%,
        transparent 100%
    );
    opacity: 0.85;
    box-shadow: 0 0 12px rgba(52, 206, 87, 0.25);
}

.finlo-marquee__link {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    overflow: hidden;
    text-decoration: none;
    color: rgba(248, 250, 249, 0.94);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 5px 14px;
    margin: -5px -10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition:
        background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.25s ease;
}

/* Specular sweep on hover (behind text) */
.finlo-marquee__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 38%,
        rgba(255, 255, 255, 0.14) 49%,
        rgba(125, 255, 192, 0.08) 50%,
        transparent 62%,
        transparent 100%
    );
    transform: translateX(-120%) skewX(-12deg);
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    opacity: 0.85;
}

.finlo-marquee__link:hover::after,
.finlo-marquee__link:focus-visible::after {
    transform: translateX(120%) skewX(-12deg);
}

.finlo-marquee__link:hover,
.finlo-marquee__link:focus-visible {
    outline: none;
    background: linear-gradient(
        135deg,
        rgba(40, 167, 69, 0.14) 0%,
        rgba(25, 55, 38, 0.35) 100%
    );
    border-color: rgba(52, 206, 87, 0.35);
    box-shadow:
        0 0 0 1px rgba(52, 206, 87, 0.08),
        0 4px 24px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(40, 167, 69, 0.1);
    transform: translateY(-0.5px);
}

.finlo-marquee__link:focus-visible {
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.4);
}

/* Titles: dot + site greens (dot stays solid so gradient text still works) */
.finlo-marquee__accent {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    color: var(--finlo-accent);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.finlo-marquee__accent::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 35%,
        rgba(255, 255, 255, 0.4),
        var(--finlo-accent-light) 45%,
        var(--finlo-accent) 100%
    );
    box-shadow:
        0 0 10px rgba(52, 206, 87, 0.5),
        0 0 20px rgba(40, 167, 69, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: finloDotPulse 3s ease-in-out infinite;
}

@keyframes finloDotPulse {
    0%,
    100% {
        opacity: 1;
        box-shadow:
            0 0 10px rgba(52, 206, 87, 0.5),
            0 0 20px rgba(40, 167, 69, 0.2);
    }
    50% {
        opacity: 0.95;
        box-shadow:
            0 0 16px rgba(52, 206, 87, 0.65),
            0 0 28px rgba(40, 167, 69, 0.35);
    }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .finlo-marquee__accent {
        background: linear-gradient(
            135deg,
            var(--finlo-accent-light) 0%,
            var(--finlo-accent) 55%,
            #1e7e34 100%
        );
        background-size: 140% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
        animation: finloTitleShimmer 8s ease-in-out infinite alternate;
    }
}

@keyframes finloTitleShimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.finlo-marquee__link:hover .finlo-marquee__accent::before,
.finlo-marquee__link:focus-visible .finlo-marquee__accent::before {
    box-shadow: 0 0 14px rgba(94, 232, 130, 0.55);
    transform: scale(1.05);
}

.finlo-marquee__link:hover .finlo-marquee__accent,
.finlo-marquee__link:focus-visible .finlo-marquee__accent {
    color: var(--finlo-accent-light);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .finlo-marquee__link:hover .finlo-marquee__accent,
    .finlo-marquee__link:focus-visible .finlo-marquee__accent {
        background: linear-gradient(
            135deg,
            #5ee88a 0%,
            var(--finlo-accent-light) 45%,
            var(--finlo-accent) 100%
        );
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 0 10px rgba(52, 206, 87, 0.35));
    }
}

.finlo-marquee__rest {
    position: relative;
    z-index: 1;
    color: rgba(218, 226, 222, 0.78);
    font-weight: 400;
}

.finlo-marquee__link:hover .finlo-marquee__rest {
    color: rgba(245, 248, 246, 0.95);
}

@media (max-width: 992px) {
    .finlo-marquee__link {
        font-size: 12px;
        padding: 5px 12px;
        margin: -5px -8px;
    }

    .finlo-marquee__segment {
        padding: 0 24px;
        gap: 0 10px;
    }
}

@media (max-width: 576px) {
    .finlo-marquee__rest {
        display: none;
    }

    .finlo-marquee__link .finlo-marquee__accent {
        font-size: 11px;
        gap: 0.35em;
    }

    .finlo-marquee__accent::before {
        width: 5px;
        height: 5px;
    }

    .finlo-marquee__segment {
        padding: 0 20px;
        gap: 0 8px;
    }

    .finlo-marquee__sep {
        height: 12px;
    }
}

@media (max-width: 480px) {
    html.finlo-has-service-stripe {
        --finlo-stripe-h: 38px;
    }

    .finlo-marquee__segment {
        padding: 0 14px;
        gap: 0 6px;
    }

    .finlo-marquee__link {
        padding: 4px 10px;
        margin: -4px -6px;
        font-size: 11px;
    }

    .finlo-marquee__viewport {
        mask-image: linear-gradient(
            90deg,
            transparent 0%,
            black 2%,
            black 98%,
            transparent 100%
        );
        -webkit-mask-image: linear-gradient(
            90deg,
            transparent 0%,
            black 2%,
            black 98%,
            transparent 100%
        );
    }
}
