/* ============================================================================
   CNY CARE SERVICES LLC — PROFESSIONAL DESIGN SYSTEM
   Community Health & Social Navigation Brand
============================================================================ */

/* ---------- FONTS: Load a trustworthy humanist typeface ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

:root {
  /* Brand palette — warm, human, trustworthy (not clinical/corporate) */
  --brand-50:  #effaf6;
  --brand-100: #d6f2e8;
  --brand-200: #aee5d3;
  --brand-300: #7dd1b8;
  --brand-400: #48b597;
  --brand-500: #2a9779;
  --brand-600: #1e7a61;
  --brand-700: #196250;
  --brand-800: #174f42;
  --brand-900: #144137;
  --brand-950: #07241e;

  /* Neutral ink */
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;

  /* Accent (warm amber for CTAs / highlights) */
  --accent-500: #d97706;
  --accent-600: #b45309;

  /* Surfaces */
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-tint: #f4f9f7;

  /* Shadows — soft, layered, editorial */
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.04);
  --shadow-lg: 0 12px 32px -8px rgb(15 23 42 / 0.12), 0 4px 12px -4px rgb(15 23 42 / 0.06);
  --shadow-xl: 0 24px 48px -12px rgb(15 23 42 / 0.18);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ---------- BASE ---------- */
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink-900);
  background-color: var(--surface-muted);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---------- HEADER — floating glass bar with brand authority ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 24px -16px rgba(15, 23, 42, 0.12);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
header:hover {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 12px 32px -16px rgba(15, 23, 42, 0.18);
}

/* Brand wordmark — serif, tracking-tight, with brand emerald */
header .font-extrabold {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.035em;
  color: var(--brand-800);
  font-size: 1.15rem !important;
  position: relative;
  padding-bottom: 2px;
}
header .font-extrabold::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
header .font-extrabold:hover::after { opacity: 1; }

/* The "Syracuse & Onondaga County, NY" pill — brighter, tighter */
header .bg-teal-100.text-teal-800 {
  background: linear-gradient(135deg, #d6f2e8 0%, #aee5d3 100%) !important;
  color: #144137 !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(20, 65, 55, 0.08);
}

/* ---------- NAV LINKS — pill hover with underline accent ---------- */
nav > button {
  position: relative;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  font-weight: 600;
  color: var(--ink-700) !important;
  background: transparent !important;
  transition: color 0.15s ease, background 0.2s ease, transform 0.15s ease !important;
  overflow: hidden;
}
nav > button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, var(--brand-100), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: inherit;
  pointer-events: none;
}
nav > button:hover {
  color: var(--brand-800) !important;
  transform: translateY(-1px);
}
nav > button:hover::before { opacity: 1; }

/* Active nav tab — bold emerald pill with glow */
nav > button.bg-slate-900 {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 4px 14px -2px rgb(25 98 80 / 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
nav > button.bg-slate-900::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transform: translateX(-50%);
}

/* ---------- PHONE CTA — pulsing emerald, unmissable ---------- */
nav > a[href^="tel:"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
  box-shadow:
    0 2px 8px -2px rgb(5 150 105 / 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 999px !important;
  padding: 9px 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  transition: all 0.2s ease !important;
  position: relative;
}
nav > a[href^="tel:"]::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
  opacity: 0;
  animation: phone-glow 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes phone-glow {
  0%, 100% { opacity: 0; transform: scale(0.95); }
  50%      { opacity: 1; transform: scale(1.05); }
}
nav > a[href^="tel:"]:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px -4px rgb(5 150 105 / 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ---------- SIGN-IN BUTTON — outline style so phone dominates ---------- */
nav .bg-teal-700 {
  background: #ffffff !important;
  color: var(--brand-800) !important;
  border: 1.5px solid var(--brand-600) !important;
  box-shadow: 0 1px 2px rgba(20, 65, 55, 0.06);
  border-radius: 999px !important;
  padding: 8px 16px !important;
}
nav .bg-teal-700:hover:not(:disabled) {
  background: var(--brand-700) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgb(25 98 80 / 0.4);
}

/* ---------- HERO — layered gradient, editorial headline ---------- */
.bg-slate-900.rounded-2xl {
  background:
    radial-gradient(1200px 400px at 100% 0%, rgba(42, 151, 121, 0.25), transparent 60%),
    radial-gradient(800px 300px at 0% 100%, rgba(217, 119, 6, 0.15), transparent 60%),
    linear-gradient(135deg, #0f172a 0%, #144137 100%) !important;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.bg-slate-900.rounded-2xl::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.bg-slate-900.rounded-2xl h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* Hero image — subtle vignette + edge glow + hover zoom */
.bg-slate-900 .relative.rounded-xl {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px -12px rgba(0, 0, 0, 0.5);
}
.bg-slate-900 .relative.rounded-xl img {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bg-slate-900 .relative.rounded-xl:hover img {
  transform: scale(1.03);
}

/* Hero buttons — refined */
.bg-slate-900 .bg-teal-700 {
  background: linear-gradient(135deg, #1e7a61 0%, #196250 100%) !important;
  box-shadow: 0 4px 14px -2px rgb(30 122 97 / 0.5);
}
.bg-slate-900 .bg-teal-700:hover {
  transform: translateY(-1px);
}
.bg-slate-900 .bg-amber-600 {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 4px 14px -2px rgb(217 119 6 / 0.4);
}

/* ---------- DEPARTMENT CARDS — elevated, hover-lift ---------- */
.grid > .bg-white.border.border-slate-200.rounded-xl {
  background: var(--surface);
  border: 1px solid var(--ink-100) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
.grid > .bg-white.border.border-slate-200.rounded-xl::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  opacity: 0.85;
}
.grid > .bg-white.border.border-slate-200.rounded-xl:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200) !important;
}
.grid > .bg-white.border.border-slate-200.rounded-xl h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--ink-900);
}

/* Department tag pills */
.bg-teal-100.text-teal-800,
.bg-indigo-100.text-indigo-800,
.bg-amber-100.text-amber-800 {
  border-radius: 999px !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
}

/* ---------- TRUST BANNER — subtle framed panel ---------- */
.bg-white.border.border-slate-200.rounded-xl.p-5:has(h2) {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Partner/payer chips — refined */
.bg-teal-50.border.border-teal-200 {
  background: #f0fdf9 !important;
  border-color: #a7f3d0 !important;
  transition: all 0.15s ease;
}
.bg-teal-50.border.border-teal-200:hover {
  background: #d6f2e8 !important;
  border-color: #6ee7b7 !important;
  transform: translateY(-1px);
}

/* ---------- SIM BADGE — soften to a subtle info strip ---------- */
.bg-amber-50.border.border-amber-300 {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  border-left: 4px solid var(--accent-500) !important;
  box-shadow: var(--shadow-sm);
}

/* ---------- FORMS — polished inputs with focus rings ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
select,
textarea {
  border-radius: var(--radius-sm) !important;
  border-color: var(--ink-300) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fff;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-500) !important;
  box-shadow: 0 0 0 3px rgba(42, 151, 121, 0.15) !important;
  outline: none !important;
}

/* Checkbox accent */
input[type="checkbox"] {
  accent-color: var(--brand-600);
  width: 1rem;
  height: 1rem;
}

/* ---------- BUTTONS — global refinement ---------- */
button, a[role="button"] {
  transition: all 0.18s ease;
}
.bg-teal-700 {
  background: linear-gradient(135deg, #1e7a61 0%, #196250 100%) !important;
}
.bg-teal-700:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgb(30 122 97 / 0.45);
}
.bg-slate-900 {
  background: var(--ink-900) !important;
}
.bg-slate-900:hover:not(:disabled) {
  background: #1e293b !important;
}

/* Rounded button polish */
button.rounded-lg {
  border-radius: 10px !important;
}

/* ---------- TABLES — clean, airy, zebra hover ---------- */
table {
  border-collapse: separate;
  border-spacing: 0;
}
table thead {
  background: var(--surface-muted) !important;
}
table thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--ink-500) !important;
  padding: 10px 12px !important;
}
table tbody tr {
  transition: background 0.12s ease;
}
table tbody tr:hover {
  background: var(--surface-tint);
}

/* ---------- CARDS & PANELS — generic white panels ---------- */
.bg-white.border.border-slate-200.rounded-xl {
  border-color: var(--ink-100) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
}

/* Stat cards */
.grid > .bg-white.border.border-slate-200.rounded-xl.p-3,
.grid > .bg-white.border.border-slate-200.rounded-xl.p-4 {
  box-shadow: var(--shadow-sm);
}
.grid > .bg-white.border.border-slate-200.rounded-xl .text-2xl.font-bold {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--brand-800);
}

/* ---------- MODALS — softer, deeper ---------- */
.fixed.inset-0.bg-slate-900\/60 {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fixed.inset-0 .bg-white.rounded-xl {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xl);
}

/* ---------- FOOTER — grounded, with brand rule ---------- */
footer {
  background: linear-gradient(180deg, #0f172a 0%, #07241e 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
footer .font-bold {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.01em;
}

/* ---------- SCROLLBAR — refined ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-100); }
::-webkit-scrollbar-thumb {
  background: var(--ink-300);
  border-radius: 999px;
  border: 2px solid var(--ink-100);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }

/* ---------- UTILITIES ---------- */
.modal-scroll {
  max-height: 82vh;
  overflow-y: auto;
  padding-right: 4px;
}

/* Focus-visible for accessibility */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- PRINT ---------- */
@media print {
  .no-print { display: none !important; }
  body { background: white !important; font-size: 12px; }
  header { position: static !important; box-shadow: none !important; }
  .bg-slate-900.rounded-2xl { background: #0f172a !important; }
}

/* ---------- RESPONSIVE TUNING ---------- */
@media (max-width: 900px) {
  header nav { gap: 4px !important; }
  header nav > button,
  nav > a[href^="tel:"],
  nav .bg-teal-700 {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 1.5rem !important; }
  .bg-slate-900.rounded-2xl { padding: 1.25rem !important; }
}
@media (max-width: 720px) {
  /* Collapse inactive links on very small screens to avoid double-row wrap */
  header nav > button:not(.bg-slate-900):not(:hover) {
    display: none;
  }
}

/* ---------- MOTION PREFERENCE ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
