/* IHT — Institute of Healthcare Transformation
   Shared brand tokens, typography, components — mobile-first */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand — blue dominant, orange accent only */
  --iht-blue: #6BAED6;
  --iht-blue-dark: #4A8AB8;
  --iht-blue-deep: #2E6A98;
  --iht-blue-50: #EAF3F9;
  --iht-blue-100: #D4E7F2;
  --iht-orange: #D85A2A;
  --iht-orange-soft: #F1E0D6;
  --iht-orange-50: #FBF1EC;

  /* Neutrals — white + cool blue-grey */
  --bg: #FFFFFF;
  --bg-cream: #F5F8FB;
  --bg-tint: #F5F8FB;
  --surface: #FFFFFF;
  --surface-2: #F0F6FA;
  --ink: #1a2332;
  --ink-2: #2c3a4f;
  --ink-3: #56627a;
  --ink-4: #8a93a6;
  --line: #E0E8EF;
  --line-soft: #EEF3F7;

  /* Semantic */
  --care: #6FA98F;
  --care-soft: #DFEDE5;
  --warn: #E0A028;
  --warn-soft: #F7E9C9;
  --danger: #C24A3A;
  --danger-soft: #F3D9D2;

  /* Typography */
  --font-ka: "FiraGO", "BPG Arial", "Noto Sans Georgian", "Sylfaen", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Georgia", "FiraGO", serif;
  --font-sans: "Inter", "FiraGO", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Menlo", "FiraGO", monospace;

  /* Radii / shadow — subtle blue-tinted */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(74,138,184,.05), 0 1px 1px rgba(74,138,184,.03);
  --shadow-sm: 0 2px 8px rgba(74,138,184,.06), 0 1px 2px rgba(74,138,184,.04);
  --shadow-md: 0 8px 24px rgba(74,138,184,.08), 0 2px 6px rgba(74,138,184,.05);
  --shadow-lg: 0 24px 60px rgba(74,138,184,.12), 0 6px 16px rgba(74,138,184,.06);

  /* Container padding scale */
  --pad-x: 16px;
  --pad-section: 48px;
}

@media (min-width: 481px) {
  :root { --pad-x: 24px; --pad-section: 64px; }
}
@media (min-width: 901px) {
  :root { --pad-x: 48px; --pad-section: 96px; }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ka);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--iht-blue-dark); text-decoration: none; }
a:hover { color: var(--iht-blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-ka);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
}
h1 { font-weight: 700; line-height: 1.15; font-size: clamp(28px, 7vw, 60px); }
h2 { font-weight: 700; line-height: 1.2;  font-size: clamp(22px, 4.5vw, 36px); }
h3 { font-weight: 600; line-height: 1.3;  font-size: clamp(18px, 2.5vw, 22px); }
h4 { font-weight: 600; font-size: clamp(15px, 2vw, 17px); }

p { margin: 0; text-wrap: pretty; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── Logo ─── */
.iht-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--iht-blue-deep);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.iht-logo .mark {
  position: relative;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--iht-blue);
  color: white;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.iht-logo .mark::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  background: var(--iht-orange);
  bottom: -2px; right: -2px;
  border-radius: 2px;
  border: 2px solid var(--bg);
}
.iht-logo .full-name {
  font-family: var(--font-ka);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  display: block;
  margin-top: 2px;
  letter-spacing: 0;
}
.iht-logo .name-stack { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.iht-logo .name-stack .lead { font-size: 16px; }

@media (min-width: 901px) {
  .iht-logo .mark { width: 36px; height: 36px; font-size: 14px; }
  .iht-logo .name-stack .lead { font-size: 18px; }
}
@media (max-width: 480px) {
  .iht-logo .full-name { display: none; }
  .iht-logo .name-stack .lead { font-size: 15px; }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ka);
  font-weight: 500;
  font-size: 15px;
  padding: 12px 22px;
  min-height: 44px;
  border-radius: var(--r-pill);
  transition: all .18s ease;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--iht-orange);
  color: white;
  box-shadow: 0 6px 16px rgba(216,90,42,.22);
}
.btn-primary:hover { background: #c44e22; color: white; transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 3px solid var(--iht-orange); outline-offset: 2px; }
.btn-secondary {
  background: var(--iht-blue-dark);
  color: white;
}
.btn-secondary:hover { background: var(--iht-blue-deep); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--iht-blue-50); color: var(--iht-blue-deep); border-color: var(--iht-blue-100); }
.btn-lg { padding: 16px 28px; font-size: 17px; min-height: 52px; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

@media (max-width: 600px) {
  .btn-block-mobile { width: 100%; }
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--iht-blue-100);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

/* ─── Top nav ─── */
.iht-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.iht-nav .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.iht-nav .nav-links a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  display: inline-block;
}
.iht-nav .nav-links a:hover { color: var(--iht-blue-deep); }
.iht-nav .nav-links a.active { color: var(--iht-blue-deep); }
.iht-nav .nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--iht-blue-dark);
  border-radius: 2px;
}

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}
.nav-burger:hover { background: var(--iht-blue-50); }

/* Mobile nav drawer */
@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .iht-nav .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 88vw);
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 80px 24px 24px;
    box-shadow: -8px 0 32px rgba(74,138,184,0.12);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 100;
  }
  .iht-nav .nav-links.open { transform: translateX(0); }
  .iht-nav .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line-soft);
    width: 100%;
  }
  .iht-nav .nav-links a.active::after { display: none; }
  .iht-nav .nav-links a.active { color: var(--iht-blue-deep); font-weight: 600; }
  .nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(26,35,50,0.4);
    z-index: 99;
  }
  .nav-overlay.open { display: block; }
  .nav-close {
    position: absolute;
    top: 18px; right: 18px;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}

/* ─── Footer ─── */
.iht-footer {
  background: #1a2332;
  color: #c0c8d6;
  padding: 48px var(--pad-x) 28px;
  font-size: 14px;
}
.iht-footer .ftr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto 32px;
}
@media (min-width: 481px) { .iht-footer .ftr-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 901px) { .iht-footer .ftr-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 48px; } }

.iht-footer h4 { color: white; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.iht-footer ul { list-style: none; margin: 0; padding: 0; }
.iht-footer li { margin-bottom: 10px; }
.iht-footer a { color: #c0c8d6; }
.iht-footer a:hover { color: var(--iht-blue); }
.iht-footer .ftr-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #2c3a4f;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: #8a93a6;
}
@media (min-width: 601px) {
  .iht-footer .ftr-bottom { flex-direction: row; justify-content: space-between; }
}
.iht-footer .iht-logo { color: white; }
.iht-footer .iht-logo .full-name { color: #8a93a6; }
.iht-footer .iht-logo .mark::after { border-color: #1a2332; }

/* ─── Animations ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseSoft {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.fade-up { animation: fadeUp .6s ease-out both; }
.fade-in { animation: fadeIn .8s ease-out both; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--iht-blue-50);
  color: var(--iht-blue-deep);
}
.tag-orange { background: var(--iht-orange-50); color: var(--iht-orange); }
.tag-care { background: var(--care-soft); color: #3a6a55; }
.tag-warn { background: var(--warn-soft); color: #8a6818; }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-neutral { background: var(--surface-2); color: var(--ink-3); }

/* ─── Responsive utilities ─── */
.hide-mobile { display: initial; }
.show-mobile { display: none; }
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial; }
}

/* Generic responsive grid utility */
.grid-collapse {
  display: grid;
  gap: 18px;
}
@media (max-width: 900px) {
  .grid-collapse { grid-template-columns: 1fr !important; }
}

/* Horizontal scroll utility */
.h-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.h-scroll::-webkit-scrollbar { height: 4px; }
