/* Explain: Reusable components, buttons, cards, and AI-related styling. */
#siteHeader.is-scrolled {
    background: rgba(6, 9, 16, 0.94);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}

#mobileMenu {
    display: none !important;
}

#mobileMenu.is-open {
    display: flex !important;
}

@media (min-width: 1024px) {
    #mobileMenu {
        display: flex !important;
    }
}

.logo-mark {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}

.nav-link {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 180ms ease;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.site-btn-primary {
    min-height: 48px;
    border: 1px solid transparent;
    background: linear-gradient(115deg, var(--secondary-color), var(--primary-color));
    color: #04101F;
    font-weight: 800;
    box-shadow: 0 16px 40px rgba(124, 92, 255, 0.35);
    transition: box-shadow 220ms ease, filter 220ms ease;
}

.site-btn-primary:hover {
    color: #04101F;
    filter: brightness(1.08);
    box-shadow: 0 20px 55px rgba(34, 211, 238, 0.5);
}

.site-btn-outline {
    min-height: 48px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-weight: 700;
    transition: all 220ms ease;
}

.site-btn-outline:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

.site-btn-light {
    min-height: 48px;
    border: 1px solid var(--white-color);
    background: var(--white-color);
    color: var(--primary-color);
    font-weight: 800;
}

.site-btn-light:hover {
    color: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
}

.site-btn-ghost {
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: var(--white-color);
    font-weight: 700;
    transition: all 220ms ease;
}

.site-btn-ghost:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(34, 211, 238, 0.08);
}

.site-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    box-shadow: var(--shadow-card);
    transition: transform 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
}

.site-card:hover {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 26px 70px rgba(2, 8, 23, 0.75), 0 0 0 1px rgba(34, 211, 238, 0.14);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    color: var(--secondary-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: '';
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
}

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: rgba(34, 211, 238, 0.08);
    color: var(--secondary-color);
}

.chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
}

.text-gradient {
    background: linear-gradient(100deg, var(--secondary-color), var(--primary-color) 55%, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.form-field {
    border: 1px solid var(--border-color);
    background: rgba(4, 8, 16, 0.72);
    color: var(--text-color);
}

.form-field:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.form-field::placeholder {
    color: rgba(148, 167, 198, 0.55);
}

.filter-btn {
    min-height: 44px;
    padding: 0.5rem 1.15rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-btn.is-active {
    border-color: transparent;
    background: linear-gradient(115deg, var(--secondary-color), var(--primary-color));
    color: #04101F;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.32);
}

.status-message {
    display: none;
    border-radius: var(--radius-small);
    padding: 0.9rem 1rem;
    font-weight: 700;
}

.status-message.is-visible {
    display: block;
}

.status-message.is-success {
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.1);
    color: var(--secondary-color);
}

.status-message.is-error {
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.1);
    color: #FCA5A5;
}

.ai-art-frame {
    overflow: hidden;
    border-radius: var(--radius-large);
}

.ai-art-frame img {
    transition: opacity 600ms ease, transform 600ms ease;
}

@keyframes artDrift {
    0%,
    100% {
        transform: scale(1.05) translateY(0);
    }

    50% {
        transform: scale(1.09) translateY(-14px);
    }
}

.art-drift {
    animation: artDrift 11s ease-in-out infinite;
    will-change: transform;
}

@keyframes artFlow {
    0% {
        transform: translate3d(0, 0, 0) scale(1.08) skewY(0deg);
    }

    25% {
        transform: translate3d(-1.6%, 1.2%, 0) scale(1.11) skewY(-0.8deg);
    }

    50% {
        transform: translate3d(1.4%, -1.6%, 0) scale(1.13) skewY(0.6deg);
    }

    75% {
        transform: translate3d(1.8%, 1.4%, 0) scale(1.10) skewY(0.8deg);
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1.08) skewY(0deg);
    }
}

.art-flow {
    animation: artFlow 12s ease-in-out infinite;
    will-change: transform;
}

@keyframes artRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.art-rotate {
    animation: artRotate 26s linear infinite;
    will-change: transform;
}

.ai-art-badge {
    position: absolute;
    left: 1rem;
    bottom: -1rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: rgba(6, 10, 20, 0.9);
    padding: 0.5rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-color);
    backdrop-filter: blur(8px);
}

.ai-art-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--secondary-color);
    box-shadow: 0 0 12px var(--secondary-color);
    animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.site-footer {
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
    transition: color 180ms ease;
}

.site-footer a:hover {
    color: var(--secondary-color);
}

.site-footer h2 {
    color: var(--heading-color);
}

.ai-chat {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.ai-chat__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #04101F;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(124, 92, 255, 0.45);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.ai-chat__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.55);
}

.ai-chat__panel {
    width: min(92vw, 380px);
    max-height: min(74vh, 620px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-medium);
    background: rgba(8, 13, 24, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.ai-chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(115deg, rgba(34, 211, 238, 0.14), rgba(124, 92, 255, 0.14));
}

.ai-chat__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ai-chat__msg {
    max-width: 88%;
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ai-chat__msg--bot {
    align-self: flex-start;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
}

.ai-chat__msg--user {
    align-self: flex-end;
    background: linear-gradient(115deg, var(--secondary-color), var(--primary-color));
    color: #04101F;
    font-weight: 600;
}

.ai-chat__form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.ai-chat__input {
    flex: 1;
    min-height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(4, 8, 16, 0.72);
    padding: 0 0.85rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.ai-chat__input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.ai-chat__send {
    min-width: 46px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(115deg, var(--secondary-color), var(--primary-color));
    color: #04101F;
    cursor: pointer;
}

.ai-chat__send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-chat__typing {
    display: inline-flex;
    gap: 4px;
}

.ai-chat__typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--secondary-color);
    animation: pulseDot 1.2s ease-in-out infinite;
}

.ai-chat__typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chat__typing span:nth-child(3) {
    animation-delay: 0.4s;
}

.art-spin-frame {
    position: relative;
    display: block;
    width: 100%;
    max-width: 540px;
    border-radius: 999px;
    overflow: visible;
}

.art-spin-frame::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.38), rgba(34, 211, 238, 0.20) 52%, transparent 72%);
    filter: blur(28px);
    z-index: -1;
    pointer-events: none;
}

.req-mark {
    color: var(--accent-color);
    font-weight: 800;
}

.field-error {
    display: none;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    color: #FCA5A5;
}

.field-error.is-visible {
    display: block;
}

.form-field.is-invalid {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.success-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}