:root {
    color-scheme: light dark;
}

html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

/* Subtle grain/noise without images */
.noise {
    background-image:
        radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    mix-blend-mode: overlay;
    opacity: 0.18;
}

html.dark .noise {
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    opacity: 0.22;
}

/* Nice focus ring on keyboard navigation */
:focus-visible {
    outline: 2px solid rgba(5, 139, 190, 0.9);
    outline-offset: 3px;
}

* {
    scroll-behavior: smooth;
}

/* Premium micro-interactions */
details>summary {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth FAQ reveal (simple height + fade) */
details>summary+p {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    transition: max-height 280ms ease, opacity 200ms ease, padding-top 280ms ease;
}

details[open]>summary+p {
    max-height: 240px;
    opacity: 1;
    padding-top: 0.75rem;
}

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

    details>summary+p {
        transition: none;
    }

    #ctaShell {
        transition: none;
    }

    #ctaFormWrap {
        transition: none;
    }
}

/* CTA expand animation (content -> left, form -> right) */
#ctaShell {
    display: grid;
    column-gap: 2rem;
    row-gap: 2rem;
    align-items: center;
    grid-template-columns: 1fr;
}

/* When closed on stacked layout, don't reserve a big empty row gap. */
#ctaShell:not([data-open="true"]) {
    row-gap: 0;
}

@media (min-width: 1024px) {
    #ctaShell {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
        transition: grid-template-columns 520ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    #ctaShell[data-open="true"] {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

#ctaFormWrap {
    overflow: hidden;
    min-width: 0;
    max-height: 0;
    transition: max-height 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease,
        transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

#ctaShell:not([data-open="true"]) #ctaFormWrap {
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
}

#ctaShell[data-open="true"] #ctaFormWrap {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    max-height: 2000px;
}

/* Typed.js cursor (make it visible + blinking) */
.typed-cursor {
    display: inline-block;
    margin-left: 2px;
    opacity: 1;
    animation: typedBlink 1s infinite;
}

@keyframes typedBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}