/* Glassmorphic sAIf Voice Assistant Landing Page Stylesheet */
:root {
    --color-bg-dark: #070414;
    --color-text: #FFFFFF;
    --color-text-dim: rgba(255, 255, 255, 0.6);

    /* brand violet-magenta-cyan gradient */
    --color-saif-purple: #8B5CF6;
    --color-saif-magenta: #D946EF;
    --color-saif-cyan: #06B6D4;

    --color-purple-glow: rgba(139, 92, 246, 0.3);
    --color-cyan-glow: rgba(6, 182, 212, 0.3);
    --color-magenta-glow: rgba(217, 70, 239, 0.3);

    /* Glassmorphism Specs */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(24px) saturate(120%);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* Reset and Core Body Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
    body {
        padding: 3rem 2rem;
    }
}

/* Immersive Smooth Backdrop Gradient (sAIf Neon Edition) */
.mesh-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 80% 20%, #6d28d9 0%, transparent 60%),
        radial-gradient(circle at 15% 85%, #0e7490 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, #4c1d95 0%, transparent 70%),
        #070414;
}

/* Faint Eastern Pattern Overlay (Watermark) */
.eastern-pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0.08;
    /* Faint pale white watermark outline */
    background-image: url('pattern_white.png');
    background-size: 1040px auto;
    background-repeat: repeat;
}

/* OS Window Glass Wrapper */
.os-container {
    width: 100%;
    max-width: 1280px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px) saturate(140%);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* OS Navigation Header */
.os-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.os-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    outline: none;
    border: 2px solid transparent;
    padding: 0.25rem;
    border-radius: 8px;
}

.os-logo:focus-visible {
    border-color: var(--color-saif-cyan);
}

.brand-logo-svg {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
    animation: floatLogo 4s ease-in-out infinite alternate;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FFF 20%, #DDD 50%, var(--color-saif-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.os-nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

.os-nav .nav-link {
    text-decoration: none;
    color: var(--color-text-dim);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    outline: none;
    transition: color var(--transition-smooth), background-color var(--transition-smooth);
}

.os-nav .nav-link.active,
.os-nav .nav-link:hover,
.os-nav .nav-link:focus-visible {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.08);
}

/* Back to Ecosystem Link */
.back-to-doya {
    text-decoration: none;
    color: var(--color-saif-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.05);
    transition: background var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
}

.back-to-doya:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--color-saif-cyan);
    transform: translateY(-1px);
}

/* Language Selection buttons */
.lang-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--glass-border);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--color-text-dim);
    padding: 0.3rem 0.7rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    font-family: var(--font-body);
    transition: color var(--transition-smooth), background-color var(--transition-smooth);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text);
}

.lang-btn:not(.active):hover {
    color: var(--color-text);
}

/* Main Content Area */
.os-main {
    padding: 3rem 2rem 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Hero Title section */
.hero-text-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--color-saif-cyan);
    margin-bottom: 0.75rem;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #FFFFFF 30%, #E2E8F0 70%, var(--color-saif-magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-text-dim);
    line-height: 1.65;
}

/* sAIf Voice Orb Showcase Card */
.orb-container-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.orb-container-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(217, 70, 239, 0.05) 0%, transparent 60%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

/* AI Orb Visualizer element styling */
.orb-visualizer-wrapper {
    width: 260px;
    height: 260px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.orb-glow-backdrop {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.35;
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.orb-glow-backdrop.purple-glow {
    background: var(--color-saif-purple);
    top: 15%;
    left: 15%;
    animation: rotateGlow 8s linear infinite;
}

.orb-glow-backdrop.cyan-glow {
    background: var(--color-saif-cyan);
    bottom: 15%;
    right: 15%;
    animation: rotateGlowInverse 8s linear infinite;
}

/* Voice Orb Core shape */
.voice-orb {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, var(--color-saif-purple) 0%, var(--color-saif-magenta) 50%, var(--color-saif-cyan) 100%);
    position: relative;
    z-index: 5;
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), opacity var(--transition-smooth);
    animation: idlePulse 3.5s ease-in-out infinite alternate;
}

.voice-orb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 45px rgba(217, 70, 239, 0.6),
        inset 0 0 25px rgba(255, 255, 255, 0.4);
}

.voice-orb:active {
    transform: scale(0.98);
}

/* Sound rings around the orb */
.orb-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 130px;
    height: 130px;
    pointer-events: none;
    z-index: 3;
    opacity: 0.8;
}

.orb-wave.wave-1 {
    animation: rippleWave 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.orb-wave.wave-2 {
    animation: rippleWave 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    animation-delay: 1s;
}

.orb-wave.wave-3 {
    animation: rippleWave 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    animation-delay: 2s;
}

.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.08);
    transform-origin: center;
    pointer-events: none;
    z-index: 4;
}

.orb-ring.ring-1 {
    transform: translate(-50%, -50%) rotate(0deg);
    animation: spinRing 25s linear infinite;
    border-color: rgba(6, 182, 212, 0.15);
}

.orb-ring.ring-2 {
    width: 210px;
    height: 210px;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: spinRingInverse 35s linear infinite;
    border-color: rgba(217, 70, 239, 0.15);
}

/* Equalizer frequency bars underneath */
.orb-frequency-bars {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 30px;
    pointer-events: none;
}

.orb-frequency-bars span {
    width: 4px;
    height: 3px;
    background: var(--color-saif-cyan);
    border-radius: 10px;
    transition: height 0.1s ease, background-color var(--transition-smooth);
}

.voice-canvas-wave {
    width: 260px;
    max-width: 90vw;
    height: 98px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    z-index: 6;
}

#voice-video-listening-element {
    width: 500px;
    height: 188px;
    left: 50%;
    top: 56%;
    /* Сместить вниз по оси Y */
}

#voice-video-speaking-element {
    top: 49%;
    /* Сместить вверх по оси Y */
}

/* Animations for Listening and Speaking States */
.orb-container-card.listening .voice-orb,
.orb-container-card.speaking .voice-orb {
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}

.orb-container-card.listening #voice-video-listening-element {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
}

.orb-container-card.speaking #voice-video-speaking-element {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
}

/* Специальный хак только для браузера Safari */
@supports (-webkit-hyphens:none) {
    #voice-video-listening-element {
        left: 19%;
        /* Изменяйте этот процент (например, 48% для смещения влево, 52% для смещения вправо) */
    }

    #voice-video-speaking-element {
        left: 50%;
        /* Если потребуется сдвинуть анимацию разговора в Safari */
    }
}


.orb-container-card.listening .voice-orb {
    animation: listeningPulse 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, var(--color-saif-cyan) 0%, var(--color-saif-purple) 100%);
}

.orb-container-card.processing .voice-orb {
    animation: idlePulse 1s ease-in-out infinite alternate;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.7),
        inset 0 0 15px rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, var(--color-saif-purple) 0%, var(--color-saif-magenta) 100%);
}

.orb-container-card.listening .orb-glow-backdrop {
    opacity: 0.6;
    filter: blur(25px);
}

.orb-container-card.processing .orb-glow-backdrop {
    opacity: 0.5;
    filter: blur(35px);
}

.orb-container-card.speaking .orb-glow-backdrop {
    opacity: 0.7;
    filter: blur(30px);
}

.orb-container-card.listening .orb-frequency-bars span {
    background: var(--color-saif-cyan);
    animation: eqBounceCyan 0.6s ease-in-out infinite alternate;
}

/* EQ animations staggered */
.orb-frequency-bars span:nth-child(1) {
    animation-delay: 0.1s;
}

.orb-frequency-bars span:nth-child(2) {
    animation-delay: 0.25s;
}

.orb-frequency-bars span:nth-child(3) {
    animation-delay: 0.4s;
}

.orb-frequency-bars span:nth-child(4) {
    animation-delay: 0.15s;
}

.orb-frequency-bars span:nth-child(5) {
    animation-delay: 0.3s;
}

.orb-frequency-bars span:nth-child(6) {
    animation-delay: 0.45s;
}

.orb-frequency-bars span:nth-child(7) {
    animation-delay: 0.2s;
}

.orb-frequency-bars span:nth-child(8) {
    animation-delay: 0.35s;
}

.orb-frequency-bars span:nth-child(9) {
    animation-delay: 0.1s;
}

.orb-frequency-bars span:nth-child(10) {
    animation-delay: 0.5s;
}

.orb-container-card.speaking .voice-orb {
    animation: speakingPulse 0.8s ease-in-out infinite alternate;
    box-shadow: 0 0 50px rgba(217, 70, 239, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, var(--color-saif-magenta) 0%, var(--color-saif-purple) 100%);
}

.orb-container-card.speaking .orb-frequency-bars span {
    background: var(--color-saif-magenta);
    animation: eqBounceMagenta 0.5s ease-in-out infinite alternate;
}

/* Mic controls and button */
.orb-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.orb-status {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
    transition: color var(--transition-smooth);
}

.orb-container-card.listening .orb-status {
    color: var(--color-saif-cyan);
}

.orb-container-card.speaking .orb-status {
    color: var(--color-saif-magenta);
}

.mic-button-wrapper {
    position: relative;
}

.orb-mic-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    outline: none;
    z-index: 10;
    position: relative;
}

.orb-mic-btn:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.orb-mic-btn:focus-visible {
    border-color: var(--color-saif-cyan);
}

/* Pulsing microphone effects */
.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1.5px solid var(--color-saif-cyan);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.orb-container-card.listening .pulse-ring {
    animation: buttonPulse 1.8s ease-out infinite;
}

/* Interactive Dialogue Bubbles */
.dialogue-box {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dialogue-box::-webkit-scrollbar {
    width: 6px;
}

.dialogue-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dialogue-bubble {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dialogue-bubble.user {
    flex-direction: row-reverse;
}

.dialogue-bubble .avatar {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dialogue-bubble.assistant .avatar {
    background: linear-gradient(135deg, var(--color-saif-purple), var(--color-saif-cyan));
    border: none;
}

.bubble-content {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    max-width: 80%;
    font-size: 0.95rem;
}

.dialogue-bubble.user .bubble-content {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.25);
    border-top-right-radius: 2px;
}

.dialogue-bubble.assistant .bubble-content {
    border-top-left-radius: 2px;
}

/* Prompt tagging */
.preset-prompts-wrapper {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preset-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-dim);
}

.preset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.preset-tag-btn {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-dim);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color var(--transition-smooth), border-color var(--transition-smooth), background var(--transition-smooth), transform var(--transition-smooth);
}

.preset-tag-btn:hover {
    color: var(--color-text);
    border-color: var(--color-saif-purple);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

/* Manual Text search box */
.orb-manual-input-form {
    display: flex;
    width: 100%;
    max-width: 640px;
    gap: 0.75rem;
}

.manual-chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    outline: none;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.manual-chat-input:focus {
    border-color: var(--color-saif-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.manual-chat-submit {
    background: linear-gradient(135deg, var(--color-saif-purple), var(--color-saif-cyan));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--color-text);
    padding: 0 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.manual-chat-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Features Grid section */
.features-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header-features-card {
    text-align: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.01) !important;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-dim);
    font-size: 0.95rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 2.25rem 2rem;
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
}

.feature-icon-wrapper.purple {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.feature-icon-wrapper.cyan {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.feature-icon-wrapper.magenta {
    background: rgba(217, 70, 239, 0.15);
    border: 1px solid rgba(217, 70, 239, 0.3);
}

.feature-icon-wrapper.gold {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feature-desc {
    color: var(--color-text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Glassmorphic Widget Cards general classes */
.widget-card {
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px) saturate(110%);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    outline: none;
    position: relative;
    overflow: hidden;
}

.widget-card:hover,
.widget-card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.05);
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Technology and Sovereignty Section */
.mission-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mission-badge {
    background: linear-gradient(135deg, var(--color-saif-purple), var(--color-saif-cyan));
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mission-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #FFF 30%, #CCC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .mission-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.mission-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-dim);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mission-text p strong {
    color: var(--color-text);
}

.mission-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feat-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feat-bullet {
    color: var(--color-saif-cyan);
    font-size: 1.2rem;
    line-height: 1;
}

.feat-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feat-desc {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    line-height: 1.5;
}

/* API / SDK developer section styling */
.sdk-card {
    padding: 2.5rem;
}

.sdk-header-info {
    margin-bottom: 1.5rem;
}

.sdk-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sdk-subtitle {
    color: var(--color-text-dim);
    font-size: 0.95rem;
}

.sdk-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.sdk-tab-btn {
    border: none;
    background: transparent;
    color: var(--color-text-dim);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: color var(--transition-smooth), background var(--transition-smooth);
}

.sdk-tab-btn.active {
    color: var(--color-saif-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.sdk-tab-btn:not(.active):hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
}

.code-container {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block {
    display: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.code-block.active {
    display: block;
}

/* SDK Code Highlights styles */
.code-keyword {
    color: #F472B6;
    font-weight: 600;
}

.code-string {
    color: #34D399;
}

.code-comment {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.code-type {
    color: #60A5FA;
}

.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--color-text-dim);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    transition: color var(--transition-smooth), border-color var(--transition-smooth), background var(--transition-smooth);
}

.copy-code-btn:hover {
    color: var(--color-text);
    border-color: var(--color-saif-cyan);
    background: rgba(255, 255, 255, 0.12);
}

/* Waitlist section card styling */
.waitlist-card {
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 3.5rem 2rem;
}

.waitlist-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.waitlist-desc {
    color: var(--color-text-dim);
    max-width: 600px;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.waitlist-form {
    display: flex;
    width: 100%;
    max-width: 500px;
    gap: 0.75rem;
}

.waitlist-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    outline: none;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.waitlist-input:focus {
    border-color: var(--color-saif-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.waitlist-submit {
    background: linear-gradient(135deg, var(--color-saif-purple), var(--color-saif-cyan));
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0 1.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), opacity var(--transition-smooth);
}

.waitlist-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.waitlist-submit:active {
    transform: translateY(0);
}

@media (max-width: 576px) {
    .waitlist-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .waitlist-submit {
        padding: 0.8rem;
    }
}

/* OS Footer */
.os-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.footer-tagline {
    font-weight: 600;
}

@media (max-width: 768px) {
    .os-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Custom Toast notification system */
.custom-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 100px);
    background: rgba(13, 10, 28, 0.85);
    border: 1px solid var(--color-saif-cyan);
    color: var(--color-text);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.25);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
}

.custom-toast.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Error page layouts (shared with 404 & 502) */
.error-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.error-container {
    width: 100%;
    max-width: 500px;
    z-index: 10;
}

.error-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px) saturate(130%);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-logo {
    margin-bottom: 2rem;
}

.error-code {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-saif-cyan), var(--color-saif-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.35));
}

.error-code.error-code-502 {
    background: linear-gradient(135deg, var(--color-saif-magenta), var(--color-saif-purple));
    filter: drop-shadow(0 0 15px rgba(217, 70, 239, 0.35));
}

.error-message-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-message-desc {
    color: var(--color-text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-btn {
    text-decoration: none;
    display: inline-block;
}

.error-btn-502 {
    background: linear-gradient(135deg, var(--color-saif-magenta), var(--color-saif-purple));
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.25);
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.error-btn-502:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.error-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    filter: blur(25px);
    pointer-events: none;
}

.error-glow-502 {
    background: radial-gradient(circle, rgba(217, 70, 239, 0.2) 0%, transparent 70%);
}

/* Animations declarations */
@keyframes floatLogo {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-4px);
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }

    50% {
        transform: rotate(180deg) translate(15px, -15px);
    }

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

@keyframes rotateGlowInverse {
    0% {
        transform: rotate(360deg) translate(0, 0);
    }

    50% {
        transform: rotate(180deg) translate(-15px, 15px);
    }

    100% {
        transform: rotate(0deg) translate(0, 0);
    }
}

@keyframes idlePulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    100% {
        transform: scale(1.03);
        filter: brightness(1.08);
    }
}

@keyframes listeningPulse {
    0% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1.08);
    }
}

@keyframes speakingPulse {
    0% {
        transform: scale(1.01) rotate(-1deg);
    }

    100% {
        transform: scale(1.05) rotate(1deg);
    }
}

@keyframes rippleWave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

@keyframes spinRing {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spinRingInverse {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes eqBounceCyan {
    0% {
        height: 3px;
    }

    100% {
        height: 28px;
    }
}

@keyframes eqBounceMagenta {
    0% {
        height: 3px;
    }

    100% {
        height: 25px;
    }
}