/* Explain: Styles for cookie consent, live chat, site intro, and welcome voice greeting. */
/* Cookie consent banner */
.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: none;
    padding: 1rem;
    animation: cookieRise 400ms ease;
}

.cookie-banner.is-visible {
    display: block;
}

@keyframes cookieRise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--glass-bg);
    padding: 1.4rem 1.6rem;
    box-shadow: 0 24px 60px rgba(10, 31, 68, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.cookie-banner__title {
    margin: 0 0 0.4rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cookie-banner__desc {
    margin: 0;
    max-width: 52rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.cookie-banner__desc a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-banner__actions .btn-core {
    flex: 1 1 auto;
}

@media (min-width: 640px) {
    .cookie-banner__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cookie-banner__actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }
}

/* Live chat assistant */
.chat-toggle {
    position: fixed;
    right: 1.25rem;
    bottom: calc(5.7rem + env(safe-area-inset-bottom));
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border: none;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 91, 234, 0.45);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.chat-toggle:hover {
    transform: translateY(-3px) scale(1.05);
}

.chat-toggle i {
    font-size: 1.4rem;
}

.chat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: calc(9.6rem + env(safe-area-inset-bottom));
    z-index: 85;
    display: none;
    flex-direction: column;
    width: min(23rem, calc(100vw - 2rem));
    max-height: min(34rem, calc(100vh - 12rem));
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1.1rem;
    background: var(--surface-color);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.chat-panel.is-open {
    display: flex;
}

.chat-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--nav-bg);
}

.chat-panel__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.chat-panel__title {
    margin: 0;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.chat-panel__status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
}

.chat-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #25D366;
}

.chat-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.6rem;
    background: transparent;
    color: #FFFFFF;
    transition: background 200ms ease;
}

.chat-panel__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.chat-msg {
    max-width: 85%;
    padding: 0.7rem 0.9rem;
    border-radius: 0.9rem;
    font-size: 0.83rem;
    line-height: 1.55;
}

.chat-msg--bot {
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 0.2rem;
    background: var(--surface-alt);
    color: var(--text-color);
}

.chat-msg--user {
    align-self: flex-end;
    border-bottom-right-radius: 0.2rem;
    background: var(--primary-color);
    color: #ffffff;
}

.chat-msg--bot a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.chat-msg--typing {
    color: var(--text-muted);
    font-style: italic;
}

.chat-panel__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0 1rem 0.7rem;
}

.chat-chip {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: transparent;
    padding: 0.4rem 0.8rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: all 200ms ease;
}

.chat-chip:hover {
    border-color: var(--primary-color);
    background: rgba(0, 91, 234, 0.12);
    color: var(--text-color);
}

.chat-panel__form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    background: var(--surface-alt);
}

.chat-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    background: var(--field-bg);
    padding: 0.65rem 0.85rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.chat-input::placeholder {
    color: #6B7280;
}

.chat-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.chat-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.6rem;
    background: var(--primary-color);
    color: #ffffff;
    transition: background 200ms ease, border-color 200ms ease;
}

.chat-send:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 767px) {
    .chat-toggle {
        bottom: calc(10rem + env(safe-area-inset-bottom));
    }

    .chat-panel {
        right: 1rem;
        bottom: calc(13.9rem + env(safe-area-inset-bottom));
        left: 1rem;
        width: auto;
        max-height: min(30rem, calc(100vh - 16rem));
    }
}

/* ---- Site entrance intro ---- */
.site-intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 45%, #0C1626 0%, #05070E 68%);
    animation: introAutoHide 5.5s ease forwards;
}

.site-intro.is-js {
    animation: none;
}

.site-intro.is-done {
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 700ms ease, transform 700ms ease;
    pointer-events: none;
}

@keyframes introAutoHide {
    0%, 90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.site-intro__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(46rem, 120vw);
    height: min(46rem, 120vw);
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(30, 107, 255, 0.35) 0%, rgba(30, 107, 255, 0) 62%);
    opacity: 0;
    transition: opacity 1200ms ease;
}

.site-intro.is-reveal .site-intro__glow {
    opacity: 1;
    animation: introPulse 3s ease-in-out infinite;
}

@keyframes introPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.75;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.12);
        opacity: 1;
    }
}

.site-intro__streaks {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.site-intro__streaks span {
    position: absolute;
    left: -45%;
    height: 2px;
    width: 38%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    animation: introStreak 2.6s ease-in-out infinite;
}

.site-intro__streaks span:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.site-intro__streaks span:nth-child(2) {
    top: 36%;
    width: 58%;
    animation-delay: 0.6s;
}

.site-intro__streaks span:nth-child(3) {
    top: 50%;
    animation-delay: 1.1s;
}

.site-intro__streaks span:nth-child(4) {
    top: 66%;
    width: 52%;
    animation-delay: 0.35s;
}

.site-intro__streaks span:nth-child(5) {
    top: 82%;
    animation-delay: 0.85s;
}

@keyframes introStreak {
    0% {
        transform: translateX(0);
        opacity: 0;
    }

    18% {
        opacity: 0.9;
    }

    82% {
        opacity: 0.9;
    }

    100% {
        transform: translateX(400%);
        opacity: 0;
    }
}

.site-intro__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    padding: 2rem;
    text-align: center;
}

.site-intro__logo {
    width: min(260px, 64vw);
    height: auto;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.22, 1, 0.36, 1), filter 900ms ease;
}

.site-intro.is-reveal .site-intro__logo {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 14px 44px rgba(30, 107, 255, 0.5));
}

.site-intro__tagline {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms ease 250ms, transform 700ms ease 250ms;
}

.site-intro.is-reveal .site-intro__tagline {
    opacity: 1;
    transform: translateY(0);
}

.site-intro__bar {
    position: relative;
    width: min(280px, 62vw);
    height: 3px;
    border-radius: 999px;
    background: rgba(130, 165, 255, 0.18);
    overflow: hidden;
}

.site-intro__bar-fill {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    box-shadow: 0 0 18px rgba(30, 107, 255, 0.75);
    transition: width 1900ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-intro.is-reveal .site-intro__bar-fill {
    width: 100%;
}

.site-intro__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 600ms ease 400ms;
}

.site-intro.is-reveal .site-intro__meta {
    opacity: 1;
}

.site-intro__meta i {
    color: var(--primary-color);
}

@media (prefers-reduced-motion: reduce) {
    .site-intro {
        animation: none;
    }

    .site-intro__streaks,
    .site-intro__glow {
        display: none;
    }

    .site-intro__logo,
    .site-intro__tagline,
    .site-intro__bar-fill,
    .site-intro__meta {
        transition-duration: 200ms;
    }
}

/* ---- Welcome voice greeting ---- */
.welcome-voice {
    position: fixed;
    top: 76px;
    left: 50%;
    z-index: 38;
    display: none;
    width: min(30rem, calc(100vw - 1.5rem));
    transform: translateX(-50%) translateY(-14px);
    opacity: 0;
    transition: opacity 400ms ease, transform 400ms ease;
}

.welcome-voice.is-visible {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.welcome-voice__inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--glass-bg);
    padding: 0.85rem 0.9rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.welcome-voice__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.7rem;
    background: rgba(30, 107, 255, 0.18);
    color: var(--primary-color);
    font-size: 1.05rem;
}

.welcome-voice__text {
    flex: 1 1 auto;
    min-width: 0;
}

.welcome-voice__title {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.welcome-voice__desc {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.welcome-voice__play,
.welcome-voice__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    background: transparent;
    color: var(--text-color);
    font-size: 0.85rem;
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.welcome-voice__play {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
}

.welcome-voice__play:hover {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
}

.welcome-voice__close:hover {
    border-color: var(--primary-color);
    background: rgba(30, 107, 255, 0.14);
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .welcome-voice {
        top: 128px;
    }
}

/* Intro: team photos + channel icons */
.site-intro__inner {
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
}

.site-intro__people {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms ease 200ms, transform 700ms ease 200ms;
}

.site-intro.is-reveal .site-intro__people {
    opacity: 1;
    transform: translateY(0);
}

.site-intro__avatar {
    width: 5.2rem;
    height: 6.6rem;
    object-fit: cover;
    object-position: top center;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    box-shadow: 0 12px 32px rgba(30, 107, 255, 0.28);
}

.site-intro__brands {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.4rem;
    opacity: 0;
    transition: opacity 800ms ease 550ms;
}

.site-intro.is-reveal .site-intro__brands {
    opacity: 1;
}

.site-intro__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid var(--border-color);
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 1.15rem;
    transition: color 250ms ease, border-color 250ms ease, background 250ms ease;
}

.site-intro__brand:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(30, 107, 255, 0.14);
}