/* ============================================================
   CriaHub Landings Base
   Shared styles for slug-based landing pages
   ============================================================ */

/* ---- Global ---- */
:root {
    --primary: #00A4FF;
    --primary-dark: #0074b4;
    --dark: #020204;
    --card: #0F0F0F;
    --surface: #18181b;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--dark);
    font-family: 'Inter', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #1e1e2e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #1e1e2e; border-radius: 2px; }

/* ---- Layout ---- */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Glassmorphism ---- */
.glass {
    background: rgba(15, 15, 19, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.07);
}

/* ---- Animations ---- */
.fade-in-up,
.fade-in-left,
.fade-in-right,
.scale-in,
.fade-in,
.reveal,
.stagger-item {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up    { transform: translateY(30px); }
.fade-in-left  { transform: translateX(-30px); }
.fade-in-right { transform: translateX(30px); }
.scale-in      { transform: scale(0.95); }
.reveal        { transform: translateY(20px); }
.stagger-item  { transform: translateY(15px); }

.fade-in-up.show,
.fade-in-left.show,
.fade-in-right.show,
.scale-in.show,
.fade-in.show,
.reveal.show,
.stagger-item.show {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-item:nth-child(2) { transition-delay: 0.12s; }
.stagger-item:nth-child(3) { transition-delay: 0.19s; }
.stagger-item:nth-child(4) { transition-delay: 0.26s; }
.stagger-item:nth-child(5) { transition-delay: 0.33s; }

/* ---- No scroll ---- */
body.no-scroll { overflow: hidden; }

/* ---- FAQ ---- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

/* ---- Modal ---- */
#apply {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#apply.show {
    opacity: 1;
    pointer-events: all;
}

/* ---- Chat window ---- */
.chat-window {
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}

.chat-message {
    display: flex;
    margin-bottom: 0.5rem;
    animation: msgIn 0.35s ease both;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-message .message-content {
    max-width: 80%;
    padding: 0.6rem 0.9rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.user-message { justify-content: flex-end; }
.user-message .message-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.bot-message { justify-content: flex-start; }
.bot-message .message-content {
    background: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.07);
    border-bottom-left-radius: 0.25rem;
}

/* Typing indicator */
.typing-indicator .message-content {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.7rem 1rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #555;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%           { transform: translateY(-6px); opacity: 1; }
}

/* ---- Animation delay utilities ---- */
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ---- Intl Tel Input overrides ---- */
.iti { width: 100%; }
.iti__flag-container { z-index: 100; }
.iti__country-list {
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 0.5rem;
    max-height: 200px;
}
.iti__country-list .iti__country:hover { background: rgba(0,164,255,0.1); }
.iti__country-list .iti__country.iti__highlight { background: rgba(0,164,255,0.15); }
.iti__selected-flag { background: rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.1); }
.iti__selected-flag:hover { background: rgba(255,255,255,0.08); }
.iti__dial-code { color: #aaa; }
.iti__country-name { color: #fff; }

/* ---- Confetti ---- */
canvas { pointer-events: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .section-container { padding: 0 1rem; }
}
