/* ============================================================
   Base Reset + Document Defaults — 蔚禾身心診所
   ============================================================ */

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

html {
  font-size: 16px;
  line-height: var(--lh-tight);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  color: var(--color-brand-green);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  font-style: italic;      /* alt fallback styling if image broken */
  vertical-align: middle;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
}

p {
  line-height: var(--lh-tight);
}

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

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

/* ===== Screen reader only ===== */
.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;
}

/* ===== Skip link (a11y) — visible only when focused ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-brand-green);
  color: var(--color-white);
  padding: 12px 24px;
  font-family: var(--font-serif);
  font-size: var(--fs-h6);
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}
