/* Alban — tokens og grunnstiler. Verdier fra designsystemet Alban (tokens.json).
   Layout: rolig grå flate, én stor typografisk gest per side, rød prikk som eneste dekor. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../assets/fonts/SchibstedGrotesk-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/Fraunces-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --surface-100: #e4e7ec;
  --surface-200: #f2f4f7;
  --surface-300: #d5d9df;
  --ink: #1b1e2b;
  --ink-muted: #454a5e;
  --border-strong: #6b7088;
  --neutral: #aaabb4;
  --red: #86131d;
  --on-red: #fbf4f2;
  --violet: #8e4d94;
  --on-violet: #ffffff;
  --violet-text: #6a2f72;
  --blue: #586da8;
  --on-blue: #ffffff;
  --blue-text: #34478a;
  --focus: var(--blue-text);

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --measure: 65ch;
  --page-max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-100: #14161f;
    --surface-200: #1d2030;
    --surface-300: #0e1017;
    --ink: #e8eaf0;
    --ink-muted: #a9aec2;
    --border-strong: #8a8fa6;
    --neutral: #565a6e;
    --red: #e0616b;
    --on-red: #1f0609;
    --violet: #c593cb;
    --on-violet: #1b0f1d;
    --violet-text: #d6aedb;
    --blue: #8fa3dc;
    --on-blue: #0f1424;
    --blue-text: #abbae8;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

[hidden] { display: none !important; }

.num, output, .tabular { font-variant-numeric: tabular-nums; }
::placeholder { font-variant-numeric: normal; }

/* Type */
.display {
  font-weight: 700;
  hyphens: manual;
  overflow-wrap: break-word;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0;
  text-wrap: balance;
}
.title { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.subtitle { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0; text-wrap: balance; }
.body-s { font-size: 14px; line-height: 1.5; }
.label { font-size: 12px; line-height: 1.3; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.caption { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "WONK" 1;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
}

/* Den røde prikken som punktum */
h1.dot::after { content: "."; color: var(--red); }

/* Ikoner arver tekstfargen */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

/* Knapper */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--surface-300); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-text); border-color: var(--blue-text); }

/* Tagger og chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface-300);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: var(--surface-300); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }

/* Felt */
.field { display: grid; gap: var(--space-2); }
.field > span { font-size: 14px; font-weight: 600; }
.input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-200);
  color: var(--ink);
  font: 500 16px/1 var(--sans);
}
.input-unit { position: relative; }
.input-unit .input { padding-right: 3em; }
.input-unit > i {
  position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%);
  font-style: normal; color: var(--ink-muted); font-size: 14px; pointer-events: none;
}

input[type="range"] { width: 100%; accent-color: var(--blue); }

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