/* Ole Gunnar Onsøien — olegunnaro.com */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4F4F1;
  --ink: #111213;
  --mute: #6A6C6F;
  --rule: #D2D3CF;
  --red: #E30613;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141516;
    --ink: #ECECE8;
    --mute: #8D8F92;
    --rule: #2E3032;
    --red: #FF3341;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 64px);
  padding-inline: max(16px, clamp(24px, 5vw, 64px));
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.tnum { font-variant-numeric: tabular-nums; }

/* ---------- language switch ---------- */
.lang { font-size: 13px; letter-spacing: .02em; }
.lang [aria-current] { font-weight: inherit; color: var(--ink); }
.lang .sep { color: var(--mute); }
.lang a { color: var(--mute); text-decoration: none; }
.lang a:hover { color: var(--red); }

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }

header { border-top: 4px solid var(--red); padding-top: 20px; align-items: start; }
h1 { grid-column: 1 / 9; margin: 0; font-size: clamp(36px, 5.4vw, 64px); line-height: 1; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
header .lang { grid-column: 11 / 13; justify-self: end; padding-top: 6px; }
.sub { grid-column: 1 / 9; margin: 16px 0 0; font-size: 18px; line-height: 1.4; color: var(--mute); max-width: 36ch; }

section { margin-top: 72px; padding-top: 12px; border-top: 1px solid var(--ink); }
.lbl { grid-column: 1 / 4; margin: 0; font-size: 13px; line-height: 1.5; font-weight: 400; }
.lbl .num { font-style: normal; color: var(--red); margin-right: 12px; }
.body { grid-column: 4 / 13; font-size: 18px; line-height: 1.5; }
.body p { margin: 0; max-width: 52ch; }

dl { margin: 0; display: grid; grid-template-columns: 9.5em 1fr 1fr; }
dl > div { display: contents; }
dt, dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
dt { color: var(--mute); font-variant-numeric: tabular-nums; }
dd + dd { color: var(--mute); }

.contact { display: grid; gap: 4px; font-size: 22px; letter-spacing: -.01em; }
.contact a { text-decoration: none; border-bottom: 1px solid var(--rule); justify-self: start; }
.contact a:hover { border-color: var(--red); }

footer { margin-top: 96px; font-size: 13px; color: var(--mute); display: flex; justify-content: space-between; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  h1, .sub, .lbl, .body, header .lang { grid-column: 1; }
  header .lang { justify-self: start; order: -1; padding: 0 0 16px; }
  .lbl { margin-bottom: 12px; }
  section { margin-top: 48px; }
  dl { grid-template-columns: 6.5em 1fr; }
  dd + dd { grid-column: 2; padding-top: 0; }
  dl dd:first-of-type { border-bottom: 0; padding-bottom: 2px; }
  .contact { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
