/* ============================================================
   HLT Søm — design tokens
   Change the look here. Avoid hard-coding values further down.
   ============================================================ */
/* The palette is derived from the carousel photography, not chosen beside it.
   The four CC0 splash images average #72675d, #685c56, #675950 and #8c7e68 —
   a tight warm brown-taupe family. Every colour below is built on that hue, so
   the page reads as one material rather than as photos dropped into a template.
   If the photography is ever replaced with a different palette, re-derive these
   (documentation/image-spec.md explains how). */
:root {
  --ink:      #171310;   /* warm near-black, pulled toward the photos' brown */
  --ink-soft: #4a4038;   /* secondary text on light ground */
  --paper:    #faf7f2;   /* warm off-white; pure #fff glares next to these photos */
  --paper-dim:#efe8dd;   /* panels and image placeholders */

  /* Brass, from the thread and needle highlights in splash-4.
     Contrast on --paper is ~3.7:1 — fine for borders, rules and large text,
     NOT sufficient for body copy. Never use it as a text colour at 17px. */
  --accent:   #9a7b4f;

  --hairline-dark:  rgba(23, 19, 16, .14);
  --hairline-light: rgba(250, 247, 242, .22);

  --scrim-edge:   rgba(20, 16, 12, .82);  /* top band, keeps the nav legible */
  --scrim-top:    rgba(20, 16, 12, .14);  /* the light middle of the photo */
  --scrim-bottom: rgba(20, 16, 12, .38);
  --scrim-text:   rgba(20, 16, 12, .55);  /* soft pool behind wordmark + tagline */

  /* Empty space carried below each block's content (on top of the ordinary
     --space-24 padding). The arriving block eats it before it reaches text.
     Together with --parallax-exit on .block it sets WHERE on the screen the
     last line of a block is when the next block reaches it:
         exit - 2 x (space-24 + runway)  =  624 - 2 x 192  =  240px from the top
     Spec §5.1, ADR 0007. */
  --parallax-runway: 96px;

  --carousel-interval: 5s;
  --crossfade: 1200ms;
  --parallax-factor: .5;

  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-6: 24px;  --space-8: 32px;  --space-12: 48px; --space-16: 64px;
  --space-24: 96px;

  --measure: 62ch;  /* max line length for readable body copy */
}

/* ---------- self-hosted fonts ----------
   Never load these from Google's CDN: it sends visitor IPs to Google, which is
   a GDPR problem in the EU, and costs an extra connection. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-200.woff2') format('woff2');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
/* 600: the bold parts of a course row (hovedtittel, date). Without this file
   the browser would fake bold from 400, which smears. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant Infant';
  src: url('../fonts/cormorant-infant-italic-400.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

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

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

  /* The canvas BEHIND the document takes its colour from the root element, and
     a phone shows it whenever you rubber-band past either end — which a desktop
     never does, so this only ever appeared on mobile as an empty white band
     below the footer.

     The two ends of this page differ: the splash at the top is dark, the footer
     at the bottom is light (ADR 0005). The canvas has one colour, so main.js
     swaps it as the visitor crosses the middle of the document — ink while
     near the top, paper while near the bottom — and overscroll at either end
     reads as the page stretching rather than as a band of the wrong colour.
     Without JavaScript it stays ink: correct at the top, a dark band below the
     footer at worst.

     Note this must be on html, not body: once html carries a background, body's
     own background stops propagating to the canvas and paints only its own box,
     which is exactly what we want here. Do not "tidy" it onto body. */
  background: var(--ink);
}
html.is-lower-half { background: var(--paper); }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

img, picture, iframe { max-width: 100%; display: block; }

h1, h2 { font-weight: 400; margin: 0; }

h1 {
  font-family: 'Cormorant Infant', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  line-height: .9;
}

a { color: inherit; }

/* ---------- block scaffolding ---------- */
/* The bottom padding is the runway for the parallax, not decoration.

   --parallax-exit: a block scrolls at normal speed until its bottom edge is this
   far from the top of the screen — the next block is arriving by then — and at
   half speed after that. The same for every block whatever its height, so a
   tall block (Kurs, more so with a course open) is covered exactly like a short
   one. Before this, every block lagged from the moment its TOP reached the top
   of the screen, so a block taller than the screen had used up its runway
   before its bottom came into view: Kurs's last lines were covered below the
   fold. A document length, not a viewport one — main.js never reads the
   viewport (ADR 0004). The splash is not a .block and lags over its whole
   height, so the effect starts with the very first scroll. ADR 0007. */
.block {
  --parallax-exit: 624px;
  padding: var(--space-24) var(--space-6) calc(var(--space-24) + var(--parallax-runway));
}


.block--light { background: var(--paper); color: var(--ink); }
.block--dark  { background: var(--ink);   color: var(--paper); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- block 1: splash ---------- */
.splash {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
}

.splash__slides { position: absolute; inset: 0; }

/* Slides are <img> elements, not CSS backgrounds, so slides 2-n can be
   deferred: only the first has a src in the markup, and main.js fills the rest
   after load. With backgrounds every slide would fetch immediately. */
.splash__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity var(--crossfade) ease-in-out;
}
.splash__slide.is-active { opacity: 1; }
/* The photographs are portrait. On a phone almost the whole height shows; on a
   landscape screen `cover` keeps only a band through the middle, which for a
   portrait with the face high in the frame shows chin and sweater instead of
   the face. This moves that band up, so the face sits above the wordmark
   rather than behind it. A class, not a style attribute: the CSP forbids
   inline styles. */
.splash__slide--focus-high { object-position: 50% 15%; }

.splash__scrim {
  position: absolute; inset: 0;
  /* The extra darkening in the first 15% is for the fixed logo and burger.
     mix-blend-mode: difference resolves cleanly against the black and white
     blocks, but washes out over a mid-tone photograph — and the top of a
     carousel image is whatever the photographer happened to shoot. This band
     gives the nav a predictable ground on every slide.

     The text is protected by a soft elliptical pool centred on it, not by
     darkening the whole photograph. A uniform scrim strong enough for the thin
     tagline dulled the portraits — the owner's verdict was that the photos of
     her "lost their strength". The pool sits where the text is (the content is
     centred, lifted by its bottom padding) and fades out long before the edges. */
  background:
    radial-gradient(
      ellipse 62% 30% at 50% 46%,
      var(--scrim-text) 0%,
      rgba(20, 16, 12, .32) 55%,
      rgba(20, 16, 12, 0) 100%
    ),
    linear-gradient(
      to bottom,
      var(--scrim-edge) 0%,
      rgba(20, 16, 12, .68) 9%,    /* the logo ends ~80px down: 9% of a phone */
      rgba(20, 16, 12, .24) 16%,
      var(--scrim-top) 26%,
      var(--scrim-top) 65%,
      var(--scrim-bottom) 100%
    );
}

.splash__content {
  position: relative;
  /* Lowered 50px from where the grid centres it, without moving anything else
     (owner, 2026-11-21): the logo sits a little below the middle. */
  top: 50px;
  text-align: center;
  padding: 0 var(--space-6) var(--space-16);
  color: #fff;
}

/* The logo (white strokes on transparency) is the page heading. The file is
   600px tall for sharp high-density screens and shown at about 200px; smaller
   only when a narrow or short screen needs it. The glow is drop-shadow, which
   follows the strokes rather than the image's box: thin and dark, there for
   contrast against light patches in the photos, not as decoration. */
.splash__mark { margin: 0; line-height: 0; }
.splash__mark img {
  display: block;
  width: auto;
  height: min(200px, 45vh);
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9)) drop-shadow(0 0 2.5px rgba(0, 0, 0, .55));
}

.splash__cue {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  width: 1px; height: 30px;
  transform: translateX(-50%);
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.85));
}

/* Course badge: a round gold seal in the lower-left corner that says there are
   courses and links to them (owner, 2026-11-22). A deeper gold than --accent so
   white text meets WCAG AA (tested). Clear of the logo and the scroll cue. */
.splash__badge {
  position: absolute;
  left: var(--space-8);
  bottom: var(--space-12);
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #82653d;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
  transform: rotate(-8deg);
  transition: transform .25s ease, box-shadow .25s ease;
}
.splash__badge b { display: block; font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.splash__badge:hover,
.splash__badge:focus-visible { transform: rotate(-4deg) scale(1.05); box-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.splash__badge:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 799px) {
  .splash__badge { left: var(--space-4); bottom: var(--space-16); width: 96px; height: 96px; font-size: 9px; }
  .splash__badge b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .splash__badge { transition: none; }
  .splash__badge:hover, .splash__badge:focus-visible { transform: rotate(-8deg); }
}

/* ---------- fixed navigation ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  /* Must outrank .nav-overlay (30), or the burger becomes unclickable once the
     menu is open — the first thing anyone tries on a phone. */
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-4);
  pointer-events: none;
  /* difference blending keeps both marks legible over white AND black blocks
     with no scroll listener to fall out of sync */
  mix-blend-mode: difference;
  color: #fff;
}
.site-nav > * { pointer-events: auto; }

.site-nav__logo { display: block; width: 64px; color: #fff; }
.site-nav__logo img { width: 100%; height: auto; }

.site-nav__burger {
  background: none;
  border: 0;
  padding: var(--space-2);
  cursor: pointer;
  color: inherit;
  display: grid;
  gap: var(--space-2);
  justify-items: center;   /* bars centred under the label, not both flush right */
}
.site-nav__burger-label {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  /* Letter-spacing is added after the last letter too, so the word's ink sits
     half a space left of its box. Pull that back or "MENY" reads slightly
     off-centre above the bars. */
  margin-right: -.18em;
}
.site-nav__bars { display: grid; gap: 6px; }
.site-nav__bars i { display: block; width: 30px; height: 1px; background: currentColor; }

/* ---------- overlay ---------- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--ink);
  display: grid;
  place-items: center;
}
.nav-overlay[hidden] { display: none; }

.nav-overlay__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.nav-overlay__list li + li { margin-top: var(--space-6); }
.nav-overlay__list a {
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(24px, 7vw, 40px);
  font-weight: 200;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-overlay__list a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Full-screen takeover is a phone pattern: it exists because a thumb needs big
   targets and the screen has no room for anything else. On a desktop it is
   heavy-handed — the same four links fit in a small panel under the burger
   without hiding the page. Same DOM, same JavaScript, different presentation. */
@media (min-width: 800px) {
  .nav-overlay {
    inset: auto;
    top: 78px;
    right: var(--space-4);
    display: block;
    width: min(260px, calc(100vw - 2 * var(--space-4)));
    padding: var(--space-6) var(--space-8);
    border-top: 2px solid var(--accent);
    box-shadow: 0 18px 50px rgba(23, 19, 16, .38);
  }
  .nav-overlay__list { text-align: left; }
  .nav-overlay__list li + li { margin-top: var(--space-4); }
  .nav-overlay__list a { font-size: 17px; letter-spacing: .13em; }
}

/* Scroll lock belongs to the takeover only. Locking the page behind a small
   dropdown would strand a desktop visitor mid-page. */
body.nav-open { overflow: hidden; }
@media (min-width: 800px) {
  body.nav-open { overflow: visible; }
}

html { scroll-behavior: smooth; }

/* Browser scroll anchoring OFF. This page positions the scroll itself, in
   document coordinates: the parallax, in-page links, and kurs.js keeping the
   view still when the course list renders or a panel above the clicked row
   closes. Anchoring applied inconsistently on top of that — on the phone, not
   on desktop, a frame late — and doubled the correction (measured: 798px). */
html { overflow-anchor: none; }

/* ---------- shared two-column layout for blocks 2-4 ---------- */
.split {
  display: grid;
  gap: var(--space-12);
  max-width: 1100px;
  margin: 0 auto;
}

/* Mobile: image first, text second — in blocks 2 and 4, deliberately.
   Alternating on a phone reads as inconsistency, not rhythm.
   Block 3 overrides this; see the contact block below and spec 3.6. */
.split__media { order: 1; }
.split__body  { order: 2; max-width: var(--measure); }

@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-16); }
  .split__media { order: 0; }
  .split__body  { order: 0; }
  /* The picture side zigzags down the page on desktop (spec §3.6):
     Tjenester left, Kurs right, Kontakt left (map), Om meg right.
     .split--media-right puts the picture right; a phone still shows it first. */
  .split--media-right .split__media { order: 1; }
}

/* Circular passepartout for the block images. The mount itself is transparent:
   the image is cropped to a circle and the page ground shows around it, so the
   photograph reads as an object on the page rather than a rectangle pasted in.
   Tjenester, Kurs and Om meg use this — Kontakt's media pane holds the map. */
.split__figure {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}
.split__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split__body h2,
.courses h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 300;
  letter-spacing: .04em;
  margin-bottom: var(--space-6);
}

/* Tjenester: each service is a short subheading with its paragraph right
   under it (owner, 2026-11-22). Body-text size, set apart by weight. */
.service { margin: 0 0 var(--space-4); }
.service h3 {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.5;
}
.service p { margin: 0; }

.service-list {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
}
.service-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline-dark);
}
.block--dark .service-list li { border-bottom-color: var(--hairline-light); }

/* ---------- Kurs ----------
   A course catalogue rendered by kurs.js from kurs.json (spec:
   documentation/superpowers/specs/2026-11-15-kurs-block-design.md).
   One centred column, wider than the text measure because the desktop row
   has five columns; prose inside it keeps the measure.

   The list is a <ul>, not a <table>: each row expands into a details panel,
   and an expanding row is a disclosure, which a table row cannot be.
   Mobile first: rows stack; the five-column grid starts at 800px. */
.courses {
  max-width: 760px;
  margin: 0 auto;
}
/* The image + intro split sits above the catalogue (owner, 2026-11-22). */
.split + .courses { margin-top: var(--space-12); }
.courses > p { max-width: var(--measure); }
.courses__outro a,
.course-catalogue a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.courses__outro a:hover,
.course-catalogue a:hover { border-bottom-color: currentColor; }

.course-catalogue { margin: var(--space-8) 0; }

.course-head { display: none; }
.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline-light);
}
.course { position: relative; border-bottom: 1px solid var(--hairline-light); }
.course.is-hidden { display: none; }

/* Share icon: its own button at the row's right end, beside the row button
   (never inside it). The row keeps room for it on the right. Spec §5.3a. */
.course__share {
  position: absolute;
  top: 8px;
  right: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .7;
  cursor: pointer;
  transition: opacity .2s, color .2s;
}
.course__share:hover,
.course__share:focus-visible { opacity: 1; color: var(--accent); }
.course__share:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.course__share-icon { width: 16px; height: 16px; display: block; }

/* The arrow that says a row opens (spec §5.3): just left of the share icon,
   turning up while the course is open. Part of the row button. */
.course__chevron {
  position: absolute;
  top: 8px;
  right: 40px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 40px;
  opacity: .7;
}
.course__chevron-icon { width: 13px; height: 13px; display: block; transition: transform .2s; }
.course.is-open .course__chevron { opacity: 1; color: var(--accent); }
.course.is-open .course__chevron-icon { transform: rotate(180deg); }
.course__row:hover .course__chevron { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .course__chevron-icon { transition: none; } }

/* "Lenken er kopiert til utklippstavlen": a small dark pill, bottom centre,
   fading out after a moment. visibility follows opacity so a hidden note is
   neither seen nor clickable. */
.share-note {
  position: fixed;
  left: 50%;
  bottom: var(--space-8);
  z-index: 1000;
  /* max-content: with left: 50% the box would otherwise shrink to half the
     screen and wrap on a phone. Light on purpose: it sits over the dark Kurs
     block. */
  width: max-content;
  max-width: calc(100vw - 2 * var(--space-6));
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .02em;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s, transform .25s, visibility 0s .25s;
}
.share-note.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity .25s, transform .25s;
}
.share-note.is-error { background: #8a2b1d; color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .share-note, .share-note.is-visible { transition: none; transform: translate(-50%, 0); }
}

.course__row {
  display: block;
  width: 100%;
  position: relative;
  padding: var(--space-4) 72px var(--space-4) var(--space-2);   /* right: room for the arrow and the share icon */
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s;
}
.course__row:hover,
.course__row:focus-visible,
.course.is-open > .course__row {
  background: rgba(250, 247, 242, .06);
  box-shadow: inset 2px 0 0 var(--accent);
}
.course__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.course__tag {
  margin-left: var(--space-2);
  padding: 1px 6px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 2px;
}

.course.is-past .course__row > span { opacity: .45; }
.course.is-past .course__title { text-decoration: line-through; }

/* Phone: three lines — date ("Lørdag 9. jan 2027"), title, and the summary
   (.course__meta) in place of the remaining cells. Owner's sketch, 2026-11-21. */
.course__date,
.course__title-cell { display: block; }
.course__weekday,
.course__year { font-size: 13px; opacity: .7; }   /* same as .course__meta */
.course__day,
.course__main-title { font-weight: 600; }
.course__title-cell { margin-top: 2px; }
.course__duration,
.course__level,
.course__seats { display: none; }
.course__meta {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  opacity: .7;
}

.course.is-open > .course__row { border-bottom: 0; }

/* The open panel: variant B from the owner's review — a light card inside the
   dark block. Single column on a phone; image column beside the text from
   800px. */
.course__panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-4);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
}
.course__panel[hidden] { display: none; }
.course.is-open .course__panel { animation: course-open .25s ease-out; }
@keyframes course-open {
  from { opacity: 0; transform: translateY(-6px); }
}
.course__media { display: grid; gap: var(--space-4); justify-items: start; }
.course__image {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}
/* A course's images share one circle and crossfade like the splash (spec §5.5).
   With one image this is simply that image. */
.course__slides { position: relative; width: 120px; aspect-ratio: 1; }
.course__slides .course__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--crossfade) ease-in-out;
}
.course__slides .course__image.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .course__slides .course__image { transition: none; }
}
.course__vipps-qr { width: 140px; height: auto; }
.course__body > * + * { margin-top: var(--space-3); }
.course__body p { margin: 0; }
.course__body p + p { margin-top: var(--space-3); }
.course__body h3 {
  margin: var(--space-6) 0 var(--space-1);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
}
.course__notice {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--accent);
  font-size: 14px;
}
.course__times {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-4);
  margin: 0;
}
.course__times dd { margin: 0; }
.course__panel a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.course__panel a:hover { border-bottom-color: currentColor; }
.course__mailto,
.course__vipps-link { display: inline-block; margin-top: var(--space-3); font-weight: 400; }
.course__footer { font-size: 14px; opacity: .85; }
.course__terms {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.course__terms:hover { border-bottom-color: currentColor; }

@media (min-width: 800px) {
  .course__panel { grid-template-columns: 180px 1fr; gap: var(--space-8); padding: var(--space-8); }
  .course__panel--text-only { grid-template-columns: 1fr; }
  .course__image,
  .course__slides { width: 180px; }
}

.course-more {
  display: block;
  margin: var(--space-8) auto 0;
  padding: var(--space-3) var(--space-8);
  border: 1px solid var(--accent);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.course-more:hover { background: var(--accent); color: var(--ink); }

@media (min-width: 800px) {
  .course-head,
  .course__row {
    display: grid;
    /* The title gets everything the other four do not need. The date
       stacks (weekday / day and month / year) so its column stays narrow. */
    grid-template-columns: 72px 1fr 76px 100px 70px;
    gap: var(--space-3);
    align-items: start;
  }
  .course-head {
    padding: 0 calc(var(--space-3) + 68px) var(--space-3) var(--space-3);   /* matches the row */
    border-bottom: 1px solid var(--hairline-light);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .65;
  }
  .course-head span:last-child,
  .course__seats { text-align: right; }
  .course-list { border-top: 0; }
  .course__row { padding: var(--space-4) calc(var(--space-3) + 68px) var(--space-4) var(--space-3); }
  .course__date > span { display: block; }
  .course__weekday,
  .course__year { font-size: 12px; }
  .course__day { white-space: nowrap; }
  .course__title-cell { margin-top: 0; }
  .course__duration,
  .course__level,
  .course__seats { display: block; }
  .course__meta { display: none; }
}

/* ---------- block 3: contact ---------- */
/* Mobile: text FIRST, map second — the deliberate exception to the image-first
   rule (spec 3.6). The media pane here is a map, not a photo; putting it first
   would bury the phone number behind a grey placeholder box.
   Do not "fix" this into consistency with the photo blocks. */
.split--reverse .split__body  { order: 1; }
.split--reverse .split__media { order: 2; }

@media (min-width: 800px) {
  /* Desktop: map LEFT, text right — its turn in the zigzag (Kurs before it has
     the picture right, Om meg after it right again). Spec §3.6. */
  .split--reverse .split__media { order: 0; }
  .split--reverse .split__body  { order: 1; }
}

.contact-line { margin: 0 0 var(--space-6); }
.contact-line a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.contact-line a:hover { border-bottom-color: currentColor; }

/* No background here: the map sits directly on the block's own ground, light
   or dark, so the attribution line always inherits a readable colour. */
.map { background: transparent; }

.map__load {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  color: var(--paper);
}
.map__preview { width: 100%; height: 100%; object-fit: cover; }

/* The label sits over the map rather than replacing it: the visitor can read
   the location before deciding whether to accept Google's cookies. */
.map__cta {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  background: linear-gradient(
    rgba(20, 16, 12, 0),
    rgba(20, 16, 12, .72) 45%,
    rgba(20, 16, 12, .94)
  );
}
.map__cta-title {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
  justify-self: center;
  padding-bottom: 2px;
}
.map__cta-note { font-size: 12px; opacity: .78; max-width: 36ch; margin: 0 auto; }
.map__load:hover .map__cta-title { border-bottom-color: currentColor; }

.map__attribution {
  margin: var(--space-3) 0 0;
  font-size: 11px;
  opacity: .65;   /* legible on either ground, not shouting */
}
.map__attribution a { text-decoration: underline; text-underline-offset: 2px; }

/* Applied once Google's map replaces the preview. Hidden rather than removed:
   removing the element would collapse its box and shift everything below it at
   the exact moment the visitor clicks. Do not swap this for display:none. */
.map__attribution.is-spent { visibility: hidden; }

.map iframe {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border: 0;
  display: block;
}

/* ---------- footer ----------
   Light because the last block (Om meg) is dark: adjacent blocks always
   contrast, and the backgrounds alternate all the way down. See ADR 0005. */
.site-footer {
  /* The last block lags DOWNWARD as it exits, which slides it over the footer —
     measured at 14px on desktop and 57px on a phone. The footer is the element
     arriving after the last block, so like every incoming block it belongs on
     top. A transformed element creates a stacking context and would otherwise
     outrank a static footer, hence the explicit position/z-index. */
  position: relative;
  z-index: 6;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  padding: var(--space-12) var(--space-6);
  font-size: 14px;
  font-weight: 300;
}
.site-footer p { margin: 0; line-height: 2; }
.site-footer a { text-decoration: none; border-bottom: 1px solid var(--accent); }
/* Each detail stays whole; the line may only wrap BETWEEN details, at a
   separator. The hard spaces in the markup do most of the work, but they are
   not sufficient on their own: a hyphen is its own break opportunity, so
   "E-post:" was breaking after the "E-" no matter how the spaces were written.
   nowrap covers spaces and hyphens alike. */
.site-footer__part { white-space: nowrap; }

/* Scoped to the separator on purpose. A bare `.site-footer span` would also
   catch the .site-footer__part wrappers and dim the details to 40%. */
.site-footer__sep { padding: 0 var(--space-2); opacity: .4; }

/* Instagram, last in the row: a small line icon before the word. Only the word
   carries the underline, so it matches the other footer links and the icon
   does not sit on a rule. */
.site-footer a.site-footer__social { border-bottom: none; }
.site-footer__social svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
  transition: color .2s;
}
.site-footer__social span { border-bottom: 1px solid var(--accent); }
/* The accent is ~3.7:1 on paper, enough for an icon (3:1) but not for 14px
   text, so the hover colours the glyph only. */
.site-footer__social:hover svg { color: var(--accent); }

/* ---------- legal pages (personvern.html, kursvilkar.html) ----------
   Light from top to bottom, so the overscroll canvas is paper, not ink. */
html.page-legal { background: var(--paper); }
/* The pages are short: hold the footer at the bottom of the screen rather than
   leaving it floating halfway up. */
html.page-legal body { min-height: 100svh; display: flex; flex-direction: column; }
.legal {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: calc(var(--space-24) + var(--space-8)) var(--space-6) var(--space-16);
}
.legal h1 {
  font-size: clamp(34px, 6vw, 52px);
  margin: 0 0 var(--space-8);
}
.legal h2 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 300;
  letter-spacing: .04em;
  margin: var(--space-8) 0 var(--space-2);
}
.legal a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.legal a:hover { border-bottom-color: currentColor; }
.legal__back { font-size: 14px; letter-spacing: .04em; margin: 0 0 var(--space-6); }
.legal h3 {
  font-size: 17px;
  font-weight: 500;
  margin: var(--space-6) 0 var(--space-2);
}
/* One situation in the privacy policy: what, why, how long. A definition list
   rather than a four-column table, which is unreadable at phone width.
   Stacked on phones; label and value side by side from 560px. */
.legal__facts { margin: 0 0 var(--space-4); }
.legal__facts dt {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .7;
  margin-top: var(--space-2);
}
.legal__facts dd { margin: 0; }
@media (min-width: 560px) {
  .legal__facts { display: grid; grid-template-columns: 120px 1fr; column-gap: var(--space-4); }
  .legal__facts dt { margin-top: 0; padding-top: .3em; }
  .legal__facts dd { margin-bottom: var(--space-2); }
}
.legal__updated { margin-top: var(--space-12); font-size: 14px; }

/* ---------- parallax ----------
   Outgoing block travels at half scroll speed; the incoming block moves
   normally, so it appears to slide over the one leaving. Runs on the
   compositor via scroll-driven animations — no scroll listener, no jank on
   mid-range phones. Browsers without support simply scroll normally, which is
   a complete page. */
/* ---------- parallax ----------
   Implemented in main.js, NOT with CSS scroll-driven animations.

   `animation-timeline: view()` and `scroll()` both measure progress against the
   scrollport. Mobile browsers resize that scrollport as their toolbar hides
   mid-drag, which remaps the timeline and moves a block independently of the
   scroll — measured at a 58px jump at an unchanged scroll position, and visible
   on a real phone as shivering cards. There is no CSS-only way around it.

   main.js computes the offset from document coordinates alone (scrollY,
   offsetTop, offsetHeight), none of which change when the toolbar hides.
   See documentation/decisions/0004-parallax-in-javascript.md.

   Paint order is explicit below rather than left to whichever elements happen
   to carry a transform at a given moment: each block must arrive OVER the one
   it is covering, and the footer over the last block. */
#splash            { z-index: 1; }
#tjenester         { position: relative; z-index: 2; }
#kurs              { position: relative; z-index: 3; }
#kontakt           { position: relative; z-index: 4; }
#om                { position: relative; z-index: 5; }

/* ---------- kursvilkår dialog ----------
   Opened from any course panel by kurs.js (spec §5.7). Paper ground like the
   course panel it is opened from. The body is loaded from kursvilkar.html. */
.terms__body h3 { margin: var(--space-6) 0 var(--space-1); font-size: 17px; font-weight: 600; }
.terms__body p { margin: 0 0 var(--space-3); }
.terms {
  width: min(var(--measure), calc(100vw - 2 * var(--space-4)));
  max-height: calc(100svh - 2 * var(--space-8));
  padding: var(--space-8) var(--space-6);
  border: 0;
  border-top: 2px solid var(--accent);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(23, 19, 16, .38);
}
.terms::backdrop { background: rgba(23, 19, 16, .6); }
.terms h2 {
  margin: 0 0 var(--space-4);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 300;
  letter-spacing: .04em;
}
.terms__close {
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-6);
  border: 1px solid var(--accent);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.terms__close:hover { background: var(--accent); color: var(--paper); }

/* ---------- reduced motion ----------
   A calm page, not a broken one. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-name: none !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .splash__slide { transition: none; }
}
