/* Healthcare OS — Design System v2 (tight, professional) */
:root {
    --hc-primary: #0F766E;
    --hc-primary-dark: #0D9488;
    --hc-secondary: #14B8A6;
    --hc-accent: #0EA5E9;
    --hc-dark: #0F172A;
    --hc-light: #F1F5F9;
    --hc-bg: #FFFFFF;
    --hc-page-bg: #F8FAFC;
    --hc-border: #CBD5E1;
    --hc-border-light: #E2E8F0;
    --hc-success: #22C55E;
    --hc-warning: #F59E0B;
    --hc-error: #EF4444;
    --hc-muted: #64748B;
    --hc-radius-card: 12px;
    --hc-radius-btn: 10px;
    --hc-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --hc-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07);
    --hc-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
    --hc-max: 1280px;
    --hc-content: 1140px;
    --hc-section-y: 3rem;
    --hc-section-y-lg: 4rem;
    --font-display: 'Inter', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.hc-os {
    font-family: var(--font-body);
    color: var(--hc-dark);
    background: var(--hc-page-bg);
    -webkit-font-smoothing: antialiased;
}

.hc-display { font-family: var(--font-display); letter-spacing: -0.02em; }

.hc-container { max-width: var(--hc-content); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.hc-container-wide { max-width: var(--hc-max); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* Sections — tighter vertical rhythm */
.hc-section { padding-top: var(--hc-section-y); padding-bottom: var(--hc-section-y); }
@media (min-width: 1024px) {
    .hc-section { padding-top: var(--hc-section-y-lg); padding-bottom: var(--hc-section-y-lg); }
}
.hc-section-tight { padding-top: 2rem; padding-bottom: 2rem; }

/* Header — always visible, professional */
.hc-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-bottom: 1px solid var(--hc-border);
    box-shadow: var(--hc-shadow-sm);
    transition: box-shadow 0.25s ease;
}
.hc-header.scrolled { box-shadow: var(--hc-shadow-md); }

/* Inner page shell */
.hc-page { padding-bottom: 2rem; }
.hc-page-header {
    background: var(--hc-bg);
    border-bottom: 1px solid var(--hc-border);
    padding: 1.25rem 0 1.5rem;
}
.hc-page-header h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
    color: var(--hc-dark);
    line-height: 1.2;
}
.hc-page-header .hc-page-subtitle {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--hc-muted);
    max-width: 42rem;
    line-height: 1.55;
}
.hc-page-body {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
}

/* Buttons */
.hc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    font-family: var(--font-display); font-weight: 600; font-size: 0.875rem;
    padding: 0.625rem 1.25rem; border-radius: var(--hc-radius-btn);
    transition: all 0.18s ease; text-decoration: none; border: none; cursor: pointer;
    line-height: 1.25;
}
.hc-btn-primary {
    background: var(--hc-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}
.hc-btn-primary:hover { background: var(--hc-primary-dark); transform: translateY(-1px); }
.hc-btn-secondary { background: var(--hc-bg); color: var(--hc-dark); border: 1px solid var(--hc-border); }
.hc-btn-secondary:hover { border-color: var(--hc-primary); color: var(--hc-primary); }
.hc-btn-ghost { background: transparent; color: var(--hc-muted); }
.hc-btn-ghost:hover { color: var(--hc-primary); background: rgba(15, 118, 110, 0.06); }
.hc-btn-accent { background: var(--hc-dark); color: #fff; }
.hc-btn-accent:hover { background: #1e293b; }
.hc-btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }

/* Cards — visible borders on all backgrounds */
.hc-card {
    background: var(--hc-bg);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-card);
    box-shadow: var(--hc-shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hc-card:hover { border-color: #94A3B8; box-shadow: var(--hc-shadow-md); }
.hc-card-flat { box-shadow: none; }
.hc-card-inset { background: var(--hc-light); border-color: var(--hc-border); }

/* Mega menu */
.hc-nav-item { position: relative; }
.hc-mega {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
    min-width: 480px; padding: 1rem; background: #fff;
    border: 1px solid var(--hc-border); border-radius: var(--hc-radius-card);
    box-shadow: var(--hc-shadow-lg); opacity: 0; visibility: hidden;
    transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
    pointer-events: none;
}
.hc-nav-item:hover .hc-mega,
.hc-nav-item:focus-within .hc-mega {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Hero mesh (homepage only) */
.hc-hero-mesh {
    background:
        radial-gradient(ellipse 70% 50% at 15% 0%, rgba(20, 184, 166, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, #fff 0%, var(--hc-page-bg) 100%);
}
.hc-blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35;
    animation: hc-float 20s ease-in-out infinite;
}
.hc-blob-1 { width: 320px; height: 320px; background: rgba(20, 184, 166, 0.12); top: -80px; right: 8%; }
.hc-blob-2 { width: 240px; height: 240px; background: rgba(14, 165, 233, 0.08); bottom: 15%; left: -4%; animation-delay: -7s; }

@keyframes hc-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(16px, -16px) scale(1.03); }
    66% { transform: translate(-12px, 12px) scale(0.97); }
}

.hc-dashboard {
    position: relative; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--hc-border); box-shadow: var(--hc-shadow-lg);
    background: var(--hc-bg);
}
.hc-float-card {
    position: absolute; background: #fff; border: 1px solid var(--hc-border);
    border-radius: 10px; padding: 0.625rem 0.875rem; box-shadow: var(--hc-shadow-md);
    animation: hc-card-float 6s ease-in-out infinite;
}
@keyframes hc-card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hc-reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.hc-reveal.visible { opacity: 1; transform: translateY(0); }

.hc-stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.25rem); color: var(--hc-dark); }

.hc-icon-wrap {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 118, 110, 0.08);
    color: var(--hc-primary);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

/* AI section — contained dark band */
.hc-ai-section {
    background: linear-gradient(180deg, #0F172A 0%, #1e293b 100%);
    position: relative; overflow: hidden;
}
.hc-ai-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(20, 184, 166, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hc-pricing-featured {
    border: 2px solid var(--hc-primary);
    box-shadow: var(--hc-shadow-md);
}
.hc-pricing-toggle {
    display: inline-flex; padding: 3px; background: var(--hc-light);
    border: 1px solid var(--hc-border); border-radius: 999px;
}
.hc-pricing-toggle button {
    padding: 0.4375rem 1rem; border-radius: 999px; font-size: 0.8125rem;
    font-weight: 600; border: none; background: transparent; cursor: pointer;
    color: var(--hc-muted); transition: all 0.18s;
}
.hc-pricing-toggle button.active { background: #fff; color: var(--hc-primary); box-shadow: var(--hc-shadow-sm); }

.hc-label {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--hc-primary);
}

.hc-section-head { text-align: center; max-width: 36rem; margin: 0 auto 2rem; }
.hc-section-head h2 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.02em;
    color: var(--hc-dark); margin-top: 0.5rem;
}
.hc-section-head p { margin-top: 0.625rem; color: var(--hc-muted); font-size: 1rem; line-height: 1.55; }

.hc-breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem;
    font-size: 0.8125rem; color: var(--hc-muted); margin-bottom: 0.875rem;
}
.hc-breadcrumb a { color: var(--hc-muted); text-decoration: none; }
.hc-breadcrumb a:hover { color: var(--hc-primary); }
.hc-breadcrumb span.sep { opacity: 0.45; }

.hc-input, .hc-select, .hc-textarea {
    width: 100%; padding: 0.625rem 0.875rem; font-family: var(--font-body); font-size: 0.875rem;
    border: 1px solid var(--hc-border); border-radius: var(--hc-radius-btn);
    background: var(--hc-bg); color: var(--hc-dark);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.hc-input:focus, .hc-select:focus, .hc-textarea:focus {
    outline: none; border-color: var(--hc-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.hc-label-field { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--hc-dark); margin-bottom: 0.3125rem; }

.hc-prose { max-width: 42rem; color: #334155; line-height: 1.65; font-size: 0.9375rem; }
.hc-prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--hc-dark); margin-top: 1.75rem; margin-bottom: 0.625rem; }
.hc-prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.hc-prose p { margin-bottom: 0.875rem; }
.hc-prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.875rem; }
.hc-prose li { margin-bottom: 0.375rem; }

.hc-faq details { background: var(--hc-bg); border: 1px solid var(--hc-border); border-radius: var(--hc-radius-card); overflow: hidden; }
.hc-faq summary { padding: 0.875rem 1rem; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.hc-faq summary::-webkit-details-marker { display: none; }
.hc-faq details[open] summary { border-bottom: 1px solid var(--hc-border-light); color: var(--hc-primary); }
.hc-faq .hc-faq-body { padding: 0.875rem 1rem 1rem; font-size: 0.875rem; color: var(--hc-muted); line-height: 1.6; }

.hc-page-cta {
    background: var(--hc-bg);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-card);
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: var(--hc-shadow-sm);
}
.hc-page-cta h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; color: var(--hc-dark); }
.hc-page-cta p { margin-top: 0.5rem; color: var(--hc-muted); font-size: 0.9375rem; max-width: 28rem; margin-left: auto; margin-right: auto; }

.hc-tag {
    display: inline-block; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; padding: 0.1875rem 0.5rem; border-radius: 999px;
    background: rgba(15, 118, 110, 0.08); color: var(--hc-primary);
    border: 1px solid rgba(15, 118, 110, 0.15);
}
.hc-empty { text-align: center; padding: 2.5rem 1.5rem; color: var(--hc-muted); font-size: 0.9375rem; }

.hc-grid-card { display: block; text-decoration: none; color: inherit; }
.hc-grid-card:hover h3 { color: var(--hc-primary); }

.hc-surface { background: var(--hc-bg); border-top: 1px solid var(--hc-border); border-bottom: 1px solid var(--hc-border); }
.hc-surface-alt { background: var(--hc-light); border-top: 1px solid var(--hc-border-light); border-bottom: 1px solid var(--hc-border-light); }

@media (max-width: 1023px) {
    .hc-mega { position: static; transform: none; min-width: auto; box-shadow: none; border: none; padding: 0.375rem 0 0 0.75rem; opacity: 1; visibility: visible; display: none; }
    .hc-nav-item.open .hc-mega { display: block; }
    .hc-pricing-featured { transform: none; }
}
