/* =============================================================================
   GraMedica — Global Stylesheet
   Version: 1.0 | March 2026
   Brand system locked per CLAUDE.md
   ============================================================================= */

/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --navy:          #0D1B2A;   /* Primary dark — backgrounds, nav, dark sections */
  --blue:          #0071CA;   /* Primary blue — CTAs and accents on WHITE/LIGHT bg ONLY */
  --blue-digital:  #27B1FA;   /* Digital/accent blue — accents on NAVY/DARK bg ONLY */
  --gray-footer:   #F2F4F7;   /* Footer bg — email footers and footer sections */
  --white:         #FFFFFF;

  /* ⚠ TWO-BLUE RULE: NEVER swap --blue and --blue-digital across contexts */
  /* --blue (#0071CA)      → white/light backgrounds ONLY                    */
  /* --blue-digital (#27B1FA) → navy/dark backgrounds ONLY                   */
  /* #27B1FA on white FAILS WCAG 2.1 AA — never use on white                 */

  /* Text */
  --text-dark:     #0D1B2A;
  --text-light:    #FFFFFF;
  --text-muted:    #6B7A8D;

  /* Typography */
  --font-heading:  'Outfit', Arial, sans-serif;
  --font-body:     'DM Sans', 'Segoe UI', Arial, sans-serif;

  /* Spacing scale */
  --space-xs:      0.5rem;
  --space-sm:      1rem;
  --space-md:      1.5rem;
  --space-lg:      2.5rem;
  --space-xl:      4rem;
  --space-2xl:     6rem;

  /* Layout */
  --max-width:     1200px;
  --max-width-text: 760px;
  --radius:        6px;
  --radius-lg:     12px;

  /* Transitions */
  --transition:    150ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: inherit;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p {
  font-family: var(--font-body);
  line-height: 1.7;
}

/* ─── Layout Utilities ───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2.5rem;
  }
}

/* ─── Section Base ───────────────────────────────────────────────────────────── */
.section {
  padding-block: var(--space-xl);
}

.section--lg {
  padding-block: var(--space-2xl);
}

/* Dark section context — navy bg, digital blue accents, white text */
.section--dark {
  background: var(--navy);
  color: var(--text-light);
}

/* Light section context — white bg, primary blue accents, dark text */
.section--light {
  background: var(--white);
  color: var(--text-dark);
}

/* Footer gray context */
.section--gray {
  background: var(--gray-footer);
  color: var(--text-dark);
}

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 68px;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav__logo img {
  height: 56px;
  width: auto;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav__links a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
  transition: color var(--transition);
  white-space: nowrap;
}

.site-nav__links a:hover {
  color: var(--blue-digital);
}

.site-nav__cta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

/* Mobile nav toggle — shown only on small screens */
.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--white);
  -webkit-tap-highlight-color: transparent;
}

/* ── White / Clinical nav variant ────────────────────────────────────────────── */
.site-nav--white {
  background: var(--white);
  border-bottom: 1px solid #E5ECF4;
  box-shadow: 0 1px 3px rgba(13, 27, 42, 0.04);
}

.site-nav--white .site-nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-nav--white .site-nav__links a:hover,
.site-nav--white .site-nav__links a.active {
  color: var(--blue);
}

.site-nav--white .site-nav__links a.active {
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
  font-weight: 600;
}

.site-nav--white .site-nav__toggle {
  color: var(--text-dark);
}

@media (max-width: 768px) {
  .site-nav__links {
    display: none;
  }
  .site-nav__cta .site-nav__cta-inner {
    display: none !important;
  }
  .site-nav__cta .btn--primary {
    display: none;
  }
  .site-nav__toggle {
    display: block;
  }
}

@media (min-width: 769px) {
  .site-nav__toggle {
    display: none;
  }
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

/* Primary button — light context (blue on white) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

/* Solid primary — for light sections (#0071CA on white) */
.btn--primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn--primary:hover {
  background: #005aa3;
  border-color: #005aa3;
}

/* Solid digital — for dark sections (#27B1FA on navy) */
.btn--digital {
  background: var(--blue-digital);
  color: var(--navy);
  border-color: var(--blue-digital);
}

.btn--digital:hover {
  background: #1fa3ec;
  border-color: #1fa3ec;
}

/* Outline — for dark sections */
.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

/* Outline — for light sections */
.btn--outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--outline-dark:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--lg {
  font-size: 1.0625rem;
  padding: 0.9375rem 2.25rem;
}

/* ─── Labels / Eyebrow Text ──────────────────────────────────────────────────── */
.label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label--digital {
  color: var(--blue-digital); /* use on dark backgrounds */
}

.label--blue {
  color: var(--blue); /* use on light backgrounds */
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid #E5ECF4;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 8px 32px rgba(13, 27, 42, 0.1);
  transform: translateY(-2px);
}

.card__body {
  padding: var(--space-md) var(--space-lg);
}

/* Dark card variant */
.card--dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.card--dark:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ─── Stats / Numbers ────────────────────────────────────────────────────────── */
.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--blue-digital); /* used on navy background */
}

.stat__label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.375rem;
}

/* ─── Grid Utilities ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

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

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-footer);
  color: var(--text-dark);
  padding-block: var(--space-xl);
  border-top: 1px solid #E0E6ED;
}

.site-footer__logo img {
  height: 32px;
  width: auto;
}

.site-footer__tagline {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.site-footer__links a:hover {
  color: var(--blue);
}

.site-footer__legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Divider ────────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: #E0E6ED;
  border: none;
}

.divider--dark {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }

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