/* ====================================================
   DeepSightMind — Neural Network Theme
   Font: Montserrat | Colors: #fff · #000 · #1b17ff
   ==================================================== */

:root {
    --bg: #ffffff;
    --off: #f6f7fb;
    --border: #e4e6f0;
    --text-1: #0b0b1a;
    --text-2: #5a5a7a;
    --text-3: #aaaacc;
    --blue: #1b17ff;
    --blue-lt: rgba(27,23,255,0.08);
    --blue-md: rgba(27,23,255,0.18);
    --font: 'Montserrat', sans-serif;
    --ease: cubic-bezier(.16,1,.3,1);
    --sh: 0 2px 12px rgba(27,23,255,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --sh-lg: 0 8px 40px rgba(27,23,255,0.1), 0 2px 8px rgba(0,0,0,0.05);
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
p { color: var(--text-2); line-height: 1.65; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ====================================================
   NAVBAR
   ==================================================== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 920px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 9999px;
    padding: 0.52rem 0.65rem 0.52rem 1.3rem;
    box-shadow:
        0 2px 12px rgba(27, 23, 255, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    pointer-events: all;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.nav-logo .logo-img { height: 26px; width: auto; object-fit: contain; }
.nav-logo .logo-text { font-size: 1.05rem; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; }
.nav-menu { display: flex; align-items: center; justify-content: space-between; flex: 1; }
.nav-center { display: flex; gap: 0.1rem; flex: 1; justify-content: center; }
.nav-center a {
    color: var(--text-2);
    font-size: 0.78rem; font-weight: 600;
    padding: 0.36rem 0.72rem;
    border-radius: 9999px;
    transition: all .2s;
    letter-spacing: 0.01em;
}
.nav-center a:hover { color: var(--blue); background: var(--blue-lt); }
.nav-right { display: flex; align-items: center; gap: 0.4rem; }
.btn-nav-ghost {
    color: var(--text-2);
    font-size: 0.78rem; font-weight: 600;
    padding: 0.36rem 0.8rem;
    transition: color .2s;
}
.btn-nav-ghost:hover { color: var(--text-1); }
.btn-nav-solid {
    background: var(--blue);
    color: #fff;
    font-size: 0.78rem; font-weight: 600;
    padding: 0.42rem 1rem;
    border-radius: 9999px;
    transition: all .2s;
}
.btn-nav-solid:hover { background: #0d0acc; box-shadow: 0 0 0 3px rgba(27,23,255,0.2); }
.mobile-toggle { display:none; background:none; border:none; cursor:pointer; padding:6px; flex-direction:column; gap:4px; }
.mobile-toggle span { display:block; width:18px; height:2px; background: var(--text-1); border-radius:2px; transition:.3s; }

/* ====================================================
   HERO — Canvas Background
   ==================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    background: linear-gradient(160deg, #f0f3ff 0%, #ffffff 55%, #f4f6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#neuralCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    background: var(--blue-lt);
    border: 1px solid var(--blue-md);
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 2rem;
    animation: fadeUp 0.8s var(--ease) both;
}

.hero-h1 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-1);
    margin-bottom: 1.5rem;
    min-height: 1.2em;
    animation: fadeUp 0.8s var(--ease) 0.1s both;
}

/* The "We Are All ..." part stays black, last word gets blue */
#typewriterText .tw-blue { color: var(--blue); }

.tw-cursor {
    display: inline-block;
    color: var(--blue);
    font-weight: 300;
    animation: blink 0.9s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-p {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.7;
    animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.hero-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s var(--ease) 0.3s both;
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn-blue {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--blue);
    color: #fff;
    font-family: var(--font);
    font-weight: 600; font-size: 0.88rem;
    padding: 0.78rem 1.75rem;
    border-radius: 9999px;
    border: none; cursor: pointer;
    transition: all .25s var(--ease);
    letter-spacing: 0.01em;
}
.btn-blue:hover { background: #0d0acc; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,23,255,0.35); }

.btn-white {
    display: inline-flex; align-items: center;
    background: #fff;
    color: var(--text-1);
    font-family: var(--font);
    font-weight: 600; font-size: 0.88rem;
    padding: 0.78rem 1.75rem;
    border-radius: 9999px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all .2s;
}
.btn-white:hover { border-color: #bbbbd0; box-shadow: var(--sh); }

.btn-blue-sm {
    display: inline-flex; align-items: center;
    background: var(--blue); color: #fff;
    font-family: var(--font);
    font-weight: 600; font-size: 0.82rem;
    padding: 0.62rem 1.35rem;
    border-radius: 9999px;
    transition: all .2s;
}
.btn-blue-sm:hover { background: #0d0acc; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27,23,255,0.3); }

/* ====================================================
   TRUSTED
   ==================================================== */
.trusted {
    padding: 2rem 0 2.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.trusted-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-3);
    margin-bottom: 1.25rem;
}
.trusted-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.trusted-row span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.01em;
}
.tr-sep { width: 1px; height: 16px; background: var(--border); }

/* ====================================================
   CAPABILITIES
   ==================================================== */
.caps {
    padding: 7rem 0 6rem;
    background: var(--off);
}
.caps-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--blue);
    margin-bottom: 1rem;
}
.caps-title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 3.5rem;
    color: var(--text-1);
}
.caps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}
.cap-card {
    background: #fff;
    padding: 2.25rem 2rem;
    transition: background .2s;
}
.cap-card:hover { background: #fafaff; }

.cap-icon {
    width: 44px; height: 44px;
    background: var(--blue-lt);
    border: 1px solid var(--blue-md);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.cap-icon svg { width: 20px; height: 20px; stroke: var(--blue); }
.cap-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.cap-card p { font-size: 0.82rem; line-height: 1.55; }

/* ====================================================
   HOW IT WORKS
   ==================================================== */
.how { padding: 7rem 0; background: var(--bg); }
.how-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}
.how-label {
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.12em; color: var(--blue);
    margin-bottom: 1rem;
}
.how-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text-1);
}
.how-p { font-size: 0.92rem; margin-bottom: 2rem; }

.steps { display: flex; flex-direction: column; gap: 0; }
.step { 
    display: flex; gap: 1.25rem; align-items: flex-start; 
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.step:not(.active) { opacity: 0.4; } /* Fade out inactive steps */

.step-n {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    font-size: 0.72rem; font-weight: 800;
    border: 1.5px solid var(--border);
    color: var(--text-2);
    background: #fff;
    transition: all 0.4s var(--ease);
}
/* When a step is active, style the step-n inside it */
.step.active .step-n { background: var(--blue); color: #fff; border-color: var(--blue); }

.step-body { padding-top: 0.1rem; padding-bottom: 0.5rem; }
.step-body h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.step-body p { font-size: 0.82rem; }
.step-line { width: 1.5px; height: 32px; background: var(--border); margin-left: 21px; }

/* ====================================================
   STATS BAR
   ==================================================== */
.stats-bar { padding: 5rem 0; background: var(--text-1); }
.stats-inner {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.s-item { text-align: center; }
.s-num {
    display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.s-count {
    font-size: 3rem; font-weight: 800;
    letter-spacing: -0.04em; color: #fff; line-height: 1;
}
.s-suf { font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.s-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.35); font-weight: 600; margin-top: 0.4rem; letter-spacing: 0.05em; text-transform: uppercase; }
.s-sep { width: 1px; height: 56px; background: rgba(255,255,255,0.08); }

/* ====================================================
   CTA — Canvas
   ==================================================== */
.cta-section {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(160deg, #f0f3ff 0%, #fff 100%);
    overflow: hidden;
    text-align: center;
}
#ctaCanvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%; z-index: 0;
    opacity: 0.5;
}
.cta-content { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 0 1.5rem; }
.cta-content h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text-1);
}
.cta-content p { font-size: 1rem; margin-bottom: 2rem; }

/* ====================================================
   FOOTER
   ==================================================== */
.footer { padding: 4rem 0 2rem; background: var(--bg); border-top: 1px solid var(--border); }
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.8rem; max-width: 200px; }
.footer-links { display: flex; gap: 3rem; }
.footer-col h5 { font-size: 0.75rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-1); letter-spacing: 0.05em; text-transform: uppercase; }
.footer-col a { display: block; font-size: 0.8rem; color: var(--text-3); margin-bottom: 0.5rem; transition: color .2s; }
.footer-col a:hover { color: var(--text-1); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.73rem; color: var(--text-3); }

/* ====================================================
   ANIMATIONS
   ==================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal, .reveal-right {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.reveal-right { transform: translateX(18px); }
.reveal.visible, .reveal-right.visible { opacity: 1; transform: translate(0); }

.cap-card:nth-child(2) { transition-delay: .05s; }
.cap-card:nth-child(3) { transition-delay: .10s; }
.cap-card:nth-child(4) { transition-delay: .15s; }
.cap-card:nth-child(5) { transition-delay: .20s; }
.cap-card:nth-child(6) { transition-delay: .25s; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
    .how-flex { grid-template-columns: 1fr; gap: 3rem; }
    .caps-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { flex-direction: column; }
    .footer-links { gap: 2rem; flex-wrap: wrap; }
    .s-sep { display: none; }
    .stats-inner { justify-content: center; gap: 3rem; }
}
/* ====================================================
   FORMS (LOGIN & REQUEST DEMO)
   ==================================================== */
.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.auth-header {
    margin-bottom: 2rem;
    text-align: center;
    z-index: 10;
}
.auth-header img {
    height: 38px;
    margin-bottom: 1.5rem;
}
.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}
.auth-header p {
    color: var(--text-2);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
    z-index: 10;
}
.auth-card.large {
    max-width: 560px;
}
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.5rem;
}
.form-input {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-1);
    transition: all 0.2s var(--ease);
    outline: none;
    width: 100%;
}
.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-lt);
}
textarea.form-input {
    resize: vertical;
    min-height: 100px;
}
.auth-card .btn-blue {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.auth-links a {
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s;
}
.auth-links a:hover {
    color: var(--blue);
}
.back-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    background: rgba(255,255,255,0.8);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}
.back-home:hover {
    color: var(--text-1);
    background: white;
}
.lang-switcher-auth {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 20;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 2.5rem 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        gap: 2rem;
        border-bottom: 1px solid var(--border);
    }
    .navbar.active .nav-menu { display: flex; }
    .nav-center { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; }
    .nav-right { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; }
    .lang-switcher { margin-right: 0; margin-bottom: 1rem; width: 100%; max-width: 200px; text-align: center; background-position: calc(100% - 1rem) center; }
    
    .mobile-toggle { display: flex; }
    .navbar.active .mobile-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .navbar.active .mobile-toggle span:nth-child(2) { opacity: 0; }
    .navbar.active .mobile-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .caps-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-blue, .btn-white { width: 100%; max-width: 300px; justify-content: center; }
    .trusted-row { gap: 1rem; }
    .tr-sep { display: none; }
}

/* ====================================================
   LANGUAGE SWITCHER
   ==================================================== */
.lang-switcher {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.45rem 2rem 0.45rem 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23111827" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 14px;
    color: var(--text-1);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.2s var(--ease);
    margin-right: 1rem;
}
.lang-switcher:hover {
    border-color: rgba(0,0,0,0.15);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.lang-switcher:focus {
    border-color: var(--blue);
}

/* ====================================================
   RTL SUPPORT (ARABIC)
   ==================================================== */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .logo-text { margin-left: 0; margin-right: 12px; }
[dir="rtl"] .step-line { margin-left: 0; margin-right: 21px; }
[dir="rtl"] .hero-h1, [dir="rtl"] .hero-p { text-align: right; }
[dir="rtl"] .hero-btns { justify-content: flex-start; }
[dir="rtl"] .s-item, [dir="rtl"] .footer-brand p { text-align: right; }
[dir="rtl"] .mobile-toggle { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .caps-title { text-align: right; }
[dir="rtl"] .how-title, [dir="rtl"] .how-p { text-align: right; }
[dir="rtl"] .cta-content h2, [dir="rtl"] .cta-content p { text-align: right; }
[dir="rtl"] .back-home { right: 2rem; left: auto; flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher-auth { left: 2rem; right: auto; }
