/* ==========================================================================
   Base — Reset & Typography
   Ōntóφys · The Mirror
   Foundational reset, global element styles, type scale.
   ========================================================================== */

/* ── Self-hosted Cinzel with Ukrainian (Cyrillic) support ──────────────── */

/* Cyrillic glyphs — self-hosted (regular weight only) */
@font-face {
  font-family: 'Cinzel';
  src: url('../assets/cinzel-ua-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  color: var(--color-text);
  line-height: var(--lh-body);
  font-size: var(--fs-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ── 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;
}

/* ── Selection ──────────────────────────────────────────────────────────── */

::selection {
  background-color: var(--color-selection-bg);
  color: var(--color-selection-text);
}

::-moz-selection {
  background-color: var(--color-selection-bg);
  color: var(--color-selection-text);
}

/* ── Focus visible (keyboard users) ────────────────────────────────────── */

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

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Typography — Headings ──────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

/* ── Typography — Body ──────────────────────────────────────────────────── */

p {
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
}

.lead,
p.lead {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--color-muted);
  max-width: 540px;
}

.text-muted {
  color: var(--color-muted);
}

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

.text-center {
  text-align: center;
}

/* ── Typography — Emphasis ──────────────────────────────────────────────── */

strong, b {
  font-weight: var(--fw-regular);
}

em, i {
  font-style: italic;
}

/* ── Divider ────────────────────────────────────────────────────────────── */

hr {
  border: none;
  height: 1px;
  background-color: var(--color-divider);
  margin: var(--space-xl) 0;
}

/* ── Scrollbar (subtle, webkit) ─────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}
