/* Shared by thomas.wredlund.fi and wredlund.fi – dark, blueprint-technical. */

@font-face {
  font-family: "Plex Sans";
  src: url("fonts/plex-sans.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c1622;
  --bg-grid: rgb(108 196 220 / 0.055);
  --surface: #111e2c;
  --surface-2: #162638;
  --line: #22374c;
  --line-strong: #2f4a64;
  --text: #dbe6ef;
  --muted: #8ea4b8;
  --copper: #e0894a;      /* links, actions */
  --copper-soft: rgb(224 137 74 / 0.14);
  --cyan: #6cc4dc;        /* drawings, annotations */
  --cyan-dim: rgb(108 196 220 / 0.45);

  --sans: "Plex Sans", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

/* Registration marks on a framed area. */
.marks { position: relative; }
.marks::before, .marks::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--cyan-dim);
  border-style: solid;
  pointer-events: none;
}
.marks::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.marks::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: 500 0.95rem/1.2 var(--sans);
  cursor: pointer;
}
.btn:hover { border-color: var(--copper); text-decoration: none; }
.btn.primary { background: var(--copper); border-color: var(--copper); color: #1a0f06; }
.btn.primary:hover { background: #eb9a5d; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
