/* Faz 2 — base / typography / focus / motion */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

html[data-color-scheme="dark"] { color-scheme: dark; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-3); }

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

a:hover { color: var(--color-primary-hover); text-decoration: underline; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-3);
  color: #fff;
  text-decoration: none;
}

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

code, kbd, pre, samp {
  font-family: var(--font-mono);
}

pre, .post-content pre, .forum-code {
  overflow-x: auto;
  max-width: 100%;
  border-radius: var(--radius-sm);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  padding: var(--space-3);
}

.forum-code-block {
  margin: var(--space-3) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
  overflow: hidden;
}

.forum-code-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 70%, var(--color-surface-subtle));
}

.forum-code-copy {
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}

.forum-code-copy:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.forum-code-copy.is-copied {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: color-mix(in srgb, var(--color-success) 35%, var(--color-border));
}

.forum-code-block .forum-code {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.forum-code-block code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  white-space: pre;
}

img {
  max-width: 100%;
  height: unset;
}

.post-content img,
.forum-bb-img {
  height: auto;
}

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