/* site/assets/css/site.css -- Midnight Manuscript shared foundation for the public
   Unflincher site. Dark-only. One muted amber accent. Sharp surfaces (0 to 3px). No
   AI-purple or decorative multicolor gradients, glow, or glass. Restrained graphite tonal
   depth is allowed. All url() references are relative so the site is safe under the
   /unflincher/ project base path. */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  src: url("../fonts/IBMPlexSansCondensed-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  src: url("../fonts/IBMPlexSansCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0e100f;
  --graphite: #171a18;
  --graphite-raised: #1d201d;
  --ink: #e8e4dc;
  --muted: #9e9a92;
  --line: #41433e;
  --accent: #c8ad78;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans Condensed", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --measure: 66ch;
  --container: 72rem;
  --radius: 2px;
  --dur: 160ms;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2.5rem;
  --space-7: 4rem;
  --space-8: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--ink); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h4, h5 { font-family: var(--font-sans); font-weight: 600; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }
.muted { color: var(--muted); }
code, .mono, kbd { font-family: var(--font-mono); font-size: 0.9em; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.15em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-3); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}
.site-wordmark { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; letter-spacing: 0.01em; }
.site-nav { display: flex; gap: var(--space-5); }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur) ease, background-color var(--dur) ease, transform var(--dur) ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--night); }
.btn--primary:hover { background: #d8bd86; }

.site-footer { border-top: 1px solid var(--line); margin-top: var(--space-8); padding: var(--space-6) var(--space-5); color: var(--muted); }
.site-footer a { color: var(--muted); }

@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;
  }
}
@media (max-width: 480px) {
  .site-header { gap: var(--space-4); padding-right: var(--space-4); padding-left: var(--space-4); }
  .site-nav { gap: var(--space-4); }
  .site-nav a { white-space: nowrap; }
}
@media (forced-colors: active) {
  .btn { border: 1px solid; }
  a { text-decoration: underline; }
}
