/* ═══════════════════════════════════════════════
   KUDESNIK V2 — Cinematic 3D Landing
   ═══════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background: #1a0202;
    color: #ffffff;
    overflow-y: hidden; /* Block scroll during intro */
    width: 100%;
    cursor: default;
}
/* ── Hero Viewport Wrapper ──────────────────── */
.hero-viewport {
    position: relative;
    width: 100%; height: 100vh;
    overflow: hidden;
}

/* ── Landing State Control ──────────────────── */
.landing-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 2.5s ease-in-out, visibility 2.5s ease-in-out;
}
.landing-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ── 3D Canvas ──────────────────────────────── */
#scene3d {
    position: fixed;
    inset: 0;
    width: 100vw; height: 100vh;
    display: block;
    z-index: 0;
}

/* ── Scroll Hint Arrow ─────────────────────── */
.scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    animation: scrollBounce 2.4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ── Overlay UI ─────────────────────────────── */
#overlay {
    position: absolute; inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8vh;
}

.title-group {
    text-align: center;
    opacity: 0;
    transform: translateY(45px) scale(0.88);
    filter: blur(14px);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #e2e8f0 80%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: 
        drop-shadow(0px 1px 0px #94a3b8)
        drop-shadow(0px 2px 0px #64748b)
        drop-shadow(0px 3px 0px #475569)
        drop-shadow(0px 6px 20px rgba(255, 255, 255, 0.35))
        drop-shadow(0px 14px 35px rgba(0, 0, 0, 0.85));
    margin-bottom: 0.25em;
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.9vw, 1.35rem);
    font-weight: 400;
    color: #f1f5f9;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 4px 20px rgba(203,213,225,0.35);
}

/* ── Wide SaaS Showcase Modal ───────────────── */
.modal-bg {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 12, 25, 0.75);
    backdrop-filter: blur(16px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 24px;
}
.modal-bg.active {
    opacity: 1; pointer-events: auto;
}

.saas-modal {
    background: #ffffff;
    color: #1a1824;
    border-radius: 28px;
    max-width: 1080px; width: 100%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: scale(0.94) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.modal-bg.active .saas-modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute; top: 20px; right: 24px; z-index: 10;
    background: rgba(0, 0, 0, 0.06); border: none; color: #555;
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 22px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.12); color: #000; transform: scale(1.08); }

.saas-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: 560px;
    max-height: 90vh;
    overflow: hidden;
}
@media (max-width: 900px) {
    .saas-layout { grid-template-columns: 1fr; overflow-y: auto; }
    .saas-showcase { display: none !important; }
}
@media (max-width: 768px) {
    .modal-bg { padding: 10px; }
    .saas-modal { border-radius: 20px; }
    .saas-sidebar { padding: 24px 20px; }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
}

.saas-sidebar {
    padding: 40px 36px;
    display: flex; flex-direction: column;
    border-right: 1px solid #f0edf5;
    background: #faf8fc;
    overflow-y: auto;
}

.saas-brand {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
}
.saas-brand img {
    width: 52px; height: 52px; object-fit: contain;
}
.saas-brand h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem; font-weight: 800; color: #110e1a; margin: 0;
}
.saas-pill {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700; color: #7356bf;
    background: #ede8f7; padding: 4px 10px; border-radius: 12px;
    margin-top: 4px;
}

.saas-pitch {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem; font-weight: 800; line-height: 1.25; color: #181528;
    margin: 0 0 16px 0;
}

.saas-desc {
    font-size: 0.92rem; line-height: 1.6; color: #625c70;
    margin: 0 0 24px 0;
}

.saas-feats {
    list-style: none; padding: 0; margin: 0 0 32px 0;
    display: flex; flex-direction: column; gap: 12px;
    flex: 1;
}
.saas-feats li {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.9rem; font-weight: 500; color: #2d2a3d;
}
.saas-feats li .chk {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #ede8f7; color: #7356bf; font-size: 12px; font-weight: 800; flex-shrink: 0;
}

.saas-btn {
    font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #7b58cf, #623db8);
    color: #ffffff; text-decoration: none; font-weight: 700; font-size: 1rem;
    padding: 16px 24px; border-radius: 16px;
    box-shadow: 0 10px 25px rgba(115, 86, 191, 0.35);
    transition: all 0.25s; margin-top: auto;
}
.saas-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(115, 86, 191, 0.45);
}

/* ── Right Showcase Column Layout ───────────── */
.saas-showcase {
    background: #f4f1f8;
    padding: 32px;
    display: flex; flex-direction: column; gap: 20px;
    overflow-y: auto;
}

.show-nav {
    display: flex; align-items: center; justify-content: space-between;
    background: #ffffff; padding: 14px 20px; border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.show-nav-left { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; color: #1a1824; }
.show-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: #16a34a; background: #dcfce7; padding: 4px 10px; border-radius: 12px; }
.show-status::before { content:''; width:8px; height:8px; border-radius:50%; background:#16a34a; }

.show-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.show-stat-card {
    background: #ffffff; padding: 16px; border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.show-stat-lbl { font-size: 0.8rem; color: #6b657b; font-weight: 600; margin-bottom: 6px; }
.show-stat-val { font-size: 1.45rem; font-weight: 800; color: #110e1a; }
.show-stat-dyn { font-size: 0.75rem; font-weight: 700; color: #16a34a; margin-top: 4px; }

.show-chat-mock {
    background: #ffffff; border-radius: 20px; padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    display: flex; flex-direction: column; gap: 16px; flex: 1;
}
.chat-msg-user {
    align-self: flex-start; background: #f3f0f7; padding: 12px 16px; border-radius: 16px 16px 16px 4px;
    max-width: 80%; font-size: 0.9rem; color: #2d2a3d; font-weight: 500;
}
.chat-msg-ai {
    align-self: flex-end; background: #ede8f7; color: #2e1d5e; padding: 14px 18px; border-radius: 16px 16px 4px 16px;
    max-width: 85%; font-size: 0.9rem; line-height: 1.5; font-weight: 500;
}
.chat-imgs-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px;
}
.chat-img-thumb {
    height: 76px; background: #ddd; border-radius: 8px; background-size: cover; background-position: center;
}
