/* msyn-base.css — Medsync design system base */

/* ===== CSS Custom Properties ===== */
:root {
  --primary: #0F766E;
  --primary-light: #14B8A6;
  --primary-subtle: #CCFBF1;
  --bg-dark: #0C2340;
  --bg-dark-alt: #133556;
  --bg-light: #F8FFFE;
  --bg-white: #FFFFFF;
  --bg-cream: #F0FDFA;
  --bg-muted: #F7F7F7;
  --text-heading-dark: #0C2340;
  --text-body-dark: #1E3A52;
  --text-muted-dark: #4A6276;
  --text-heading-light: #F0FDFA;
  --text-body-light: #CCFBF1;
  --text-muted-light: #99F0E5;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --danger: #DC2626;
  --border-light: #D1FAF4;
  --border-dark: #1E4A6A;

  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-input: 4px;

  --shadow-card: 0 2px 12px rgba(12, 35, 64, 0.08);
  --shadow-card-hover: 0 6px 24px rgba(12, 35, 64, 0.14);
  --shadow-nav: 0 1px 16px rgba(12, 35, 64, 0.10);

  --container-max: 1200px;
  --container-wide: 1360px;
  --section-py: clamp(60px, 8vw, 120px);

  --font-heading: 'Sora', Inter, system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', Inter, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --transition-base: 0.2s ease;
  --transition-medium: 0.35s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-body-dark);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: var(--font-body); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading-dark);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1em; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

/* ===== Layout Container ===== */
.msyn-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

.msyn-container--wide {
  max-width: var(--container-wide);
}

/* ===== Section backgrounds ===== */
.msyn-section--dark {
  background: var(--bg-dark);
}
.msyn-section--dark-alt {
  background: var(--bg-dark-alt);
}
.msyn-section--light {
  background: var(--bg-light);
}
.msyn-section--white {
  background: var(--bg-white);
}
.msyn-section--cream {
  background: var(--bg-cream);
}
.msyn-section--muted {
  background: var(--bg-muted);
}

/* ===== Buttons ===== */
.msyn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  white-space: nowrap;
}

.msyn-btn:hover { text-decoration: none; transform: translateY(-1px); }

.msyn-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.msyn-btn--primary:hover {
  background: #0a5c57;
  border-color: #0a5c57;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.msyn-btn--primary-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.msyn-btn--primary-outline:hover {
  background: var(--primary);
  color: #fff;
}

.msyn-btn--ghost-dark {
  background: transparent;
  color: var(--text-heading-light);
  border-color: rgba(240, 253, 250, 0.3);
}
.msyn-btn--ghost-dark:hover {
  background: rgba(240, 253, 250, 0.08);
  border-color: rgba(240, 253, 250, 0.5);
  color: var(--text-heading-light);
}

.msyn-btn--ghost-light {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.msyn-btn--ghost-light:hover {
  background: var(--primary-subtle);
}

.msyn-btn--accent {
  background: var(--accent);
  color: #1a0f00;
  border-color: var(--accent);
}
.msyn-btn--accent:hover {
  background: #d97706;
  border-color: #d97706;
  color: #1a0f00;
}

.msyn-btn--sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

.msyn-btn--lg {
  padding: 15px 32px;
  font-size: 1rem;
  font-weight: 500;
}

/* ===== Section heading block ===== */
.msyn-section-heading {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.msyn-section-heading__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.msyn-section-heading__title {
  color: var(--text-heading-dark);
  margin-bottom: 16px;
}

.msyn-section-heading__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted-dark);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Dark variant */
.msyn-section-heading--light .msyn-section-heading__eyebrow {
  color: var(--primary-light);
}
.msyn-section-heading--light .msyn-section-heading__title {
  color: var(--text-heading-light);
}
.msyn-section-heading--light .msyn-section-heading__subtitle {
  color: var(--text-body-light);
}

/* ===== Tag / Badge ===== */
.msyn-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.msyn-tag--primary {
  background: var(--primary-subtle);
  color: var(--primary);
}

.msyn-tag--accent {
  background: var(--accent-light);
  color: #92400e;
}

.msyn-tag--dark {
  background: rgba(204, 251, 241, 0.15);
  color: var(--primary-subtle);
}

/* ===== Stats number ===== */
.msyn-stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
}

/* ===== Fade in animation ===== */
.msyn-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.msyn-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Utility ===== */
.msyn-text-center { text-align: center; }
.msyn-mt-sm { margin-top: 12px; }
.msyn-mt-md { margin-top: 24px; }
.msyn-mt-lg { margin-top: 40px; }

.msyn-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Divider ===== */
.msyn-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 0;
}

/* ===== Focus styles ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Responsive grid helpers ===== */
.msyn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.msyn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.msyn-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .msyn-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .msyn-grid-2,
  .msyn-grid-3,
  .msyn-grid-4 { grid-template-columns: 1fr; }
}
