/* ========================================
   Base CSS - Health Pharma B2B
   Design: Medical Blue + Pure White
   ======================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { line-height: 1.6; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.25; }
p { line-height: 1.6; }

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors */
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --bg-muted: #eef3f8;
  --surface: #ffffff;
  --fg: #0f1d2e;
  --fg-soft: #3d4f63;
  --fg-muted: #6b7c91;
  --border: #e2eaf2;
  --border-strong: #c9d6e3;

  /* Accent - Medical Blue */
  --accent: #1e6fbf;
  --accent-hover: #16599a;
  --accent-soft: #e8f1fa;
  --accent-deep: #0d3d6b;

  /* Status */
  --success: #1f8a5c;
  --warning: #c98512;
  --danger: #c0392b;

  /* Typography */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 29, 46, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 29, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 29, 46, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 29, 46, 0.12);

  /* Container */
  --container-max: 1240px;
  --container-px: 20px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 200ms;
}

/* ---------- Base Typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
}
h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.5vw, 40px); letter-spacing: -0.015em; }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }
p { color: var(--fg-soft); }
a { transition: color var(--dur) var(--ease); }
a:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}
.section {
  padding: var(--space-8) 0;
}
.section-sm { padding: var(--space-7) 0; }
.section-lg { padding: var(--space-9) 0; }
@media (min-width: 768px) {
  .section { padding: var(--space-9) 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: #fff;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover {
  background: var(--accent-soft);
}
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---------- Eyebrow / Section Heading ---------- */
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.section-title {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-7);
}
.section-title h2 { margin-bottom: var(--space-3); }
.section-title p { color: var(--fg-muted); font-size: 17px; }

/* ---------- Nav ---------- */
.nav {
  position: relative;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
}
.nav-logo .logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}
.nav-links {
  display: none;
  gap: var(--space-5);
  align-items: center;
}
.nav-links a {
  color: var(--fg-soft);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--fg);
}
.nav-toggle:hover { background: var(--bg-soft); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------- Grid utilities ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.grid-6 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Tag / Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-soft);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  color: var(--fg-soft);
}
.footer a { color: var(--fg-soft); }
.footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  padding: var(--space-8) 0;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-muted);
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-3);
}
.footer-col ul li { margin-bottom: 8px; font-size: 14px; }

/* ---------- Forms ---------- */
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
  color: var(--fg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-soft);
  margin-bottom: 6px;
}
.field { margin-bottom: var(--space-4); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }