/* ========================================================================
   DiabetesPredict — Lark Finserv-inspired Design System
   Colors: Blue (#2563eb) to Purple (#7c3aed) gradient
   Font: Inter
   ======================================================================== */

:root {
    --color-blue: #2563eb;
    --color-purple: #7c3aed;
    --color-blue-dark: #1d4ed8;
    --color-purple-dark: #6d28d9;
    --color-blue-light: #eff6ff;
    --color-purple-light: #f5f3ff;
    --gradient-primary: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    --gradient-primary-hover: linear-gradient(135deg, var(--color-blue-dark), var(--color-purple-dark));
    --gradient-subtle: linear-gradient(180deg, #f8fafc, #ffffff);
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--color-text); }
p { color: var(--color-text-secondary); }
a { text-decoration: none; transition: var(--transition); }

/* ── Gradient Buttons ────────────────────────────────────────────────── */
.btn-gradient {
    background: var(--gradient-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    padding: 10px 28px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}
.btn-gradient:hover {
    background: var(--gradient-primary-hover);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
    color: #fff !important;
}
.btn-gradient-lg { padding: 14px 40px; font-size: 1.05rem; }

.btn-outline-gradient {
    background: transparent;
    color: var(--color-blue);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-weight: 600;
    padding: 10px 28px;
    background-image: linear-gradient(#fff, #fff), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: var(--transition);
}
.btn-outline-gradient:hover {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    z-index: 1040;
    transition: var(--transition);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar .nav-link {
    color: var(--color-text) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 16px !important;
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.navbar .nav-link:hover { color: var(--color-blue) !important; background: var(--color-blue-light); }
.navbar .nav-link.active { color: var(--color-blue) !important; background: var(--color-blue-light); }
.navbar-toggler { box-shadow: none !important; }

/* ── Hero Section ────────────────────────────────────────────────────── */
.hero-section {
    background: var(--gradient-subtle);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(124,58,237,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section .container { position: relative; z-index: 1; }
.hero-title {
    font-size: 3.5rem; font-weight: 800;
    line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    line-height: 1.8;
}

/* Hero pipeline card */
.hero-pipeline {
    background: #0f172a;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.06);
    max-width: 520px;
}
.hero-pipeline .pipeline-header {
    color: #94a3b8;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-pipeline .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: #22c55e; }
.dot-yellow { background: #eab308; }
.dot-blue { background: #3b82f6; }
.hero-pipeline .metric-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hero-pipeline .metric-label { color: #94a3b8; }
.hero-pipeline .metric-value { color: #22c55e; font-weight: 600; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-weight: 600;
    padding: 16px 20px;
}

/* Stat Cards */
.stat-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
}
.stat-card .stat-number {
    font-size: 2.5rem; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card .stat-label { font-size: 0.9rem; color: var(--color-text-secondary); font-weight: 500; }

/* Feature Cards */
.feature-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    background: #fff;
}
.feature-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.feature-icon-wrapper {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
}
.feature-icon-wrapper.blue { background: var(--color-blue-light); color: var(--color-blue); }
.feature-icon-wrapper.purple { background: var(--color-purple-light); color: var(--color-purple); }
.feature-icon-wrapper.green { background: #f0fdf4; color: #16a34a; }
.feature-card h5 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.feature-card p { font-size: 0.92rem; line-height: 1.7; }

/* ── Section Styles ──────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-gradient { background: var(--gradient-subtle); }

/* ── Prediction Page ─────────────────────────────────────────────────── */
.predict-form .form-label { font-weight: 600; font-size: 0.88rem; color: var(--color-text); margin-bottom: 6px; }
.predict-form .form-control,
.predict-form .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.92rem;
    transition: var(--transition);
    background: #fff;
}
.predict-form .form-control:focus,
.predict-form .form-select:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.predict-form .form-text { font-size: 0.78rem; color: #94a3b8; }

/* Risk Results */
.risk-result {
    border-radius: var(--radius-lg);
    padding: 40px; text-align: center;
    position: relative; overflow: hidden;
}
.risk-low {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0; color: #166534;
}
.risk-high {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca; color: #991b1b;
}
.risk-probability { font-size: 3rem; font-weight: 800; line-height: 1; margin: 12px 0; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-modern { font-size: 0.9rem; }
.table-modern thead th {
    background: var(--gradient-primary);
    color: #fff; font-weight: 600;
    padding: 14px 16px; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.03em; border: none;
}
.table-modern tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table-modern tbody tr:hover { background: var(--color-blue-light); }

/* ── Methodology Flow ────────────────────────────────────────────────── */
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 16px; }
.flow-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; box-shadow: var(--shadow-sm);
}
.flow-step span { font-size: 0.8rem; font-weight: 600; color: var(--color-text); }
.flow-arrow { padding: 0 4px; color: #cbd5e1; }

/* ── Team Cards ──────────────────────────────────────────────────────── */
.team-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    padding: 32px 24px; text-align: center;
    transition: var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.team-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--gradient-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Tech Badges ─────────────────────────────────────────────────────── */
.tech-badge {
    display: inline-block; padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem; font-weight: 500;
    background: var(--color-blue-light); color: var(--color-blue);
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: var(--transition);
}
.tech-badge:hover { background: var(--gradient-primary); color: #fff; border-color: transparent; }

/* ── CTA Section ─────────────────────────────────────────────────────── */
.cta-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 60px 40px; text-align: center;
    color: #fff; position: relative; overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute; top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.cta-section h3 { color: #fff; font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.85); font-size: 1.05rem; }

.btn-white {
    background: #fff; color: var(--color-blue);
    font-weight: 600; border-radius: var(--radius-full);
    padding: 12px 32px; border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.btn-white:hover { background: #f8fafc; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); color: var(--color-blue); }

.btn-outline-white {
    background: transparent; color: #fff;
    font-weight: 600; border-radius: var(--radius-full);
    padding: 12px 32px; border: 2px solid rgba(255,255,255,0.4);
    transition: var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }

/* ── Guide Card ──────────────────────────────────────────────────────── */
.guide-card {
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background-image: linear-gradient(#fff, #fff), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 32px 24px; text-align: center;
    transition: var(--transition);
}
.guide-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
    background: #0f172a; color: #cbd5e1;
    padding: 60px 0 30px; margin-top: 0;
}
.footer-brand { font-weight: 800; font-size: 1.2rem; color: #fff; }
.footer-heading {
    font-weight: 700; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #94a3b8; margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #94a3b8; font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: #fff; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .hero-title { font-size: 2.5rem; }
    .hero-section { padding: 70px 0 50px; }
    .hero-pipeline { display: none; }
    .section-header h2 { font-size: 1.8rem; }
}
@media (max-width: 767.98px) {
    .hero-title { font-size: 2rem; }
    .hero-section { padding: 50px 0 40px; }
    .stat-card .stat-number { font-size: 2rem; }
    .cta-section { padding: 40px 24px; border-radius: var(--radius-lg); }
    .cta-section h3 { font-size: 1.5rem; }
    .risk-probability { font-size: 2.2rem; }
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

::selection { background: rgba(37, 99, 235, 0.15); color: var(--color-text); }
