/* =========================================================================
   Kadaster onboarding wizard ("Bring Your Own Kadaster")
   Premium dark modal with 6 swipeable slides triggered from the homepage hero.
   Prefix: .koz-* (Kadaster-Onboarding-Wizard)
   ========================================================================= */

.koz-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: none;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.koz-modal:not(.hidden) {
    display: flex;
}

.koz-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, rgba(204, 255, 0, 0.10) 0%, rgba(0, 0, 0, 0.92) 60%, #050505 100%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: koz-fade-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
    cursor: pointer;
}

.koz-shell {
    position: relative;
    margin: auto;
    width: min(960px, calc(100vw - 32px));
    max-height: min(92vh, 760px);
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(204, 255, 0, 0.05);
    overflow: hidden;
    animation: koz-pop-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes koz-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes koz-pop-in {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----------------------------- Header ----------------------------- */

.koz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.015);
}

.koz-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.koz-brand__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #CCFF00;
    box-shadow: 0 0 0 4px rgba(204, 255, 0, 0.15);
    animation: koz-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes koz-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(204, 255, 0, 0.15); }
    50% { box-shadow: 0 0 0 8px rgba(204, 255, 0, 0.05); }
}

.koz-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.koz-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: rotate(90deg);
}

/* ----------------------------- Progress ----------------------------- */

.koz-progress {
    padding: 16px 28px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.koz-progress__track {
    position: relative;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.koz-progress__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg, #CCFF00 0%, #b8e600 100%);
    border-radius: inherit;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 18px rgba(204, 255, 0, 0.4);
}

.koz-progress__steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.koz-progress__step {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 4px 0;
    border-top: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.koz-progress__step.is-active {
    color: #CCFF00;
}

.koz-progress__step.is-done {
    color: rgba(204, 255, 0, 0.55);
}

/* ----------------------------- Slides ----------------------------- */

.koz-slides {
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.koz-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
    padding: 20px 28px 24px;
    opacity: 0;
    transform: translateX(40px);
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
}

.koz-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.koz-slide.is-prev {
    transform: translateX(-40px);
}

@media (max-width: 760px) {
    .koz-slide {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 14px 20px 20px;
    }
}

/* ---- Art column (SVG) ---- */

.koz-art {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 480 / 280;
    box-shadow: inset 0 0 0 1px rgba(204, 255, 0, 0.04);
}

.koz-art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.koz-art--intro,
.koz-art--done {
    background: radial-gradient(60% 60% at 50% 30%, rgba(204, 255, 0, 0.08) 0%, transparent 70%), #0a0a0a;
}

/* ---- Body column (text) ---- */

.koz-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: center;
}

.koz-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.koz-eyebrow--brand {
    color: #CCFF00;
}

.koz-title {
    font-family: 'Work Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(22px, 2.5vw, 30px);
    line-height: 1.15;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

.koz-title--sm {
    font-size: clamp(20px, 2.2vw, 26px);
}

.koz-accent {
    color: #CCFF00;
}

.koz-lead {
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.koz-lead strong {
    color: #fff;
    font-weight: 700;
}

.koz-stepbadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #CCFF00;
    background: rgba(204, 255, 0, 0.08);
    border: 1px solid rgba(204, 255, 0, 0.2);
    border-radius: 999px;
    padding: 6px 12px;
}

.koz-stepbadge--final {
    color: #FFB020;
    background: rgba(255, 176, 32, 0.08);
    border-color: rgba(255, 176, 32, 0.25);
}

.koz-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.koz-bullets li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.78);
}

.koz-bullets li i {
    color: #CCFF00;
    font-size: 13px;
    width: 16px;
    text-align: center;
}

.koz-bullets--compact li {
    font-size: 13px;
}

.koz-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.koz-tip i {
    color: #CCFF00;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.koz-tip--warn {
    background: rgba(255, 176, 32, 0.06);
    border-color: rgba(255, 176, 32, 0.18);
}

.koz-tip--warn i {
    color: #FFB020;
}

.koz-extlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    color: #CCFF00;
    text-decoration: none;
    border-bottom: 1px dashed rgba(204, 255, 0, 0.3);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.koz-extlink:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.koz-extlink i {
    font-size: 10px;
}

/* ----------------------------- Footer ----------------------------- */

.koz-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.015);
}

.koz-footer__center {
    text-align: center;
}

.koz-counter {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

.koz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
    white-space: nowrap;
}

.koz-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    justify-self: start;
}

.koz-btn--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.koz-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.koz-btn--primary {
    background: #CCFF00;
    color: #000;
    box-shadow: 0 8px 24px rgba(204, 255, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    justify-self: end;
}

.koz-btn--primary:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 12px 32px rgba(204, 255, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.koz-btn--launch {
    box-shadow: 0 10px 30px rgba(204, 255, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: koz-launch-pulse 2.6s ease-in-out infinite;
}

@keyframes koz-launch-pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(204, 255, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 14px 44px rgba(204, 255, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

.koz-btn .fas {
    font-size: 11px;
}

.hidden { display: none !important; }

/* Hidden flag for the alternative button on the last slide */
.koz-modal[data-current="6"] [data-klic-koz-next] {
    display: none;
}

.koz-modal[data-current="6"] [data-klic-koz-launch] {
    display: inline-flex !important;
}

/* ----------------------------- Microhint ----------------------------- */

.koz-microhint {
    text-align: center;
    padding: 8px 24px 16px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
}

.koz-microhint kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 1px;
}

@media (max-width: 760px) {
    .koz-microhint { display: none; }
}

/* ----------------------------- Mobile tweaks ----------------------------- */

@media (max-width: 760px) {
    .koz-shell {
        width: 100vw;
        max-height: 100vh;
        height: 100dvh;
        border-radius: 0;
        border: none;
        grid-template-rows: auto auto 1fr auto;
    }

    .koz-header {
        padding: 14px 18px 10px;
    }

    .koz-progress {
        padding: 12px 18px 6px;
    }

    .koz-progress__step {
        font-size: 9px;
    }

    .koz-slides {
        min-height: 0;
    }

    .koz-art {
        max-height: 38dvh;
    }

    .koz-body {
        gap: 12px;
    }

    .koz-footer {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "counter counter"
            "prev next";
        padding: 12px 18px;
    }

    .koz-footer__center { grid-area: counter; padding-bottom: 4px; }
    .koz-btn--ghost { grid-area: prev; justify-self: stretch; }
    .koz-btn--primary { grid-area: next; justify-self: stretch; }

    .koz-btn { padding: 14px 16px; font-size: 13px; }
}

/* Hide demo-btn icon on smallest screens to keep label visible */
.hero-demo-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(204, 255, 0, 0.12);
    color: rgba(204, 255, 0, 0.95);
    font-size: 10px;
    flex-shrink: 0;
}

/* ----------------------------- Reduced motion ----------------------------- */

@media (prefers-reduced-motion: reduce) {
    .koz-backdrop,
    .koz-shell,
    .koz-slide,
    .koz-progress__fill,
    .koz-btn--launch,
    .koz-brand__dot {
        animation: none !important;
        transition: none !important;
    }
}

/* Body scroll lock helper applied via JS */
body.koz-locked {
    overflow: hidden;
}
