/* ============================================================
   StataPay Hero — clean, image-first, mobile-first
   Scoped to .kastata-hero so it never leaks into other pages.
   ============================================================ */

.kastata-hero {
    --k-primary: #1877F2;
    --k-primary-strong: #166fe5;
    --k-primary-rgb: 24, 119, 242;
    --k-ink: #0b1220;
    --k-font-display: 'Syne', system-ui, sans-serif;
    --k-font-body: 'DM Sans', system-ui, sans-serif;
}

/* ----- Container ----- */
.kastata-hero .k-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 460px;
    background: var(--k-ink);
    overflow: hidden;
    font-family: var(--k-font-body);
    isolation: isolate;
}

@media (min-width: 768px) {
    .kastata-hero .k-hero {
        min-height: 0;
        height: clamp(400px, 56vh, 500px);
    }
}

/* ----- Slides ----- */
.kastata-hero .k-track {
    position: absolute;
    inset: 0;
}

.kastata-hero .k-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.kastata-hero .k-slide.is-active {
    opacity: 1;
    visibility: visible;
}

/* ----- Media ----- */
.kastata-hero .k-media {
    position: absolute;
    inset: 0;
}

.kastata-hero .k-media--img {
    opacity: 0;
    transition: opacity .8s ease;
}

.kastata-hero .k-media--img.is-loaded {
    opacity: 1;
}

.kastata-hero .k-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.kastata-hero .k-slide.is-active .k-media img {
    animation: kHeroZoom 40s linear infinite alternate;
}

@keyframes kHeroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.15); }
}

/* Gradient fallback when a slide has no image */
.kastata-hero .k-media--gradient {
    background:
        radial-gradient(1100px 520px at 80% -10%, rgba(var(--k-primary-rgb), .38), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(var(--k-primary-rgb), .24), transparent 55%),
        linear-gradient(135deg, #0b1220 0%, #101a2e 55%, #0d1526 100%);
}

/* Skeleton shimmer while an image loads */
.kastata-hero .k-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, #101a2e 40%, #1a2740 50%, #101a2e 60%);
    background-size: 200% 100%;
    animation: kShimmer 1.6s linear infinite;
}

.kastata-hero .k-skeleton.is-hidden {
    display: none;
}

@keyframes kShimmer {
    from { background-position: 120% 0; }
    to   { background-position: -80% 0; }
}

/* ----- Overlay (legibility first) ----- */
.kastata-hero .k-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to top,
            rgba(6, 10, 20, .82) 0%,
            rgba(6, 10, 20, .30) 36%,
            rgba(6, 10, 20, .06) 62%,
            rgba(6, 10, 20, .48) 100%),
        linear-gradient(to right,
            rgba(6, 10, 20, .84) 0%,
            rgba(6, 10, 20, .42) 48%,
            rgba(6, 10, 20, .04) 100%);
}

/* ----- Content shell ----- */
.kastata-hero .k-shell {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 5rem 1.25rem 4rem;
}

@media (min-width: 640px) {
    .kastata-hero .k-shell {
        padding: 5rem 1.5rem 4rem;
    }
}

@media (min-width: 1024px) {
    .kastata-hero .k-shell {
        padding: 5rem 2rem 4rem;
    }
}

.kastata-hero .k-content-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .kastata-hero .k-content-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 4rem;
    }
}

@media (min-width: 1024px) {
    .kastata-hero .k-content-grid {
        grid-template-columns: 1.4fr 1fr;
    }
}

.kastata-hero .k-content-left {
    max-width: 45rem;
}

.kastata-hero .k-content-right {
    max-width: 32rem;
    justify-self: end;
}

@media (max-width: 767px) {
    .kastata-hero .k-content-right {
        justify-self: start;
    }
}

/* ----- Badge ----- */
.kastata-hero .k-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .42rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.kastata-hero .k-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4da3ff;
    animation: kPulse 2.4s ease-in-out infinite;
}

@keyframes kPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(77, 163, 255, .55); }
    50%      { box-shadow: 0 0 0 6px rgba(77, 163, 255, 0); }
}

/* ----- Typography ----- */
.kastata-hero .k-title {
    font-family: var(--k-font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: #fff;
    font-size: clamp(2.1rem, 7vw, 3rem);
    text-wrap: balance;
}

@media (min-width: 1024px) {
    .kastata-hero .k-title {
        font-size: clamp(3rem, 5vw, 4.25rem);
    }
}

.kastata-hero .k-subtitle {
    margin-top: 1.1rem;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    font-weight: 600;
    color: #dbe7ff;
}

.kastata-hero .k-description {
    margin-top: .8rem;
    max-width: 36rem;
    font-size: clamp(.92rem, 2vw, 1.05rem);
    line-height: 1.65;
    color: rgba(226, 234, 255, .82);
}

/* ----- Actions ----- */
.kastata-hero .k-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    margin-top: 1.9rem;
}

.kastata-hero .k-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.6rem;
    border-radius: 14px;
    font-family: var(--k-font-display);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: transform .25s ease, background-color .25s ease,
                border-color .25s ease, box-shadow .25s ease;
}

.kastata-hero .k-btn:focus-visible {
    outline: 2px solid #7db8ff;
    outline-offset: 3px;
}

.kastata-hero .k-btn--primary {
    background: var(--k-primary);
    color: #fff;
    box-shadow: 0 10px 30px -8px rgba(var(--k-primary-rgb), .55);
}

.kastata-hero .k-btn--primary:hover {
    background: var(--k-primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -8px rgba(var(--k-primary-rgb), .6);
}

.kastata-hero .k-btn--primary:active {
    transform: translateY(0);
}

.kastata-hero .k-btn--ghost {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
}

.kastata-hero .k-btn--ghost:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-2px);
}

/* ----- Slide counter (top right) ----- */
.kastata-hero .k-counter {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 3;
    padding: .45rem .95rem;
    border-radius: 999px;
    background: rgba(6, 10, 20, .45);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* ----- Dots (bottom right, keyboard accessible) ----- */
.kastata-hero .k-dots {
    position: absolute;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .65rem;
    border-radius: 999px;
    background: rgba(6, 10, 20, .4);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.kastata-hero .k-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .3s ease, background-color .3s ease;
}

.kastata-hero .k-dot:hover {
    background: rgba(255, 255, 255, .85);
}

.kastata-hero .k-dot:focus-visible {
    outline: 2px solid #7db8ff;
    outline-offset: 3px;
}

.kastata-hero .k-dot.is-active {
    width: 26px;
    background: #fff;
}

/* ----- Autoplay progress ----- */
.kastata-hero .k-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 3;
    background: rgba(255, 255, 255, .14);
}

.kastata-hero .k-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2e89ff, #7db8ff);
    transform: scaleX(0);
    transform-origin: left;
}

.kastata-hero .k-progress-fill.k-progress-run {
    animation: kProgress 6s linear forwards;
}

.kastata-hero.is-paused .k-progress-fill {
    animation-play-state: paused;
}

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

/* ----- Entry animation for the active slide content ----- */
.kastata-hero .k-slide.is-active .k-content-left > *,
.kastata-hero .k-slide.is-active .k-content-right > * {
    animation: kFadeUp 1s cubic-bezier(.22, 1, .36, 1) both;
}

.kastata-hero .k-slide.is-active .k-content-left > *:nth-child(1) { animation-delay: .08s; }
.kastata-hero .k-slide.is-active .k-content-left > *:nth-child(2) { animation-delay: .16s; }
.kastata-hero .k-slide.is-active .k-content-left > *:nth-child(3) { animation-delay: .24s; }
.kastata-hero .k-slide.is-active .k-content-right > *:nth-child(1) { animation-delay: .32s; }
.kastata-hero .k-slide.is-active .k-content-right > *:nth-child(2) { animation-delay: .40s; }

@keyframes kFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- Brand strip (below hero, in normal flow) ----- */
.kastata-hero .k-strip {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    padding: .85rem 1.25rem;
    background: #0d1526;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: rgba(226, 234, 255, .75);
    font-size: .85rem;
    text-align: center;
}

.kastata-hero .k-strip i {
    color: #4da3ff;
    font-size: .78rem;
}

.kastata-hero .k-strip strong {
    color: #fff;
    font-weight: 700;
}

.kastata-hero .k-strip .k-strip-year {
    color: #4da3ff;
    font-weight: 700;
}

@media (max-width: 480px) {
    .kastata-hero .k-strip {
        font-size: .76rem;
        padding: .7rem 1rem;
        line-height: 1.5;
    }
}

/* ----- Reduced motion: keep it calm and static ----- */
@media (prefers-reduced-motion: reduce) {
    .kastata-hero .k-slide.is-active .k-media img,
    .kastata-hero .k-slide.is-active .k-content > *,
    .kastata-hero .k-badge-dot,
    .kastata-hero .k-skeleton {
        animation: none;
    }

    .kastata-hero .k-media--img,
    .kastata-hero .k-slide,
    .kastata-hero .k-slide.is-active {
        transition: none;
    }

    .kastata-hero .k-media--img {
        opacity: 1;
    }
}
