/* ==========================================================================
   Hiraya Dental Group — base layer
   Reset, self-hosted Inter, typography scale, layout containers, focus.
   Source: CLAUDE.md §7. No strings live in this file.
   ========================================================================== */

/* --- Inter, self-hosted ---------------------------------------------------
   §8: three weights, Latin subset, font-display: swap. Never Google Fonts.

   INSTALLED 2026-08-10 — Inter v4.1, official release (rsms/inter),
   SIL Open Font License. Files in ../assets/fonts/. No third-party request.

   ⚠ PARTIAL: these are the full character set, not subset to Latin.
   331 KB across three weights; a Latin subset would be roughly a quarter of
   that. Subsetting needs fonttools, which is not installed. §8's self-hosting
   requirement is met; its subsetting requirement is not yet.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Inter-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/Inter-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/Inter-SemiBold.woff2") format("woff2");
}

/* --- Reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd,
ul, ol { margin: 0; padding: 0; }

ul[role="list"], ol[role="list"] { list-style: none; }

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

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

/* --- Document ------------------------------------------------------------- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Typography ----------------------------------------------------------
   Sentence case everywhere, including headlines (§7). The label style is the
   only permitted uppercase. Numerals for numbers above nine. No exclamation
   points — a copy rule, enforced at review, not in CSS.
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-weight: var(--weight-semi);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--text);
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }

p { max-width: var(--text-max); }

.text-small { font-size: var(--size-small); }

.label {
  font-size: var(--size-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;   /* the ONLY permitted uppercase */
  line-height: 1.2;
}

/* Text links are underlined in body copy, always (§7). */
a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

/* --- Focus ----------------------------------------------------------------
   Charcoal outline. Visible, never removed.
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* --- Layout --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-5); }
}

.section { padding-block: var(--section-padding); }

/* Generous whitespace is a brand requirement — it is what makes a small site
   read as considered rather than thin (§7). */

.prose { max-width: var(--text-max); }

.prose > * + * { margin-top: var(--space-3); }

.stack > * + * { margin-top: var(--space-2); }

.section-inverse {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

.section-inverse h1,
.section-inverse h2,
.section-inverse h3,
.section-inverse a { color: var(--text-inverse); }

/* --- Accessibility helpers ------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--ivory);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
  text-decoration: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@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;
  }
}
