/* ============================================================
   TrueMetriks - Base styles
   Font-face declarations + typography defaults + container.
   Depends on tokens.css being loaded first.
   ============================================================ */

/* Font-face: Be Vietnam Pro, self-hosted */
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Body */
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--motion-base) var(--ease-out),
              color var(--motion-base) var(--ease-out);
}

/* Heading scale */
h1, h2, h3, h4 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-extra); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

/* Body text */
p { color: var(--color-text); line-height: var(--line-height-relaxed); }
p + p { margin-top: var(--space-4); }
.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); }

/* Links */
a { color: var(--color-text-link); transition: color var(--motion-fast) var(--ease-out); }
a:hover { color: var(--color-brand-hover); }

/* Container utility */
.container {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-6); }
}

/* Visually-hidden helper for screen readers */
.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 - visually hidden until focused (matches .sr-only pattern) */
.skip-link {
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-5);
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--color-brand);
  color: var(--color-text-on-brand);
  z-index: calc(var(--z-modal) + 1);
}
