/* Grund: typsnitt, färger, typografi och nollställning. Laddas först på alla sidor. */

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

:root {
  --ink: #18181c;
  --ink-2: #2a2a30;
  --paper: #ffffff;
  --paper-2: #f1f1ee;
  --muted: #5d5d64;
  --muted-on-ink: #a9a9b0;
  --line: rgba(24, 24, 28, 0.14);
  --line-on-ink: rgba(255, 255, 255, 0.18);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --card: #f1f1ee;
  --card-hover: #e8e8e3;
  --hero-bg: #26262b;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(56px, 9vw, 128px);
  --header-h: 64px;
  --inset: clamp(8px, 1vw, 16px);
  --radius-sm: 15px;
  --radius: 20px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --fs-display: clamp(3rem, 10.5vw, 9.5rem);
  --fs-h1: clamp(2.5rem, 6.5vw, 5.5rem);
  --fs-h2: clamp(2rem, 4.2vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-lead: clamp(1.25rem, 2.3vw, 2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;
}
@media (min-width: 900px) { :root { --header-h: 72px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.045em; }
h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; }
h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-family: var(--mono); font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.label {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}
.muted { color: var(--muted); }
.lead { font-size: var(--fs-lead); line-height: 1.3; letter-spacing: -0.02em; font-weight: 400; }
.phonetic { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }

/* Små avståndshjälpare */
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.pt-0 { padding-top: 0 !important; }
.measure { max-width: 680px; }
