/* ============================================================
   QUINTANA MEDICAL SERVICES — Base Styles & Reset
   ============================================================ */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background-color: var(--q-bg-primary);
  color: var(--q-text-main);
  font-family: var(--q-font-sans);
  font-size: var(--q-text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Accessibility: Skip Link */
.q-skip-link {
  position: absolute;
  top: -100px;
  left: var(--q-sp-4);
  background: var(--q-green-deep);
  color: var(--q-text-inverse);
  padding: var(--q-sp-3) var(--q-sp-6);
  z-index: 10000;
  border-radius: var(--q-radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--q-duration-fast) var(--q-ease-smooth);
}
.q-skip-link:focus {
  top: var(--q-sp-4);
  outline: 3px solid var(--q-focus-ring);
  outline-offset: 2px;
}

/* Accessible Focus States (WCAG 2.2 Focus Appearance) */
:focus-visible {
  outline: 2px solid var(--q-focus-ring);
  outline-offset: 3px;
}

/* Typography Primitives (Biograph-Level Editorial Serif) */
h1, h2, h3, h4, .q-serif-title {
  font-family: var(--q-font-serif);
  color: var(--q-green-deep);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
}

h4 {
  font-size: var(--q-text-lg);
  font-weight: 500;
}

em, .q-italic {
  font-family: var(--q-font-italic);
  font-style: italic;
  font-weight: 400;
}

p {
  color: var(--q-text-main);
  margin-bottom: var(--q-sp-4);
}

p.q-lead {
  font-size: var(--q-text-lg);
  line-height: 1.6;
  color: var(--q-text-muted);
}

@media (min-width: 768px) {
  p.q-lead {
    font-size: 1.2rem;
  }
}

a {
  color: var(--q-green-emerald);
  text-decoration: none;
  transition: color var(--q-duration-fast) var(--q-ease-smooth);
}
a:hover {
  color: var(--q-green-deep);
}

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

/* Layout Utilities */
.q-container {
  width: 100%;
  max-width: 1340px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--q-sp-6);
  padding-right: var(--q-sp-6);
}

@media (min-width: 1024px) {
  .q-container {
    padding-left: var(--q-sp-8);
    padding-right: var(--q-sp-8);
  }
}

.q-section {
  padding-top: var(--q-sp-16);
  padding-bottom: var(--q-sp-16);
  position: relative;
}

@media (min-width: 1024px) {
  .q-section {
    padding-top: var(--q-sp-24);
    padding-bottom: var(--q-sp-24);
  }
}

.q-section-alt {
  background-color: var(--q-bg-secondary);
}

.q-section-dark {
  background-color: var(--q-bg-dark);
  color: var(--q-text-inverse);
}
.q-section-dark h1,
.q-section-dark h2,
.q-section-dark h3 {
  color: var(--q-text-inverse);
}
.q-section-dark p {
  color: var(--q-text-inverse-dim);
}

/* Section Header Shared */
.q-section-header {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--q-sp-12);
}

.q-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--q-sp-2);
  font-family: var(--q-font-sans);
  font-size: var(--q-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--q-gold-text);
  margin-bottom: var(--q-sp-3);
}

.q-eyebrow::before,
.q-eyebrow::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  background-color: var(--q-gold);
}

.q-eyebrow-dark {
  color: var(--q-gold-light);
}
.q-eyebrow-dark::before,
.q-eyebrow-dark::after {
  background-color: var(--q-gold-light);
}

.q-divider-arc {
  display: block;
  margin: var(--q-sp-6) auto 0;
  width: 48px;
  height: 2px;
  background-color: var(--q-eucalyptus);
  border-radius: var(--q-radius-pill);
}
