/* =====================================================
   Eternis Clinic — base layer
   Reset, typography, semantic defaults.
   ===================================================== */

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

* { margin: 0; padding: 0; }

html {
  color-scheme: light;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--etc-font-sans);
  font-size: var(--etc-body);
  line-height: var(--etc-leading-normal);
  color: var(--etc-ink);
  background: var(--etc-canvas);
  min-height: 100dvh;
  overflow-x: hidden;
  letter-spacing: var(--etc-tracking-normal);
}

/* Lenis smooth-scroll body class */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

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

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

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--etc-dur) var(--etc-ease);
}
a:hover { color: var(--etc-gold-deep); }

::selection { background: var(--etc-ink); color: var(--etc-canvas); }

/* ===== Typography ===== */
.font-serif { font-family: var(--etc-font-serif); }
.font-sans  { font-family: var(--etc-font-sans); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--etc-font-serif);
  font-weight: 400;
  letter-spacing: var(--etc-tracking-tight);
  line-height: var(--etc-leading-snug);
  color: var(--etc-ink);
}

h1, .h-display {
  font-size: var(--etc-display-1);
  line-height: var(--etc-leading-tight);
  letter-spacing: -0.025em;
}
h2, .h-section { font-size: var(--etc-display-2); line-height: 1.08; }
h3 { font-size: var(--etc-h2); }
h4 { font-size: var(--etc-h3); }

p { color: var(--etc-mute); line-height: var(--etc-leading-loose); }

.lead {
  font-size: var(--etc-lead);
  color: var(--etc-mute);
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--etc-space-2);
  font-family: var(--etc-font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: var(--etc-tracking-wider);
  text-transform: uppercase;
  color: var(--etc-gold-deep);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
  display: inline-block;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--etc-container);
  margin: 0 auto;
  padding-inline: var(--etc-gutter);
}
.container-narrow {
  width: 100%;
  max-width: var(--etc-container-narrow);
  margin: 0 auto;
  padding-inline: var(--etc-gutter);
}

.section { padding-block: var(--etc-section); }
.section-tight { padding-block: clamp(3rem, 5vw, 5rem); }

/* Cross-page anchor landing offset — when a user clicks /about#doctors
   from the global nav, the browser does a NATIVE scroll (Lenis only
   intercepts same-page hash clicks). Without scroll-margin-top, the
   fixed site-header covers the top ~90px of the target section. */
section[id],
[id="doctors"],
[id="main"] {
  scroll-margin-top: 96px;
}

.divider { height: 1px; background: var(--etc-line); border: 0; }

/* ===== Visually hidden ===== */
.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;
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid var(--etc-ink);
  outline-offset: 3px;
  border-radius: var(--etc-radius-sm);
}

/* ===== Misc utilities ===== */
.no-wrap { white-space: nowrap; }
.text-center { text-align: center; }
.text-mute  { color: var(--etc-mute); }
.text-mute-2 { color: var(--etc-mute-2); }
.text-ink   { color: var(--etc-ink); }
.text-gold  { color: var(--etc-gold-deep); }

.flex { display: flex; }
.grid { display: grid; }
.gap-1 { gap: var(--etc-space-1); }
.gap-2 { gap: var(--etc-space-2); }
.gap-3 { gap: var(--etc-space-3); }
.gap-4 { gap: var(--etc-space-4); }
.gap-5 { gap: var(--etc-space-5); }
.gap-6 { gap: var(--etc-space-6); }
.gap-7 { gap: var(--etc-space-7); }
.gap-8 { gap: var(--etc-space-8); }

.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--etc-space-2); }
.mt-3 { margin-top: var(--etc-space-3); }
.mt-4 { margin-top: var(--etc-space-4); }
.mt-6 { margin-top: var(--etc-space-6); }
.mt-8 { margin-top: var(--etc-space-8); }
.mt-10 { margin-top: var(--etc-space-10); }
.mb-2 { margin-bottom: var(--etc-space-2); }
.mb-4 { margin-bottom: var(--etc-space-4); }
.mb-6 { margin-bottom: var(--etc-space-6); }
.mb-8 { margin-bottom: var(--etc-space-8); }

.icon { flex-shrink: 0; }

/* Honeypot field (anti-spam) */
.hp-trap {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden;
}
