/* ============================================================
   base.css — CSS Reset, Typography, Semantic Defaults
   Singheswar Hospital Website
   ============================================================ */

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

/* ── Smooth Scroll ── */
html {
  scroll-behavior: smooth;
}

/* ── Base Typography ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Semantic Element Defaults ── */
header,
nav,
main,
section,
footer,
article,
aside {
  display: block;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 700;
}

/* ── Links ── */
a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-secondary);
}

/* ── Visible Focus Indicators (Accessibility) ── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove default focus ring only when :focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Lists ── */
ul,
ol {
  list-style: none;
}

/* ── Buttons ── */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* ── Form Elements ── */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Horizontal Rule ── */
hr {
  border: none;
  border-top: 1px solid var(--bg-secondary);
  margin: var(--space-lg) 0;
}

/* ── Paragraph Spacing ── */
p {
  margin-bottom: var(--space-sm);
}

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