/* =====================================================================
   HOMECARE — Base (M00 PART 01)
   Modern reset, document defaults, type scale and the accessibility
   foundation (focus, reduced-motion, screen-reader helpers).
   ===================================================================== */

/* ---- Modern reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-height: 100%;
  line-height: var(--hc-leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img,
svg,
picture,
video {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
:where(a) {
  color: var(--hc-color-accent);
  text-underline-offset: 2px;
}

/* ---- Document defaults ---- */
html {
  font-family: var(--hc-font-sans);
  font-size: 16px;
  color: var(--hc-text-base);
  background-color: var(--hc-bg-app);
  scroll-behavior: smooth;
}
body {
  background-color: var(--hc-bg-app);
  color: var(--hc-text-base);
  font-size: var(--hc-font-size-base);
}

/* ---- Type scale helpers ---- */
h1,
.hc-h1 {
  font-size: var(--hc-font-size-2xl);
  font-weight: var(--hc-font-weight-bold);
  line-height: var(--hc-leading-tight);
  letter-spacing: var(--hc-letter-tight);
  color: var(--hc-text-strong);
}
h2,
.hc-h2 {
  font-size: var(--hc-font-size-xl);
  font-weight: var(--hc-font-weight-semibold);
  line-height: var(--hc-leading-tight);
  color: var(--hc-text-strong);
}
h3,
.hc-h3 {
  font-size: var(--hc-font-size-lg);
  font-weight: var(--hc-font-weight-semibold);
  color: var(--hc-text-strong);
}
h4,
.hc-h4 {
  font-size: var(--hc-font-size-md);
  font-weight: var(--hc-font-weight-semibold);
  color: var(--hc-text-strong);
}
small,
.hc-text-sm {
  font-size: var(--hc-font-size-sm);
}
.hc-text-muted {
  color: var(--hc-text-muted);
}
.hc-text-faint {
  color: var(--hc-text-faint);
}
strong,
.hc-text-semibold {
  font-weight: var(--hc-font-weight-semibold);
}

/* ---- Accessibility: visible focus ---- */
:focus {
  outline: none;
}
:focus-visible {
  outline: none;
  box-shadow: var(--hc-focus-ring);
  border-radius: var(--hc-radius-sm);
}

/* ---- Accessibility: reduced motion ---- */
@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;
  }
}

/* ---- Accessibility: screen-reader-only ---- */
.hc-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 (reserved reusable pattern) ---- */
.hc-skip-link {
  position: absolute;
  left: var(--hc-space-3);
  top: -120px;
  z-index: var(--hc-z-toast);
  background: var(--hc-color-primary-strong);
  color: var(--hc-text-inverse);
  padding: var(--hc-space-2) var(--hc-space-4);
  border-radius: var(--hc-radius-md);
  font-weight: var(--hc-font-weight-semibold);
  transition: top var(--hc-duration-base) var(--hc-ease-standard);
}
.hc-skip-link:focus-visible {
  top: var(--hc-space-3);
}
