/* ============================================================
   PHARMACOPILOT — Custom Stylesheet
   Bootstrap 5.3 + bespoke design system
   ============================================================ */

/* ---- Design tokens ---- */
:root {
    --pc-navy:       #1A3C5E;
    --pc-navy-dark:  #112947;
    --pc-teal:       #00A896;
    --pc-teal-dark:  #007D6E;
    --pc-bg:         #F8FAFC;
    --pc-text:       #1E293B;
    --pc-muted:      #64748B;
    --pc-border:     #E2E8F0;
    --pc-white:      #FFFFFF;
    --pc-radius:     12px;
    --pc-shadow:     0 4px 24px rgba(26, 60, 94, 0.10);
    --pc-shadow-lg:  0 8px 48px rgba(26, 60, 94, 0.15);
}

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--pc-text);
    background-color: var(--pc-white);
    -webkit-font-smoothing: antialiased;
}

/* ---- Shared section rhythm ---- */
.py-section { padding: 96px 0; }

/* ---- Navbar ---- */
#mainNav {
    background-color: var(--pc-navy);
    padding: 16px 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

#mainNav.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.20);
}

.logo-text {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: white;
    font-weight: 400;
}

.logo-text strong { font-weight: 800; }

.badge-beta {
    background: var(--pc-teal);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: middle;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover { color: white !important; }

/* ---- Shared button ---- */
.btn-accent {
    background-color: var(--pc-teal);
    border-color: var(--pc-teal);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-accent:hover {
    background-color: var(--pc-teal-dark);
    border-color: var(--pc-teal-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-accent:active { transform: translateY(0); }
.btn-accent:focus-visible { box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.35); }

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(140deg, var(--pc-navy) 0%, var(--pc-navy-dark) 100%);
    padding: 140px 0 96px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -8%;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: rgba(0, 168, 150, 0.06);
    pointer-events: none;
}

.badge-pill {
    display: inline-block;
    background: rgba(0, 168, 150, 0.12);
    border: 1px solid rgba(0, 168, 150, 0.30);
    color: #5DDDD1;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.hero-headline {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-top: 14px;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
    margin-top: 16px;
    max-width: 510px;
}

/* ---- Chat mockup (hero) ---- */
.chat-mockup {
    background: white;
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-lg);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
}

.chat-header {
    background: var(--pc-navy);
    color: white;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9CA3AF;
    flex-shrink: 0;
}

.chat-dot.online { background: var(--pc-teal); }

.chat-badge {
    font-size: 0.68rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
}

.chat-body {
    padding: 16px;
    background: var(--pc-bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 88%;
    font-size: 0.845rem;
    line-height: 1.55;
}

.chat-msg.user {
    background: var(--pc-navy);
    color: white;
    padding: 10px 14px;
    border-radius: 12px 12px 4px 12px;
    align-self: flex-end;
}

.chat-msg.bot {
    background: white;
    border: 1px solid var(--pc-border);
    padding: 12px 14px;
    border-radius: 12px 12px 12px 4px;
    align-self: flex-start;
}

.interaction-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #DC2626;
    margin-bottom: 6px;
}

.source-tag {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--pc-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-input-bar {
    padding: 11px 14px;
    background: white;
    border-top: 1px solid var(--pc-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-fake {
    flex: 1;
    background: var(--pc-bg);
    border: 1px solid var(--pc-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.78rem;
    color: var(--pc-muted);
}

.chat-send-btn {
    background: var(--pc-teal);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: default;
    flex-shrink: 0;
}

/* ---- Section labels ---- */
.section-label {
    display: inline-block;
    color: var(--pc-teal);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.section-label-light {
    display: inline-block;
    color: rgba(0, 200, 183, 0.85);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.55rem, 2.8vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--pc-text);
}

.section-sub {
    color: var(--pc-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-top: 12px;
}

.section-text {
    color: var(--pc-muted);
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 0.975rem;
}

.section-text strong { color: var(--pc-text); }

/* ---- Problem cards ---- */
.problem-card {
    background: white;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 28px;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.problem-card:hover {
    box-shadow: var(--pc-shadow);
    transform: translateY(-3px);
}

.problem-icon {
    width: 46px;
    height: 46px;
    background: rgba(26, 60, 94, 0.07);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--pc-navy);
    margin-bottom: 16px;
}

.problem-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.problem-card p {
    font-size: 0.875rem;
    color: var(--pc-muted);
    margin: 0;
    line-height: 1.65;
}

/* ---- Stat cards (solution) ---- */
.stat-card {
    background: white;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 26px 20px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--pc-shadow); }

.stat-card.accent {
    background: var(--pc-navy);
    border-color: var(--pc-navy);
}

.stat-card.accent .stat-number,
.stat-card.accent .stat-label { color: white; }

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pc-navy);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-card .bi {
    font-size: 1.9rem;
    color: var(--pc-teal);
}

.stat-card.accent .bi { color: var(--pc-teal); }

.stat-label {
    font-size: 0.82rem;
    color: var(--pc-muted);
    margin-top: 7px;
    line-height: 1.45;
}

/* ---- Feature cards ---- */
.feature-card {
    background: var(--pc-bg);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 28px;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    box-shadow: var(--pc-shadow);
    border-color: var(--pc-teal);
    transform: translateY(-3px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 168, 150, 0.10);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--pc-teal);
    margin-bottom: 14px;
}

.feature-card h5 {
    font-size: 0.975rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.865rem;
    color: var(--pc-muted);
    margin: 0;
    line-height: 1.65;
}

/* ---- Demo section ---- */
.demo-section {
    background: linear-gradient(140deg, #0D2035 0%, #1A3C5E 100%);
}

.demo-section .section-title { color: white; }

.demo-chat {
    background: #162737;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pc-radius);
    overflow: hidden;
}

.demo-chat-header {
    background: rgba(0, 0, 0, 0.25);
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.demo-dot {
    width: 8px;
    height: 8px;
    background: var(--pc-teal);
    border-radius: 50%;
    flex-shrink: 0;
}

.demo-scenario-tag {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.demo-messages {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.demo-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
}

.demo-msg.user  { align-self: flex-end; }
.demo-msg.bot   { align-self: flex-start; }

.demo-msg-bubble {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.865rem;
    line-height: 1.65;
}

.demo-msg.user .demo-msg-bubble {
    background: rgba(26, 60, 94, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    border-radius: 12px 12px 4px 12px;
}

.demo-msg.bot .demo-msg-bubble {
    background: #1E3347;
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.82);
    border-radius: 12px 12px 12px 4px;
}

.demo-msg-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.demo-msg.user .demo-msg-label { text-align: right; }

.demo-alert-banner {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #FCA5A5;
    font-size: 0.82rem;
}

.demo-source {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    gap: 5px;
}

.demo-ok-banner {
    color: #86EFAC;
    font-size: 0.865rem;
    font-weight: 500;
}

/* Demo message entrance animation */
.fade-msg {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Audience cards ---- */
.audience-card {
    background: white;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 30px;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.audience-card:hover {
    box-shadow: var(--pc-shadow);
    transform: translateY(-3px);
}

.audience-icon {
    width: 50px;
    height: 50px;
    background: var(--pc-navy);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
    margin-bottom: 16px;
}

.audience-card h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
}

.audience-card > p {
    font-size: 0.865rem;
    color: var(--pc-muted);
    line-height: 1.65;
    margin-bottom: 14px;
}

.audience-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audience-list li {
    font-size: 0.8rem;
    color: var(--pc-muted);
    padding: 3px 0;
}

.audience-list li::before {
    content: '—';
    color: var(--pc-teal);
    font-weight: 700;
    margin-right: 7px;
}

/* ---- Form section ---- */
.form-section {
    background-color: var(--pc-bg);
}

.form-card {
    background: white;
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-lg);
    padding: 40px;
}

.form-control,
.form-select {
    border-color: var(--pc-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--pc-teal);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.855rem;
    margin-bottom: 5px;
}

.form-check-label {
    font-size: 0.83rem;
    color: var(--pc-muted);
    line-height: 1.5;
}

.form-check-label a {
    color: var(--pc-teal);
    text-decoration: none;
}

.form-check-label a:hover { text-decoration: underline; }

.form-check-input:checked {
    background-color: var(--pc-teal);
    border-color: var(--pc-teal);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.15);
}

.success-icon {
    font-size: 3rem;
    color: var(--pc-teal);
    line-height: 1;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--pc-navy-dark);
    color: rgba(255, 255, 255, 0.55);
    padding: 52px 0;
}

.footer-logo {
    font-size: 1.15rem;
    font-weight: 400;
    color: white;
}

.footer-logo strong { font-weight: 800; }

.footer-tagline {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.6;
}

.footer-link {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover { color: white; }

.footer-sep {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 8px;
}

.footer-powered {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.footer-powered a {
    color: var(--pc-teal);
    text-decoration: none;
}

.footer-powered a:hover { text-decoration: underline; }

.footer-copy {
    font-size: 0.78rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.35);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .py-section { padding: 64px 0; }
    .hero-section { padding: 100px 0 60px; }
    .chat-mockup { max-width: 400px; }
    .form-card { padding: 28px 22px; }
}

@media (max-width: 767.98px) {
    .hero-section { padding: 88px 0 48px; }
    .py-section { padding: 52px 0; }
    .stat-number { font-size: 2rem; }
    .demo-messages { padding: 16px; }
}
