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

:root {
  --paper: oklch(0.955 0.008 90);
  --paper-2: oklch(0.925 0.01 90);
  --ink: oklch(0.26 0.035 255);
  --ink-2: oklch(0.44 0.03 255);
  --ink-3: oklch(0.60 0.02 255);
  --accent: oklch(0.64 0.17 45);
  --accent-soft: oklch(0.64 0.17 45 / 0.1);
  --line: oklch(0.26 0.035 255 / 0.16);
  --line-soft: oklch(0.26 0.035 255 / 0.07);

  --font-display: 'Archivo', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --text-display: clamp(2.6rem, 8.5vw + 0.5rem, 8.5rem);
  --text-h2: clamp(1.7rem, 3vw + 0.6rem, 3.2rem);
  --text-body: clamp(0.98rem, 0.4vw + 0.82rem, 1.1rem);
  --text-label: clamp(0.66rem, 0.25vw + 0.55rem, 0.78rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 72px;
}

html { background: var(--paper); scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; max-width: 62ch; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--paper); }

.note-tag {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.section-title {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.p-label-html {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

/* ---------- Tegnings-detaljer: ark, dimline, stamp, coords ---------- */
section { position: relative; }
.ark {
  position: absolute; top: 1.4rem; right: clamp(1rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.dimline {
  display: flex; align-items: center; gap: 0.7rem;
  max-width: 420px;
  margin: 0.4rem 0 1.6rem;
  opacity: 0;
}
body.reduced-motion .dimline { opacity: 1; }
.dimline i { flex: 1; height: 1px; background: var(--ink); position: relative; }
.dimline i::before, .dimline i::after {
  content: ''; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--ink);
}
.dimline i::before { left: 0; }
.dimline i::after { right: 0; }
.dimline b {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  white-space: nowrap;
}
.stamp {
  position: absolute; top: clamp(4rem, 9vh, 7rem); right: clamp(1rem, 5vw, 4rem);
  transform: rotate(-8deg);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.4vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0.55rem 1rem;
  opacity: 0.85;
  pointer-events: none;
}
.coords {
  position: absolute; right: 10px; bottom: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  color: var(--ink-3);
  background: oklch(0.965 0.007 90 / 0.8);
  padding: 2px 8px;
  pointer-events: none;
}
.tiden-ark {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-top: 0.5rem;
}
.section-intro { color: var(--ink-2); margin-top: 0.4rem; }
.kontakt-sub { color: var(--ink-2); margin-bottom: 2.4rem; max-width: 560px; }
.manifest-note-2 { border-left-color: var(--line); }

/* ---------- Seal / monogram ---------- */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  user-select: none;
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.site-header.is-solid {
  background: oklch(0.955 0.008 90 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.header-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark { font-weight: 700; letter-spacing: 0.04em; font-size: 1rem; }
.wordmark b { color: var(--accent); font-weight: 700; }
.header-nav { display: flex; gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.header-nav a {
  position: relative;
  text-decoration: none; color: var(--ink-2);
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em;
  transition: color 0.25s var(--ease-out);
}
.header-nav a:hover, .header-nav a.is-active { color: var(--ink); }
.header-nav a::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.header-nav a:hover::after, .header-nav a.is-active::after { transform: scaleX(1); }
.header-right { display: flex; align-items: center; gap: 1rem; }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-big { font-size: 1.05rem; padding: 1.1rem 2.6rem; }

.burger { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 2rem;
  transform: translateY(-102%);
  transition: transform 0.5s var(--ease-in-out);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1.4rem; }
.mobile-menu nav a {
  text-decoration: none; color: var(--ink);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
  opacity: 0; transform: translateY(18px);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.mobile-menu nav a.btn { font-size: 1.1rem; align-self: flex-start; margin-top: 1rem; }
.mobile-menu-foot {
  position: absolute; bottom: 2rem; left: 2rem;
  font-family: var(--font-mono); font-size: var(--text-label);
  letter-spacing: 0.12em; color: var(--ink-3);
}

/* ---------- Hero: situationsplan ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + clamp(1rem, 4vh, 3rem)) clamp(1rem, 4vw, 3rem) 3.5rem;
  cursor: crosshair;
}
.hero-head { margin-bottom: clamp(1rem, 3vh, 2rem); }
.hero-title {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.hero-title .hl { display: inline-block; }
.hero-title .hl-2 { color: var(--accent); }
.hero-sub {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  letter-spacing: 0.14em;
  color: var(--ink-2);
}
.hero-plan {
  flex: 1;
  min-height: 0;
  border: 1.5px solid var(--ink);
  background: oklch(0.965 0.007 90 / 0.6);
  position: relative;
}
.hero-plan svg { width: 100%; height: 100%; display: block; }

.p-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.p-thin { stroke-width: 1.2; }
.p-canal { stroke: oklch(0.5 0.06 240); stroke-width: 2.4; }
.p-metro { stroke-dasharray: 10 7; stroke-width: 1.6; }
.p-nofill { fill: none; }
.p-hatch { stroke: oklch(0.26 0.035 255 / 0.35); stroke-width: 1; }
.p-fill { stroke: none; opacity: 0.5; }
.p-station { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.p-label {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  fill: var(--ink-2);
}
.p-label-strong { fill: var(--ink); font-weight: 600; }
.p-leader { stroke-width: 1.2; }
.p-marker-ring { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; }
.p-marker-dot { fill: var(--accent); }
.p-marker-cross { fill: none; stroke: var(--accent); stroke-width: 1.4; }

[data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; }
[data-fade] { opacity: 0; }
[data-marker] { opacity: 0; transform-origin: center; transform-box: fill-box; }

.hero-hint {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: var(--text-label);
  letter-spacing: 0.16em; color: var(--ink-3);
}

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 0.7rem 0;
}
.ticker-track {
  display: flex; white-space: nowrap; width: max-content;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.14em;
  color: var(--ink-2);
  will-change: transform;
}
.ticker-track b { color: var(--accent); font-weight: 500; }

/* ---------- Sektioner ---------- */
section { padding: clamp(5rem, 11vh, 9rem) clamp(1rem, 4vw, 3rem); }
.section-head { max-width: 900px; }

/* ---------- Manifest ---------- */
.manifest { padding-top: clamp(6rem, 14vh, 11rem); }
.manifest-line {
  font-size: clamp(2.4rem, 7.5vw, 6.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: none;
}
.manifest-line-accent { color: var(--accent); }
.manifest-note {
  margin-top: 2.2rem;
  color: var(--ink-2);
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
}

/* ---------- Tilgang: note-kort ---------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.8rem);
  margin-top: 2.5rem;
}
.note-card {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: clamp(1.4rem, 2.5vw, 2.2rem);
  position: relative;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.note-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--accent); }
.note-card header {
  display: flex; align-items: baseline; gap: 0.6rem;
  font-family: var(--font-mono);
  margin-bottom: 2.6rem;
}
.note-num { color: var(--accent); font-weight: 500; font-size: 1rem; }
.note-dim { color: var(--ink-3); font-size: var(--text-label); letter-spacing: 0.1em; }
.note-card h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}
.note-card p { color: var(--ink-2); font-size: 0.98rem; }

/* ---------- Tiden: timelapse-scrub ---------- */
.tiden { position: relative; height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
#tiden-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tiden-fallback { display: none; }
body.reduced-motion #tiden-canvas { display: none; }
body.reduced-motion .tiden-fallback { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tiden-hud {
  position: absolute; top: calc(var(--header-h) + 1.2rem); left: clamp(1rem, 4vw, 3rem); z-index: 2;
  display: flex; flex-direction: column; gap: 0.2rem;
  background: oklch(0.955 0.008 90 / 0.85);
  backdrop-filter: blur(6px);
  border: 1.5px solid var(--ink);
  padding: 0.9rem 1.2rem;
}
.tiden-clock {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tiden-phase {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.22em;
  color: var(--accent);
}
.tiden-ruler {
  position: absolute; left: clamp(1rem, 4vw, 3rem); right: clamp(1rem, 4vw, 3rem); bottom: 4.6rem; z-index: 2;
  height: 2px; background: oklch(0.955 0.008 90 / 0.55);
}
.tiden-ruler span { display: block; height: 100%; width: 0; background: var(--accent); }
.tiden-line {
  position: absolute; left: clamp(1rem, 4vw, 3rem); bottom: 1.6rem; z-index: 2;
  color: oklch(0.97 0.005 90);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  text-shadow: 0 1px 14px oklch(0.2 0.03 255 / 0.55);
  max-width: none;
}

/* ---------- Om: Ulrich Hechmann ---------- */
.om { border-top: 1.5px solid var(--ink); }
.om-name {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.om-name .om-line { display: block; }
.om-name .om-line-2 { color: var(--accent); }
.om-role {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  letter-spacing: 0.16em;
  color: var(--ink-2);
}
.om-body { margin-top: 2.4rem; display: grid; gap: 1.2rem; max-width: 640px; }
.om-body p { color: var(--ink-2); font-size: clamp(1rem, 1.4vw, 1.15rem); }

/* ---------- Stedet ---------- */
.stedet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.stedet-photo { position: relative; border: 1.5px solid var(--ink); overflow: hidden; }
.stedet-photo img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; will-change: transform; }
.stedet-photo figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--paper);
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  padding: 0.45rem 0.9rem;
}
.stedet-text p { color: var(--ink-2); }
.stedet-addr { margin-top: 1.6rem; }
.stedet-addr span {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.5rem 0.9rem;
  display: inline-block;
}

/* ---------- Register: tegningshoved ---------- */
.register-sub { color: var(--ink-2); margin-bottom: 2.2rem; }
.titleblock { border: 1.5px solid var(--ink); max-width: 860px; }
.tb-row {
  display: grid; grid-template-columns: minmax(120px, 200px) 1fr;
  border-bottom: 1px solid var(--line);
}
.tb-row:last-child { border-bottom: none; }
.tb-key {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--ink-3);
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--line);
  display: flex; align-items: center;
}
.tb-val { padding: 0.85rem 1rem; font-weight: 600; }
.tb-mono { font-family: var(--font-mono); font-weight: 500; }
.revisions { border: 1.5px solid var(--ink); border-top: none; max-width: 860px; }
.rev-row {
  display: grid; grid-template-columns: 60px 140px 1fr;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
  gap: 1rem;
  align-items: baseline;
}
.rev-row:last-child { border-bottom: none; }
.rev-head {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.rev-open span:last-child { color: var(--accent); font-weight: 600; }

/* ---------- Kontakt ---------- */
.kontakt { text-align: left; border-top: 1.5px solid var(--ink); padding-bottom: clamp(5rem, 12vh, 9rem); }
.kontakt-title {
  font-size: clamp(2.6rem, 8vw, 7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2.6rem;
}
.kontakt-title em { color: var(--accent); font-style: normal; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1.5px solid var(--ink);
  padding: 1.6rem clamp(1rem, 4vw, 3rem);
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
}
.site-footer p {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  max-width: none;
}

/* ---------- Reveals & reduced motion ---------- */
[data-reveal] { will-change: transform, opacity; }
body.reduced-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
body.reduced-motion [data-draw] { stroke-dashoffset: 0 !important; }
body.reduced-motion [data-fade], body.reduced-motion [data-marker] { opacity: 1 !important; }

@media (max-width: 860px) {
  .header-nav, .header-cta { display: none; }
  .burger {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: 1.5px solid var(--ink); padding: 10px 9px;
    cursor: pointer;
  }
  .burger span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease-out), opacity 0.3s; }
  .burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .hero { min-height: 100svh; }
  .hero-plan { min-height: 340px; }
  .p-label { font-size: 22px; }
  .tb-row { grid-template-columns: 1fr; }
  .tb-key { border-right: none; padding-bottom: 0.2rem; }
  .tb-val { padding-top: 0.2rem; }
  .rev-row { grid-template-columns: 40px 110px 1fr; gap: 0.6rem; }
}
