/* Base reset + typography */

/* Self-hosted webfonts (preloaded in _Layout.cshtml) */
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/_content/BorrowCircle.Shared.Web/fonts/lexend-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/_content/BorrowCircle.Shared.Web/fonts/lexend-500.woff2") format("woff2");
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/_content/BorrowCircle.Shared.Web/fonts/lexend-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/_content/BorrowCircle.Shared.Web/fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/_content/BorrowCircle.Shared.Web/fonts/source-sans-3-600.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-fg);
}
h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-xl); font-weight: 500; }
h4 { font-size: var(--fs-lg); font-weight: 500; }
h5 { font-size: var(--fs-md); font-weight: 500; }
h6 { font-size: var(--fs-base); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

p { max-width: var(--measure); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--color-accent-soft); color: var(--color-fg); }

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

/* utility */
.muted { color: var(--color-fg-muted); }
.soft { color: var(--color-fg-soft); }
.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;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
