/* EthioDent AI Landing Page — self-hosted (CSP-safe) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
    --brand-800: #115e59;
    --brand-900: #134e4a;
    --brand-950: #042f2e;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-500: #ef4444;
    --red-700: #b91c1c;
    --white: #ffffff;
    --shadow-card: 0 4px 24px -4px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 60px -12px rgba(20, 184, 166, 0.45);
    --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    --container: 72rem;
    --nav-h: 4rem;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--slate-800);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.l-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 640px) { .l-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .l-container { padding: 0 2rem; } }

.l-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.l-icon-lg { width: 1.75rem; height: 1.75rem; }
.l-icon-sm { width: 1rem; height: 1rem; }

/* NAV */
.l-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    height: var(--nav-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-100);
}
.l-nav__inner {
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.l-logo {
    display: flex; align-items: center; gap: 0.625rem;
    font-weight: 800; font-size: 1.125rem; color: var(--slate-900);
}
.l-logo__mark {
    width: 2.25rem; height: 2.25rem; border-radius: 0.75rem;
    display: block; flex-shrink: 0; object-fit: cover;
    box-shadow: 0 4px 14px rgba(13,148,136,0.35);
}
.l-logo span { color: var(--brand-600); }
.l-nav__links { display: none; gap: 2rem; font-size: 0.875rem; font-weight: 500; color: var(--slate-600); }
.l-nav__links a:hover { color: var(--brand-700); }
.l-nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.l-nav__signin { display: none; font-size: 0.875rem; font-weight: 600; color: var(--slate-700); padding: 0.5rem 0.75rem; }
.l-nav__signin:hover { color: var(--brand-700); }

@media (min-width: 640px) { .l-nav__signin { display: inline-flex; } }
@media (min-width: 768px) { .l-nav__links { display: flex; } }

.l-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1rem; border-radius: 0.75rem;
    font-size: 0.875rem; font-weight: 700; transition: all 0.2s ease;
}
.l-btn--primary {
    background: var(--brand-700); color: var(--white);
    box-shadow: 0 4px 14px rgba(15,118,110,0.3);
}
.l-btn--primary:hover { background: var(--brand-800); transform: translateY(-1px); }
.l-btn--white {
    background: var(--white); color: var(--brand-800);
    box-shadow: var(--shadow-glow);
}
.l-btn--white:hover { background: var(--brand-50); }
.l-btn--outline-white {
    border: 2px solid rgba(255,255,255,0.4); color: var(--white);
    padding: 0.875rem 2rem; border-radius: 1rem; font-size: 1rem;
}
.l-btn--outline-white:hover { background: rgba(255,255,255,0.1); }
.l-btn--lg { padding: 1rem 2rem; border-radius: 1rem; font-size: 1rem; }
.l-btn--full { width: 100%; padding: 1rem; border-radius: 1rem; font-size: 1rem; }

/* HERO */
.l-hero {
    padding: calc(var(--nav-h) + 4rem) 0 5rem;
    background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-700) 45%, var(--brand-900) 100%);
    color: var(--white);
    position: relative; overflow: hidden;
}
.l-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(at 20% 30%, rgba(20,184,166,0.25) 0, transparent 50%),
        radial-gradient(at 80% 70%, rgba(34,197,94,0.15) 0, transparent 45%);
    pointer-events: none;
}
.l-hero__content { position: relative; max-width: 48rem; }
.l-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.25rem 0.75rem; border-radius: 9999px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--brand-100); margin-bottom: 1.5rem;
}
.l-badge__dot {
    width: 0.5rem; height: 0.5rem; border-radius: 50%;
    background: var(--emerald-400);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.l-hero h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 900; line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.l-hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(204,251,241,0.9); line-height: 1.7;
    margin-bottom: 2.5rem; max-width: 42rem;
}
.l-hero__ctas {
    display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 640px) { .l-hero__ctas { flex-direction: row; } }
.l-hero__trust {
    margin-top: 1.5rem; font-size: 0.875rem; color: rgba(153,246,228,0.8);
}

@media (min-width: 640px) { .l-hero { padding: calc(var(--nav-h) + 5rem) 0 7rem; } }

/* SECTIONS */
.l-section { padding: 5rem 0; }
.l-section--muted { background: var(--slate-50); }
.l-section__header { text-align: center; margin-bottom: 3.5rem; }
.l-section__header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900; color: var(--slate-900); margin-bottom: 1rem;
}
.l-section__header p { font-size: 1.125rem; color: var(--slate-600); max-width: 42rem; margin: 0 auto; }
.l-eyebrow {
    color: var(--brand-600); font-weight: 700; font-size: 0.875rem;
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem;
}

/* COMPARE GRID */
.l-grid-2 {
    display: grid; gap: 1.5rem;
}
@media (min-width: 768px) { .l-grid-2 { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.l-card {
    border-radius: 1.5rem; padding: 2rem;
    position: relative; overflow: hidden;
}
.l-card--old {
    background: var(--white); border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-card);
}
.l-card--new {
    background: linear-gradient(135deg, var(--brand-800), var(--brand-950));
    color: var(--white); box-shadow: var(--shadow-glow);
}
.l-card__tag {
    display: inline-block; padding: 0.25rem 0.75rem; border-radius: 0.5rem;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}
.l-card--old .l-card__tag { background: var(--red-100); color: var(--red-700); }
.l-card--new .l-card__tag {
    background: rgba(52,211,153,0.2); color: var(--emerald-300);
    border: 1px solid rgba(52,211,153,0.3);
}
.l-list { display: flex; flex-direction: column; gap: 1.25rem; }
.l-list__item { display: flex; gap: 1rem; align-items: flex-start; }
.l-list__icon {
    width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.l-list__icon--bad { background: var(--red-50); color: var(--red-500); }
.l-list__icon--good { background: rgba(255,255,255,0.1); color: var(--emerald-300); }
.l-list__title { font-weight: 600; color: var(--slate-900); margin-bottom: 0.25rem; }
.l-card--new .l-list__title { color: var(--white); }
.l-list__desc { font-size: 0.875rem; color: var(--slate-500); }
.l-card--new .l-list__desc { color: rgba(204,251,241,0.8); }

/* FEATURES */
.l-grid-3 {
    display: grid; gap: 2rem;
}
@media (min-width: 768px) { .l-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.l-feature {
    border-radius: 1.5rem; border: 1px solid var(--slate-100);
    padding: 2rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.l-feature:hover { border-color: rgba(13,148,136,0.3); box-shadow: var(--shadow-card); }
.l-feature__icon {
    width: 3.5rem; height: 3.5rem; border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    box-shadow: 0 8px 20px rgba(13,148,136,0.3);
    color: var(--white);
}
.l-feature__icon--green { background: linear-gradient(135deg, #10b981, var(--brand-700)); }
.l-feature__icon--slate { background: linear-gradient(135deg, var(--slate-700), var(--brand-800)); }
.l-feature h3 { font-size: 1.25rem; font-weight: 700; color: var(--slate-900); margin-bottom: 0.75rem; }
.l-feature p { font-size: 0.875rem; color: var(--slate-600); line-height: 1.7; }

/* PRICING */
.l-pricing-wrap { max-width: 28rem; margin: 0 auto; }
.l-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
}
@media (min-width: 640px) {
    .l-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .l-pricing-grid { grid-template-columns: repeat(5, 1fr); gap: 0.875rem; }
}
.l-pricing {
    background: var(--white); border-radius: 1.25rem;
    border: 1px solid var(--slate-200);
    padding: 1.5rem 1.25rem; box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,23,42,0.06));
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    text-align: center;
}
.l-pricing--featured {
    border: 2px solid rgba(13,148,136,0.45);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}
.l-pricing::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--brand-500), var(--emerald-400), var(--brand-600));
    opacity: 0.35;
}
.l-pricing--featured::before { opacity: 1; height: 5px; }
.l-pricing__badge {
    display: inline-block; padding: 0.2rem 0.65rem; border-radius: 9999px;
    background: var(--brand-50); color: var(--brand-800);
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
    margin: 0 auto 0.75rem; letter-spacing: 0.03em;
}
.l-pricing__title { font-size: 1.125rem; font-weight: 800; color: var(--slate-900); margin: 0; }
.l-pricing__label { font-size: 0.75rem; color: var(--slate-500); margin: 0.25rem 0 0; }
.l-pricing__price {
    display: flex; align-items: baseline; justify-content: center; gap: 0.3rem;
    margin: 1rem 0 0.25rem;
}
.l-pricing__amount { font-size: 1.75rem; font-weight: 900; color: var(--brand-800); letter-spacing: -0.02em; }
.l-pricing__currency { color: var(--slate-500); font-weight: 600; font-size: 0.875rem; }
.l-pricing__period { color: var(--slate-500); font-weight: 500; }
.l-pricing__effective {
    font-size: 0.8125rem; font-weight: 600; color: var(--brand-700);
    margin: 0 0 0.5rem;
}
.l-pricing__note { font-size: 0.75rem; color: var(--slate-500); text-align: center; margin-bottom: 1rem; line-height: 1.4; min-height: 2.5rem; }
.l-pricing__features { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.l-pricing__features--compact {
    gap: 0.5rem; margin-bottom: 1.25rem; text-align: left; flex: 1;
}
.l-pricing__features--compact li {
    font-size: 0.75rem; color: var(--slate-600);
    padding-left: 1rem; position: relative;
}
.l-pricing__features--compact li::before {
    content: '✓'; position: absolute; left: 0; color: var(--brand-600); font-weight: 700;
}
.l-pricing__features li {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.875rem; color: var(--slate-700);
}
.l-pricing__features svg { color: var(--brand-600); flex-shrink: 0; }
.l-pricing__footer { text-align: center; font-size: 0.75rem; color: var(--slate-400); margin-top: 1rem; }
.l-pricing__footer--wide { margin-top: 1.75rem; }
.l-btn--ghost {
    background: var(--slate-50); color: var(--brand-800); border: 1px solid var(--slate-200);
}
.l-btn--ghost:hover { background: var(--brand-50); border-color: var(--brand-200, #99f6e4); }

/* DEMO CTA */
.l-cta {
    padding: 5rem 0; background: var(--brand-950); color: var(--white); text-align: center;
}
.l-cta h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 900; margin-bottom: 1rem; }
.l-cta p { font-size: 1.125rem; color: rgba(204,251,241,0.8); max-width: 42rem; margin: 0 auto 2rem; }
.l-cta__btns {
    display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: center;
}
@media (min-width: 640px) { .l-cta__btns { flex-direction: row; } }
.l-cta .l-btn--white { color: var(--brand-900); }

/* FOOTER */
.l-footer {
    padding: 3rem 0; background: var(--slate-900); color: var(--slate-400); font-size: 0.875rem;
}
.l-footer__inner {
    display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center;
}
@media (min-width: 640px) {
    .l-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.l-footer__brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--white); }
.l-footer__mark {
    width: 2rem; height: 2rem; border-radius: 0.5rem;
    display: block; flex-shrink: 0; object-fit: cover;
}
.l-footer a { color: #2dd4bf; font-weight: 600; }
.l-footer a:hover { color: #5eead4; }

/* MODAL */
.l-modal {
    display: none; position: fixed; inset: 0; z-index: 50;
    align-items: center; justify-content: center; padding: 1rem;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
}
.l-modal.is-open { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.l-modal__panel {
    width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto;
    background: var(--white); border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.l-modal__head {
    background: linear-gradient(90deg, var(--brand-800), var(--brand-600));
    color: var(--white); padding: 1.25rem 1.5rem;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.l-modal__head h2 { font-size: 1.25rem; font-weight: 700; }
.l-modal__head p { font-size: 0.875rem; color: var(--brand-100); margin-top: 0.25rem; }
.l-modal__close { color: rgba(255,255,255,0.8); padding: 0.25rem; }
.l-modal__close:hover { color: var(--white); }
.l-modal__close svg { width: 1.5rem; height: 1.5rem; }

.l-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.l-form__error {
    padding: 0.75rem; border-radius: 0.75rem;
    background: var(--red-50); border: 1px solid var(--red-100);
    color: var(--red-700); font-size: 0.875rem; font-weight: 500;
}
.l-field label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--slate-700); margin-bottom: 0.25rem; }
.l-field input {
    width: 100%; padding: 0.75rem 1rem; border-radius: 0.75rem;
    border: 1px solid var(--slate-200); font-size: 1rem; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.l-field input:focus {
    outline: none; border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.l-form__note { font-size: 0.75rem; text-align: center; color: var(--slate-500); }
.l-form__note a { color: var(--brand-600); font-weight: 600; }
.l-form__note a:hover { text-decoration: underline; }

/* AI SALES CHAT WIDGET */
.l-chat-root { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 60; font-family: var(--font); }
@media (min-width: 640px) { .l-chat-root { bottom: 1.5rem; right: 1.5rem; } }

.l-chat-bubble {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 1.125rem; border-radius: 9999px;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    color: var(--white); font-weight: 700; font-size: 0.9375rem;
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.l-chat-bubble:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(13, 148, 136, 0.5); }
.l-chat-bubble.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }
.l-chat-bubble__icon { width: 1.375rem; height: 1.375rem; }
.l-chat-bubble__label { display: none; }
@media (min-width: 480px) { .l-chat-bubble__label { display: inline; } }

.l-chat-panel {
    position: absolute; bottom: 0; right: 0;
    width: min(100vw - 2rem, 22rem); height: min(70vh, 32rem);
    background: var(--white); border-radius: 1.25rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
    display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    transform-origin: bottom right;
}
.l-chat-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.l-chat-panel__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
    padding: 1rem 1rem 0.875rem;
    background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
    color: var(--white);
}
.l-chat-panel__brand {
    display: flex; align-items: center; gap: 0.75rem; min-width: 0;
}
.l-chat-panel__brand img {
    width: 2rem; height: 2rem; border-radius: 0.5rem; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
.l-chat-panel__title { font-weight: 800; font-size: 0.9375rem; }
.l-chat-panel__sub { font-size: 0.6875rem; opacity: 0.85; margin-top: 0.125rem; }
.l-chat-panel__close { color: rgba(255,255,255,0.85); padding: 0.25rem; border-radius: 0.5rem; }
.l-chat-panel__close:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.l-chat-panel__close svg { width: 1.25rem; height: 1.25rem; }

.l-chat-panel__messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    background: var(--slate-50); display: flex; flex-direction: column; gap: 0.75rem;
}

.l-chat__msg { display: flex; gap: 0.5rem; align-items: flex-end; max-width: 100%; }
.l-chat__msg--user { flex-direction: row-reverse; }
.l-chat__avatar {
    width: 1.75rem; height: 1.75rem; border-radius: 9999px; flex-shrink: 0;
    background: var(--brand-600); color: var(--white);
    font-size: 0.5625rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.l-chat__bubble {
    padding: 0.625rem 0.875rem; border-radius: 1rem;
    font-size: 0.8125rem; line-height: 1.5; max-width: 85%;
    word-break: break-word;
}
.l-chat__msg--bot .l-chat__bubble {
    background: var(--white); color: var(--slate-700);
    border: 1px solid var(--slate-200); border-bottom-left-radius: 0.25rem;
}
.l-chat__msg--user .l-chat__bubble {
    background: var(--brand-600); color: var(--white);
    border-bottom-right-radius: 0.25rem;
}

.l-chat__typing .l-chat__bubble { display: flex; gap: 0.25rem; padding: 0.75rem 1rem; }
.l-chat__typing span {
    width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: var(--slate-400);
    animation: chatBounce 1.2s infinite ease-in-out;
}
.l-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.l-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.l-chat-panel__form {
    display: flex; gap: 0.5rem; padding: 0.75rem;
    border-top: 1px solid var(--slate-200); background: var(--white);
}
.l-chat-panel__input {
    flex: 1; border: 1px solid var(--slate-200); border-radius: 0.75rem;
    padding: 0.625rem 0.875rem; font-size: 0.875rem; font-family: inherit;
}
.l-chat-panel__input:focus {
    outline: none; border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.l-chat-panel__send {
    width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; flex-shrink: 0;
    background: var(--brand-600); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.l-chat-panel__send:hover:not(:disabled) { background: var(--brand-700); }
.l-chat-panel__send:disabled { opacity: 0.6; cursor: not-allowed; }
.l-chat-panel__send svg { width: 1.125rem; height: 1.125rem; }
