:root {
    --bg-dark: #0a0e27;
    --bg-dark-2: #0d1330;
    --accent: #00d9b5;
    --accent-soft: rgba(0, 217, 181, 0.12);
    --text-light: #f4f6fb;
    --text-muted: #9aa3bd;
    --text-body: #4a5168;
    --border-dark: #1f2748;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text-body);
    background: #ffffff;
    scroll-behavior: smooth;
}

a { text-decoration: none; }

/* ===================== NAVBAR ===================== */
.navbar-aimatic {
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-dark);
}

.navbar-aimatic .brand {
    color: var(--text-light);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar-aimatic .brand i { color: var(--accent); margin-right: 8px; }

.navbar-aimatic .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    margin: 0 10px;
}

.navbar-aimatic .nav-link:hover { color: var(--accent) !important; }

/* ===================== LANGUAGE DROPDOWN ===================== */
.lang-dropdown .dropdown-toggle::after { display: none; }

.flag-icon {
    width: 40px;
    height: auto;
    object-fit: contain;
}

.flag-icon-sm {
    width: 28px;
    height: auto;
    object-fit: contain;
}

.lang-dropdown .dropdown-menu {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-dark);
    min-width: 180px;
}

.lang-dropdown .dropdown-item {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 16px;
}

.lang-dropdown .dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.lang-dropdown .dropdown-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* ===================== USER DROPDOWN ===================== */
.user-dropdown .dropdown-toggle::after { display: none; }

.user-toggle {
    color: var(--text-light);
    font-size: 18px;
}

.user-toggle:hover { color: var(--accent); }

.user-dropdown .dropdown-menu {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-dark);
    min-width: 180px;
}

.user-dropdown .dropdown-item {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 16px;
}

.user-dropdown .dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ===================== PROFILE PAGE ===================== */
.profile-card {
    background: white;
    border: 1px solid #eef0f6;
    border-radius: 16px;
    padding: 36px 32px;
}

.profile-card .form-label {
    font-weight: 600;
}

.profile-card .form-control {
    border-radius: 10px;
    padding: 10px 14px;
    border: 1.5px solid #e3e6f0;
}

.profile-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

/* ===================== AUTH PAGE ===================== */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fc;
    padding: 60px 20px;
}

.auth-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(20, 30, 70, 0.1);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
}

.auth-card .auth-logo {
    text-align: center;
    color: var(--accent);
    font-size: 36px;
    margin-bottom: 18px;
}

.auth-card h4 {
    font-weight: 800;
    color: #16213e;
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .form-control {
    border-radius: 10px;
    padding: 12px 16px;
    border: 1.5px solid #e3e6f0;
    margin-bottom: 16px;
}

.auth-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

.auth-card .input-group {
    margin-bottom: 16px;
}

.auth-card .input-group .form-control {
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.auth-card .toggle-password {
    border: 1.5px solid #e3e6f0;
    border-left: none;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    color: var(--text-muted);
}

.auth-card .toggle-password:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.auth-card .btn-uni {
    width: 100%;
    padding: 12px;
}

/* ===================== HERO ===================== */
.hero {
    background: radial-gradient(circle at 20% 20%, #131b3f 0%, var(--bg-dark) 55%, #060815 100%);
    color: var(--text-light);
    padding: 100px 0 110px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,217,181,0.18) 0%, transparent 70%);
}

.hero .eyebrow {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 22px;
}

.hero h1 span { color: var(--accent); }

.hero p.lead {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Mock phone/chat card in hero */
.hero-card {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-dark);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.hero-card .call-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 16px;
}

.hero-card .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: blink 1.4s infinite;
}

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

.hero-card .bubble {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    font-size: 14px;
    max-width: 90%;
}

.hero-card .bubble.ai {
    background: #16204a;
    color: #cfd6f0;
    border-left: 3px solid var(--accent);
}

.hero-card .bubble.user {
    background: var(--accent-soft);
    color: var(--text-light);
    margin-left: auto;
    border-right: 3px solid var(--accent);
}

/* ===================== SECTION GENERIC ===================== */
section { padding: 90px 0; }

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title .eyebrow {
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-title h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #16213e;
    margin-top: 10px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 14px auto 0;
}

.bg-soft { background: #f7f9fc; }

/* ===================== PIPELINE / COME FUNZIONA ===================== */
.pipeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    counter-reset: step;
}

.pipeline-step {
    flex: 1 1 12%;
    min-width: 150px;
    text-align: center;
    padding: 0 14px;
    position: relative;
}

.pipeline-step .icon-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--bg-dark);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 2;
    border: 3px solid var(--accent-soft);
}

.pipeline-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 32px;
    left: 58%;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-dark) 0 6px, transparent 6px 12px);
    z-index: 1;
}

.pipeline-step h6 {
    font-weight: 700;
    color: #16213e;
    font-size: 14px;
    margin-bottom: 6px;
}

.pipeline-step p {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* ===================== CARDS (Target / Personalizzazione) ===================== */
.feature-card {
    background: white;
    border: 1px solid #eef0f6;
    border-radius: 16px;
    padding: 30px 26px;
    height: 100%;
    transition: all 0.25s ease;
}

.feature-card:hover {
    box-shadow: 0 14px 40px rgba(20, 30, 70, 0.08);
    transform: translateY(-4px);
}

.feature-card .icon-box {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: #049981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 18px;
}

.feature-card h5 {
    font-weight: 700;
    color: #16213e;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
}

/* ===================== STATS / PERFORMANCE ===================== */
.stats-section {
    background: var(--bg-dark);
    color: var(--text-light);
}

.stat-box { text-align: center; padding: 10px; }

.stat-box .stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-box .stat-label {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 6px;
}

.stats-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 40px;
    font-style: italic;
}

/* ===================== CTA FINALE ===================== */
.cta-final {
    background: linear-gradient(135deg, #0a0e27 0%, #102047 100%);
    color: var(--text-light);
    border-radius: 24px;
    padding: 60px 50px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-final h2 { font-weight: 800; margin-bottom: 14px; }
.cta-final p { color: var(--text-muted); margin-bottom: 30px; }

/* ===================== FOOTER ===================== */
.footer-aimatic {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 13.5px;
    text-align: center;
    border-top: 1px solid var(--border-dark);
}

.footer-aimatic a { color: var(--accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991px) {
    .hero { padding: 70px 0 80px; text-align: center; }
    .hero p.lead { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-card { margin-top: 40px; }
    .pipeline-step:not(:last-child)::before { display: none; }
    .pipeline-step { flex: 1 1 45%; margin-bottom: 30px; }
}

@media (max-width: 575px) {
    .hero h1 { font-size: 2.2rem; }
    .cta-final { padding: 40px 24px; }
}
