/* ==========================================================================
   ETC-MEDMED Base Styles
   CSS Reset, Typography, and Global Styles
   ========================================================================== */

/* ========================================
   CSS Reset (Modern)
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Removed aggressive margin/padding reset to preserve Bootstrap defaults */

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--text);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* Removed button reset to preserve Bootstrap defaults.
   Custom button styles use .btn-etc class */

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

/* Removed list-style reset to preserve Bootstrap defaults.
   Use .list-unstyled class when needed */

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================
   Typography - Headings
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  color: var(--text);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

/* ========================================
   Typography - Body Text
   ======================================== */

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.small {
  font-size: var(--text-sm);
}

.text-muted {
  color: var(--text-muted);
}

/* ========================================
   Typography - Links
   ======================================== */

a:not(.btn):not(.header__nav-link):not(.header__logo):not(.mobile-nav__link):not(.footer__nav-link):not(.footer__contact-link) {
  color: var(--blue-600);
  transition: color var(--transition-fast);
}

a:not(.btn):not(.header__nav-link):not(.header__logo):not(.mobile-nav__link):not(.footer__nav-link):not(.footer__contact-link):hover {
  color: var(--blue-500);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
}

/* ========================================
   Typography - Lists
   ======================================== */

.list-styled {
  padding-left: var(--space-lg);
}

.list-styled li {
  position: relative;
  padding-left: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.list-styled li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md));
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--blue-600);
  border-radius: 50%;
}

/* ========================================
   Typography - Eyebrow / Label
   ======================================== */

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: var(--space-sm);
}

/* ========================================
   Selection
   ======================================== */

::selection {
  background-color: var(--blue-600);
  color: var(--text-on-primary);
}

/* ========================================
   Focus States (Accessibility)
   ======================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
}

/* ========================================
   Skip Link (Accessibility)
   ======================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--navy-800);
  color: var(--text-on-dark);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-sm);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ========================================
   Utility Classes
   ======================================== */

.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;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* ========================================
   Horizontal Rule
   ======================================== */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}
