:root {
    /* SafeTalkAI Colors - Deepened for Bardo feel */
    --bg0: #02040a;
    /* Almost black */
    --bg1: #070a14;
    /* Deep Navy */
    --bg2: #0b1020;

    --card: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);

    --txt: #e8ecff;
    --muted: rgba(232, 236, 255, 0.65);

    /* Accents - Retaining Purple Identity but making it 'electric' */
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.5);
    --accent2: #8b5cf6;

    --radius: 24px;
    /* Larger radius like Bardo */
    --pill: 9999px;

    --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    --border-highlight: 1px solid rgba(255, 255, 255, 0.15);

    --shadow1: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow2: 0 20px 50px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--txt);
    background-color: var(--bg0);
    background-image: radial-gradient(circle at 50% 0%, var(--bg2), var(--bg0));
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #fff;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6,
.brand-text {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: #fff;
    letter-spacing: -0.02em;
}

/* ===== Glow Background ===== */
.app-bg {
    position: relative;
}

.app-bg::before {
    content: "";
    position: fixed;
    top: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 50% 10%, rgba(124, 58, 237, 0.15), transparent 40%),
        radial-gradient(circle at 10% 40%, rgba(124, 58, 237, 0.05), transparent 30%),
        radial-gradient(circle at 90% 40%, rgba(56, 189, 248, 0.05), transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* ===== Navbar Refinement ===== */
.topbar {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin: 0 auto;
    max-width: 1200px;
}

.navbar {
    background: rgba(11, 16, 32, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--pill);
    padding: 0.5rem 1.8rem;
    margin: 0 1rem;
}

@media (min-width: 992px) {
    .navbar {
        padding: 0.8rem 2rem;
    }
}

.brand-text {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    color: #fff;
    text-transform: uppercase;
}

.brand-text span {
    color: var(--accent);
}

.nav-link {
    color: rgba(232, 236, 255, 0.6) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem !important;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #fff !important;
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--pill);
    padding: 1rem 2.2rem;
    font-weight: 600;
    font-size: 1rem;
    border: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cta {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.btn-cta:hover {
    background: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.4);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-3px);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 12rem 0 8rem;
    /* Increased padding for Bardo-like airiness */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border-radius: var(--pill);
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* ===== Typography & Colors ===== */
.hero-title {
    font-size: clamp(3.2rem, 6vw, 5rem);
    line-height: 1;
    font-weight: 800;
    max-width: 20ch;
    margin: 0 auto 2rem;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted,
.trust-sub,
.hero-lead,
.section-head p,
.panel-head p {
    color: rgba(232, 236, 255, 0.75) !important;
    /* Increased readability */
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 60ch;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 5rem;
    /* Larger gap like Bardo */
}

/* ===== Trust Grid ===== */
.trust-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 3rem auto 0;
    width: 100%;
    max-width: 1100px;
}

.trust-item {
    flex: 0 1 auto;
    /* Don't grow too much */
    min-width: 260px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.2rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-align: left;
    transition: all 0.3s ease;
}

.trust-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.trust-item i {
    font-size: 1.5rem;
    color: var(--accent2);
}

.trust-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.trust-sub {
    font-size: 0.85rem;
    margin: 0;
    color: var(--muted);
}

/* ===== Sections ===== */
.section {
    padding: 6rem 0;
}

.section-head {
    text-align: center;
    margin-bottom: 4rem;
}

.section-head h2 {
    font-size: clamp(2.5rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-head p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 60ch;
    margin: 0 auto;
}

/* ===== Code/Feature Cards ===== */
.hero-card {
    background: #0d121f;
    border: var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow2);
    margin: 0 auto;
    max-width: 900px;
}

.hero-card-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.codebox {
    background: transparent;
    padding: 2rem;
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    color: #a5b4fc;
}

/* ===== KPI / Card Refinement ===== */
.hero-card-bottom {
    display: flex;
    gap: 12px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.mini-kpi {
    flex: 1;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    transition: 0.3s;
}

.mini-kpi:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.kpi-label {
    display: block;
    color: #a78bfa;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.kpi-value {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== Feature Cards (Grid) ===== */
.cardx {
    height: 100%;
    background: var(--card);
    border: var(--border-subtle);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: 0.3s;
}

.cardx:hover {
    background: var(--card-hover);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cardx-icon {
    width: 50px;
    height: 50px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.cardx h5 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.cardx p {
    font-size: 1rem;
    color: var(--muted);
}

/* ===== Steps ===== */
.steps {
    background: var(--card);
    border: var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
}

.step {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.step:last-child {
    border-bottom: none;
}

.step-nr {
    width: 32px;
    height: 32px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-body h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ===== FAQ / Accordion (Dark) ===== */
.accordion-dark {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: rgba(255, 255, 255, 0.08);
}

.accordion-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-button {
    background: transparent !important;
    color: #fff !important;
    font-weight: 600;
    padding: 1.5rem;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #a78bfa !important;
}

.accordion-button::after {
    filter: invert(1);
    /* Make arrows white */
}

.accordion-body {
    color: rgba(232, 236, 255, 0.7);
    padding: 0.8rem 1.5rem 1.5rem;
    line-height: 1.7;
}

/* ===== Form Controls (Dark) ===== */
.form-control,
.form-select,
textarea {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 0.8rem 1.2rem !important;
    border-radius: 14px !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1) !important;
}

.form-label {
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== Footer Fixes ===== */
.footer {
    background: #000;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--muted);
    display: block;
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .topbar {
        top: 0;
    }

    .navbar {
        border-radius: 0;
        border: 0;
        border-bottom: var(--border-subtle);
    }

    .hero {
        padding: 5rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}