@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..700;1,6..72,300..700&family=Inter+Tight:ital,wght@0,300..700;1,300..700&family=JetBrains+Mono:wght@300..500&display=swap");

/* ============================================================
   Beisfjord Vannverk — Design tokens + base styles
   ============================================================ */

:root {
  --fjord: oklch(0.24 0.025 235);
  --fjord-ink: oklch(0.18 0.020 235);
  --fjord-muted: oklch(0.48 0.020 235);
  --sno: oklch(0.975 0.003 230);
  --sno-warm: oklch(0.965 0.006 80);
  --glacial: oklch(0.82 0.025 200);
  --glacial-deep: oklch(0.62 0.045 215);
  --stein: oklch(0.48 0.012 60);
  --stein-soft: oklch(0.78 0.008 60);
  --stein-line: oklch(0.86 0.006 60);
  --varsel: oklch(0.68 0.17 55);
  --varsel-bg: oklch(0.96 0.04 75);
  --varsel-ink: oklch(0.32 0.12 50);
  --amber: oklch(0.52 0.15 65);

  --serif: "Newsreader", ui-serif, Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --fs-mono: 11px;
  --fs-body: 16px;

  --page-max: 1440px;
  --gutter: 40px;
  --rule: 1px solid var(--stein-line);
  --rule-ink: 1px solid var(--fjord);

  /* Hero theme defaults (Dark) */
  --hero-text: var(--sno);
  --hero-text-lede: rgba(255, 255, 255, 0.88);
  --hero-text-dim: rgba(255, 255, 255, 0.7);
  --hero-veil: linear-gradient(180deg, rgba(10,18,28,0.05) 0%, rgba(10,18,28,0.0) 35%, rgba(10,18,28,0.55) 78%, rgba(10,18,28,0.85) 100%);
  --hero-toc-bg: rgba(10,18,28,0.55);
  --hero-toc-bg-hover: rgba(10,18,28,0.75);
}

.hero--light {
  --hero-text: var(--fjord-ink);
  --hero-text-lede: var(--fjord-ink);
  --hero-text-dim: var(--stein);
  --hero-veil: linear-gradient(180deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.1) 40%, rgba(255,255,255,0.75) 100%);
  --hero-toc-bg: rgba(255, 255, 255, 0.4);
  --hero-toc-bg-hover: rgba(255, 255, 255, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--fjord-ink);
  background: var(--sno);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
figure, figcaption { margin: 0; }

/* ---------- Typography primitives ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stein);
  font-weight: 400;
}
.mono-label.dim { opacity: 0.6; }

.serif-display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.98;
}
.serif-display em {
  font-style: italic;
}

/* ============================================================
   Alert bar
   ============================================================ */
.alert-bar {
  background: var(--varsel-bg);
  color: var(--varsel-ink);
  border-bottom: 1px solid var(--varsel);
  padding: 10px var(--gutter);
  display: none;
  font-size: 14px;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.alert-bar.is-active { display: flex; }
.alert-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--varsel);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
.alert-bar strong { font-weight: 600; }
.alert-bar a {
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: auto;
  white-space: nowrap;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  border-bottom: var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklch, var(--sno) 92%, transparent);
}
.alert-bar.is-active ~ .masthead { top: 42px; }
.masthead-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}
.logo { display: flex; align-items: center; gap: 14px; color: var(--fjord-ink); }
.logo svg { width: 34px; height: 34px; fill: currentColor; }
.footer-brand svg { width: 42px; height: 42px; fill: currentColor; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text .name { font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em; }
.logo-text .sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--stein); margin-top: 2px;
}
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; align-items: center; }
.nav a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms;
}
.nav a:hover, .nav a.is-active { border-bottom-color: var(--fjord); }
.nav a .num {
  font-family: var(--mono); font-size: 10px; color: var(--stein);
  margin-right: 6px; letter-spacing: 0.1em;
}
.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--fjord);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  transition: background 160ms, color 160ms;
}
.nav-cta:hover { background: var(--fjord); color: var(--sno); border-bottom-color: transparent !important; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--fjord-ink);
  color: var(--sno);
  padding: 80px var(--gutter) 32px;
  position: relative;
  isolation: isolate;
}
.footer-horizon {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  pointer-events: none;
  z-index: -1;
  display: block;
}
.footer-horizon svg {
  width: 100%;
  height: auto;
  display: block;
}
.footer-horizon #sky { fill: var(--fjord) !important; }
.footer-inner { max-width: var(--page-max); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid oklch(0.32 0.022 235);
}
.footer-brand .serif-display { font-size: 32px; margin: 16px 0 12px; }
.footer-brand p { color: oklch(0.72 0.01 230); font-size: 14px; line-height: 1.55; max-width: 38ch; }
.footer-col h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(0.68 0.015 220);
  font-weight: 400; margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a { color: oklch(0.88 0.008 230); transition: color 120ms; }
.footer-col a:hover { color: var(--glacial); }
.footer-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: oklch(0.58 0.012 230);
  padding-top: 28px; font-family: var(--mono); letter-spacing: 0.06em;
}

/* ============================================================
   Generic helpers
   ============================================================ */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: var(--rule-ink);
  margin-bottom: 48px;
}
.section-label .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--stein);
}
.section-label .name { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.section-label .translate {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--stein);
  margin-left: auto; text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--fjord);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: background 160ms, color 160ms, transform 160ms;
  white-space: nowrap;
}
.btn:hover { background: var(--fjord); color: var(--sno); }
.btn .arrow { transition: transform 160ms; display: inline-flex; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-ghost { border-color: var(--stein-line); color: var(--fjord-ink); }
.btn-ghost:hover { background: var(--fjord-ink); color: var(--sno); border-color: var(--fjord-ink); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
  font: inherit; width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stein-line);
  border-radius: 2px;
  background: var(--sno);
  transition: border-color 160ms;
  margin-top: 6px;
}
input:focus { border-color: var(--fjord); }

/* Visible keyboard focus for all interactive elements (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--fjord); outline-offset: 2px; }
.footer :focus-visible,
.atlas-hero :focus-visible,
.landing-hero :focus-visible { outline-color: var(--sno); }

/* Skip-to-content link (WCAG 2.4.1) — visible only on focus */
.skip-link {
  position: absolute;
  left: 8px;
  top: -56px;
  z-index: 1000;
  background: var(--fjord-ink);
  color: var(--sno);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

.placeholder {
  background:
    repeating-linear-gradient(
      45deg,
      oklch(0.94 0.008 60),
      oklch(0.94 0.008 60) 12px,
      oklch(0.90 0.010 60) 12px,
      oklch(0.90 0.010 60) 24px
    );
  display: flex; align-items: center; justify-content: center;
  color: var(--stein);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-align: center;
  border: 1px solid var(--stein-line);
}

.route-enter { animation: routeIn 380ms cubic-bezier(.2,.7,.2,1); }
@keyframes routeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   LANDING — hero
   ============================================================ */
.landing-hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  color: var(--hero-text);
  display: flex;
  align-items: flex-end;
}
.landing-hero-photo {
  position: absolute; inset: -5% 0 0 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}
.landing-hero-veil {
  position: absolute; inset: 0;
  background: var(--hero-veil);
  z-index: 1;
}
.landing-hero-silhouette {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.landing-hero-silhouette svg { width: 100%; height: auto; display: block; }
.landing-hero-silhouette #sky { opacity: 0.55; }
.landing-hero-silhouette #mountains { opacity: 0.7; }
.landing-hero-content {
  position: relative; z-index: 2;
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 80px var(--gutter) 48px;
}
.hero-topline {
  display: flex; justify-content: space-between;
  margin-bottom: 48px;
}
.hero-topline .mono-label { color: var(--hero-text-dim); }

.landing-hero-title {
  font-size: clamp(56px, 9vw, 140px);
  color: var(--hero-text);
  margin: 0 0 32px;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.landing-hero-lede {
  max-width: 58ch;
  font-size: 20px;
  line-height: 1.45;
  color: var(--hero-text-lede);
  margin: 0 0 64px;
}

.landing-toc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-top: 1px solid var(--hero-toc-bg);
  background: var(--hero-toc-bg);
}
.toc-item {
  background: var(--hero-toc-bg);
  backdrop-filter: blur(6px);
  padding: 28px 26px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  color: var(--hero-text);
  transition: background 200ms, transform 200ms;
}
.toc-item:hover {
  background: var(--hero-toc-bg-hover);
}
.toc-item:hover .toc-arrow { transform: translateX(4px); }
.toc-num { grid-row: 1; color: var(--hero-text-dim); }
.toc-no {
  grid-row: 2; grid-column: 1 / 3;
  font-size: 44px;
  line-height: 1;
  margin-top: 4px;
}
.toc-en {
  grid-row: 1; grid-column: 2;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--hero-text-dim);
  align-self: end;
}
.toc-desc {
  grid-column: 1 / 4;
  font-size: 14px;
  color: var(--hero-text-lede);
  margin-top: 10px;
}
.toc-arrow {
  grid-row: 1; grid-column: 3;
  color: var(--hero-text-dim);
  transition: transform 200ms;
  align-self: start;
}
.landing-hero-caption { margin-top: 40px; }
.landing-hero-caption .mono-label { color: var(--hero-text-dim); }

/* ============================================================
   LANDING — chapters
   ============================================================ */
.chapter { padding: 120px 0; }
.chapter-01 { background: var(--sno); }
.chapter-02 { background: var(--sno-warm); }
.chapter-03 { background: var(--sno); }

.chapter-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: start;
}
.chapter-grid.reverse { grid-template-columns: 1.15fr 1fr; }
.chapter-grid.reverse .chapter-text { order: 2; }
.chapter-grid.reverse .chapter-image { order: 1; }

.chapter-text .lede {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  max-width: 26ch;
}
.chapter-text .lede em { font-style: italic; }
.chapter-text .body {
  font-size: 17px;
  line-height: 1.6;
  color: oklch(0.35 0.015 235);
  margin: 0 0 14px;
  max-width: 46ch;
  text-wrap: pretty;
}
.chapter-text .body em { font-style: italic; color: var(--fjord-ink); }

.chapter-image { position: relative; }
.chapter-image img, .chapter-image .placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
}
.chapter-image-01 img { aspect-ratio: 4/5; }
.chapter-image figcaption {
  margin-top: 14px;
  text-align: right;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 80px;
}
.photo-row-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 10px;
}

/* Process steps on landing */
.process-steps {
  margin-top: 32px;
  display: grid;
  gap: 10px;
  max-width: 46ch;
}
.process-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-top: var(--rule);
  align-items: baseline;
}
.process-step:last-child { border-bottom: var(--rule); }
.step-title { font-family: var(--serif); font-size: 18px; letter-spacing: -0.01em; }
.step-desc { font-size: 13px; color: var(--stein); margin-top: 2px; }

/* Stats strip */
.stats-strip {
  background: var(--fjord-ink);
  color: var(--sno);
  padding: 96px 0;
}
.stats-strip .section-label {
  border-bottom-color: oklch(0.32 0.022 235);
}
.stats-strip .section-label .num,
.stats-strip .section-label .translate {
  color: oklch(0.50 0.015 220);
}
.stats-strip .section-label .name { color: var(--sno); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
}
.live-counter-value {
  font-family: var(--serif);
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--sno);
  font-feature-settings: "tnum";
}
.live-counter-suffix {
  font-size: 36px;
  color: var(--glacial);
  margin-left: 4px;
}
.stats-strip .mono-label { color: oklch(0.50 0.015 220); }

/* Org stats */
.org-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 32px;
  max-width: 42ch;
}
.big-num { font-size: 52px; line-height: 1; letter-spacing: -0.02em; }

/* SMS section */
.sms-section {
  background: var(--fjord);
  color: var(--sno);
  padding: 120px 0;
}
.sms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}
.sms-left .mono-label { color: var(--glacial); }
.sms-title { font-size: 64px; margin: 18px 0 24px; max-width: 14ch; }
.sms-desc { color: rgba(255,255,255,0.8); font-size: 17px; line-height: 1.55; max-width: 40ch; }
.sms-form {
  background: var(--sno);
  color: var(--fjord-ink);
  padding: 40px;
  border-radius: 2px;
  display: grid;
  gap: 16px;
}
.sms-form label { display: block; font-size: 14px; }
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; margin-top: 8px;
}
.checkbox-row input { width: 16px; height: 16px; margin: 0; }
.sms-fine { margin: 12px 0 0; color: var(--stein); font-size: 10px; }
.sms-confirmed { text-align: center; padding: 24px 0; }
.sms-confirmed h3 { font-size: 32px; margin: 16px 0 10px; }
.sms-confirmed p { color: var(--stein); max-width: 34ch; margin: 0 auto; font-size: 14px; }

/* Updates strip */
.updates-strip { padding: 120px 0; background: var(--sno); }
.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.update-card {
  display: block;
  padding: 32px 28px;
  border: var(--rule);
  background: var(--sno);
  transition: background 200ms, border-color 200ms;
  min-height: 240px;
  position: relative;
}
.update-card:hover { background: var(--sno-warm); border-color: var(--fjord); }
.update-date { display: block; margin-bottom: 20px; }
.update-title { font-size: 26px; margin: 0 0 14px; letter-spacing: -0.01em; max-width: 22ch; }
.update-desc { font-size: 14px; color: oklch(0.42 0.012 235); line-height: 1.55; margin: 0; }
.update-more {
  position: absolute; bottom: 28px; left: 28px; color: var(--fjord);
  transition: transform 200ms;
}
.update-card:hover .update-more { transform: translateX(4px); }

/* ============================================================
   ATLAS pages (Vårt/Rent/Ditt vann, Prosjektet)
   ============================================================ */
.atlas-hero {
  position: relative;
  height: 68vh;
  min-height: 500px;
  overflow: hidden;
  color: var(--hero-text);
  background: var(--fjord-ink);
}
.atlas-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.atlas-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--hero-veil);
}
.atlas-hero-text {
  position: absolute;
  bottom: 60px;
  left: var(--gutter);
  right: var(--gutter);
  max-width: var(--page-max);
  margin: 0 auto;
  z-index: 2;
}
.atlas-hero-text .mono-label { color: var(--hero-text-dim); }
.atlas-title {
  font-size: clamp(64px, 10vw, 160px);
  color: var(--hero-text);
  margin: 16px 0 12px;
  letter-spacing: -0.03em;
}
.atlas-sub { font-size: 22px; color: var(--hero-text-lede); margin: 0; }
.atlas-sub em { font-style: italic; }

.atlas-body { padding: 80px var(--gutter) 120px; }
.atlas-intro {
  max-width: 52ch;
  margin-bottom: 96px;
}
.atlas-lede {
  font-size: 36px;
  line-height: 1.15;
  margin: 18px 0 0;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.atlas-lede em { font-style: italic; }

.atlas-section { margin-bottom: 96px; }

/* Rivers grid */
.rivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.river-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 20px;
}
.river-text .mono-label { color: var(--stein); }
.river-text h3 { font-size: 44px; margin: 8px 0 20px; letter-spacing: -0.02em; }
.river-text p {
  font-size: 15px; line-height: 1.6;
  color: oklch(0.35 0.015 235);
  margin: 16px 0 0;
  max-width: 44ch;
}
.river-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
  padding-top: 16px;
  border-top: var(--rule);
}
.river-dl dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--stein);
  padding: 6px 0;
}
.river-dl dd {
  font-family: var(--serif); font-size: 16px;
  margin: 0; padding: 6px 0;
  border-bottom: var(--rule);
}
.river-dl dt { border-bottom: var(--rule); }
.river-dl > *:nth-last-child(-n+2) { border-bottom: none; }

/* Seasons grid */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.season-item img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  margin-bottom: 10px;
}
.season-cap { display: flex; flex-direction: column; gap: 2px; }

/* Atlas quote */
.atlas-quote {
  padding: 96px 0;
  border-top: var(--rule-ink);
  border-bottom: var(--rule-ink);
  margin: 96px 0;
  text-align: center;
}
.quote-text {
  font-size: 44px;
  line-height: 1.2;
  max-width: 28ch;
  margin: 0 auto 24px;
  letter-spacing: -0.015em;
  font-style: italic;
}
.quote-text em { font-style: normal; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }

.topomap {
  background: var(--sno-warm);
  border: var(--rule);
  padding: 40px;
}

.atlas-next {
  margin-top: 80px;
  padding-top: 40px;
  border-top: var(--rule);
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   Rent vann — facilities, process, quality
   ============================================================ */
.facilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.facility .placeholder { aspect-ratio: 4/3; margin-bottom: 20px; }
.facility-text h3 { font-size: 36px; margin: 0 0 16px; letter-spacing: -0.02em; }

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: var(--rule);
}
.process-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
  padding: 32px 0;
  border-bottom: var(--rule);
}
.process-num { color: var(--fjord); font-size: 13px; padding-top: 8px; }
.process-item h4 { font-size: 28px; margin: 0 0 10px; letter-spacing: -0.015em; }
.process-item p {
  font-size: 15px; line-height: 1.6;
  color: oklch(0.40 0.015 235);
  margin: 0; max-width: 60ch;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--stein-line);
  border: 1px solid var(--stein-line);
}
.quality-card {
  background: var(--sno);
  padding: 28px;
}
.quality-card .mono-label { color: var(--stein); }
.quality-val {
  font-size: 48px;
  margin: 10px 0;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.quality-unit {
  font-size: 16px;
  color: var(--stein);
  margin-left: 4px;
  font-family: var(--mono);
  letter-spacing: 0;
}
.quality-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.quality-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: oklch(0.94 0.03 150);
  color: oklch(0.40 0.09 150);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quality-foot { margin-top: 24px; color: var(--stein); }

/* ============================================================
   Ditt vann — org, board, annual meeting, docs
   ============================================================ */
.org-diagram {
  background: var(--sno-warm);
  border: var(--rule);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.org-row {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.org-row.three { gap: 24px; width: 100%; max-width: 900px; }
.org-row.three .org-node { flex: 1; }
.org-node {
  background: var(--sno);
  border: 1px solid var(--fjord);
  padding: 20px 28px;
  min-width: 280px;
  text-align: center;
}
.org-node.top { background: var(--fjord); color: var(--sno); border-color: var(--fjord); }
.org-node.top .mono-label { color: rgba(255,255,255,0.65); }
.org-node.top p { color: rgba(255,255,255,0.8); }
.org-node h4 { font-size: 24px; margin: 8px 0; letter-spacing: -0.01em; }
.org-node p { font-size: 13px; color: var(--stein); margin: 0; }
.org-node.small { min-width: 0; padding: 16px; }
.org-node.small h4 { font-size: 17px; }
.org-line {
  width: 1px;
  height: 32px;
  background: var(--fjord);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.board-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 20px;
  border: var(--rule);
  align-items: center;
}
.board-avatar {
  width: 56px; height: 56px;
  background: var(--fjord);
  color: var(--sno);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
  border-radius: 50%;
}
.board-name { font-size: 19px; margin-bottom: 4px; letter-spacing: -0.01em; }

.annual-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 40px;
  background: var(--fjord-ink);
  color: var(--sno);
  border-radius: 2px;
}
.annual-date {
  text-align: center;
  border-right: 1px solid oklch(0.32 0.022 235);
  padding-right: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  justify-content: center;
}
.annual-date .mono-label { color: oklch(0.50 0.015 220); }
.annual-big {
  font-size: 100px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--sno);
}
.annual-body h3 { font-size: 36px; margin: 0 0 20px; letter-spacing: -0.02em; color: var(--sno); }
.annual-body p { color: rgba(255,255,255,0.85); line-height: 1.55; margin: 0 0 12px; }
.annual-body .btn { border-color: var(--sno); color: var(--sno); }
.annual-body .btn:hover { background: var(--sno); color: var(--fjord-ink); }
.annual-body .btn-ghost { border-color: oklch(0.45 0.022 235); }

/* Docs list */
.doc-list { list-style: none; padding: 0; margin: 0; border-top: var(--rule); }
.doc-row {
  display: grid;
  grid-template-columns: 56px 1fr 20px;
  gap: 20px;
  padding: 20px 8px;
  border-bottom: var(--rule);
  align-items: center;
  transition: background 120ms, padding 200ms;
  cursor: pointer;
}
.doc-row:hover { background: var(--sno-warm); padding-left: 20px; padding-right: 20px; }
.doc-icon {
  background: var(--fjord);
  color: var(--sno);
  padding: 8px 10px;
  border-radius: 2px;
  text-align: center;
  letter-spacing: 0.1em;
}
.doc-title { font-size: 20px; margin-bottom: 4px; letter-spacing: -0.01em; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.contact-grid p { margin: 10px 0 0; }

/* ============================================================
   Prosjektet — timeline, stats, gallery
   ============================================================ */
.timeline { list-style: none; padding: 0; margin: 0; border-top: var(--rule); }
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-bottom: var(--rule);
}
.timeline-year { font-size: 44px; letter-spacing: -0.02em; line-height: 1; }
.timeline-item h4 { font-size: 22px; margin: 0 0 8px; letter-spacing: -0.01em; }
.timeline-item p { color: oklch(0.40 0.015 235); line-height: 1.55; margin: 0; max-width: 60ch; }

.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.project-stats .big-num { font-size: 64px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid .placeholder { aspect-ratio: 4/3; }

/* ============================================================
   Oppdateringer
   ============================================================ */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: var(--rule);
}
.filter-chip {
  padding: 8px 14px;
  border: 1px solid var(--stein-line);
  border-radius: 999px;
  color: var(--stein);
  transition: all 160ms;
  background: var(--sno);
}
.filter-chip:hover { border-color: var(--fjord); color: var(--fjord); }
.filter-chip.is-active { background: var(--fjord); color: var(--sno); border-color: var(--fjord); }

.update-list { list-style: none; padding: 0; margin: 0; }
.update-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-top: var(--rule);
  align-items: baseline;
}
.update-row:last-child { border-bottom: var(--rule); }
.update-row.is-alert {
  background: var(--varsel-bg);
  border-top-color: var(--varsel);
  padding-left: 24px; padding-right: 24px;
  margin: 0 -24px;
}
.update-row.is-alert + .update-row { border-top-color: var(--stein-line); }
.update-row-date .mono-label { display: block; }
.kind-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--stein);
  margin-bottom: 12px;
}
.kind-tag.alert {
  color: var(--varsel-ink);
  background: oklch(0.98 0.04 70);
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--varsel);
}
.update-row-title { font-size: 30px; margin: 0 0 12px; letter-spacing: -0.015em; max-width: 28ch; }
.update-row p { color: oklch(0.38 0.012 235); line-height: 1.6; max-width: 62ch; margin: 0; }

/* ============================================================
   Min side
   ============================================================ */
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-side { position: relative; overflow: hidden; }
.login-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-side::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,18,28,0.1), rgba(10,18,28,0.3));
}
.login-form { padding: 60px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 40px;
  border-bottom: var(--rule-ink);
  margin-bottom: 40px;
}
.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}
.dash-card {
  padding: 28px;
  border: var(--rule);
  background: var(--sno);
}
.dash-usage { grid-row: span 2; }
.dash-wide { grid-column: 1 / -1; }
.dash-big { font-size: 56px; letter-spacing: -0.02em; margin: 12px 0 8px; line-height: 0.95; }
.dash-chart {
  margin-top: 40px;
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 90px;
  border-bottom: 1px solid var(--stein-line);
  padding-bottom: 4px;
}
.dash-bar {
  flex: 1;
  background: var(--fjord);
  min-height: 10px;
  border-radius: 1px 1px 0 0;
  transition: background 160ms;
}
.dash-bar:last-child { background: var(--glacial-deep); }
.dash-months { display: flex; justify-content: space-between; margin-top: 8px; }
.dash-list { list-style: none; padding: 0; margin: 0; }
.dash-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 14px;
}
.dash-list li svg { color: oklch(0.48 0.12 150); }
.dash-messages { list-style: none; padding: 0; margin: 16px 0 0; }
.dash-message {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-top: var(--rule);
}
.dash-message:last-child { border-bottom: var(--rule); }
.dash-message p { font-size: 14px; color: var(--stein); margin: 4px 0 0; }

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 320px;
  background: var(--sno);
  border: 1px solid var(--fjord);
  box-shadow: 0 20px 60px rgba(10,18,28,0.25);
  z-index: 100;
  font-size: 13px;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: var(--rule);
  background: var(--fjord);
  color: var(--sno);
}
.tweaks-head .mono-label { color: var(--sno); }
.tweaks-head button { color: var(--sno); font-size: 18px; line-height: 1; width: 24px; height: 24px; }
.tweaks-body { padding: 16px; display: grid; gap: 20px; max-height: 70vh; overflow: auto; }
.tweak > .mono-label { display: block; margin-bottom: 8px; }
.tweak-hint { font-size: 11px; color: var(--stein); margin: 8px 0 0; line-height: 1.4; }
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--stein-line);
  overflow: hidden;
  border-radius: 2px;
}
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.seg button {
  padding: 8px 4px;
  font-size: 12px;
  border-right: 1px solid var(--stein-line);
  transition: background 120ms;
  font-family: var(--sans);
}
.seg button:last-child { border-right: none; }
.seg button:hover { background: var(--sno-warm); }
.seg button.is-on { background: var(--fjord); color: var(--sno); }
.seg button.is-on.is-alert { background: var(--varsel); color: var(--sno); }
.tweak-links {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tweak-links a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--stein-line);
  color: var(--stein);
}
.tweak-links a:hover { background: var(--fjord); color: var(--sno); border-color: var(--fjord); }

/* ============================================================
   Responsive (reasonable guardrails, not a full mobile design)
   ============================================================ */
@media (max-width: 960px) {
  :root { --gutter: 20px; }
  .nav { display: none; }
  .masthead-inner { padding: 16px var(--gutter); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .landing-toc { grid-template-columns: 1fr; }
  .chapter-grid, .chapter-grid.reverse { grid-template-columns: 1fr; gap: 40px; }
  .chapter-grid.reverse .chapter-image, .chapter-grid.reverse .chapter-text { order: unset; }
  .photo-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .sms-grid { grid-template-columns: 1fr; gap: 40px; }
  .updates-grid { grid-template-columns: 1fr; }
  .rivers-grid, .facilities-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .seasons-grid, .gallery-grid, .board-grid { grid-template-columns: 1fr 1fr; }
  .quality-grid { grid-template-columns: 1fr 1fr; }
  .project-stats { grid-template-columns: 1fr 1fr; }
  .annual-card { grid-template-columns: 1fr; }
  .annual-date { border-right: none; border-bottom: 1px solid oklch(0.32 0.022 235); padding-right: 0; padding-bottom: 24px; flex-direction: row; gap: 16px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { min-height: 200px; }
  .login-form { padding: 40px 24px; }
  .dash-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .landing-hero-title { font-size: clamp(44px, 12vw, 80px); }
  .atlas-title { font-size: clamp(48px, 14vw, 96px); }
  .quote-text { font-size: 28px; }
  .update-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}

/* ── Inline-style migration → strict CSP (decision #50) ── */
/* Spacing utilities */
.u-mt-8  { margin-top: 8px; }
.u-mt-32 { margin-top: 32px; }
.u-mt-48 { margin-top: 48px; }
.u-mt-64 { margin-top: 64px; }
.u-mt-80 { margin-top: 80px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-24 { margin-bottom: 24px; }
.u-mb-32 { margin-bottom: 32px; }
.u-pt-32 { padding-top: 32px; }
.u-pt-40 { padding-top: 40px; }
.u-pt-48 { padding-top: 48px; }
.u-pt-80 { padding-top: 80px; }
.u-border-top { border-top: var(--rule); }
.u-flex-1 { flex: 1; }

/* Text colours */
.text-sno         { color: var(--sno); }
.text-stein       { color: var(--stein); }
.text-fjord-muted { color: var(--fjord-muted); }

/* Hero variants and eyebrow links */
.atlas-hero--compact { height: auto; min-height: 30vh; display: flex; align-items: flex-end; padding-bottom: 2rem; }
.atlas-hero-text a { color: inherit; }
.hero-topline .mono-label { color: rgba(255,255,255,0.72); }
.landing-hero-caption .mono-label { color: rgba(255,255,255,0.6); }

/* Buttons and inline-style links */
.btn-outline { background: none; border: var(--rule); color: var(--fjord-muted); }
.btn-outline:hover { background: none; border: var(--rule); color: var(--fjord-muted); }
.link-button { background: none; border: none; padding: 0; text-align: left; text-decoration: underline; cursor: pointer; }
.link-block  { display: block; margin-top: 16px; text-decoration: underline; }
.btn-stack   { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

/* Flash banners */
.flash-banner         { padding: 16px 20px; margin-bottom: 40px; }
.flash-banner--notice { color: var(--sno); background: var(--fjord-ink); }
.flash-banner--alert  { color: var(--varsel-ink); background: var(--varsel-bg); }
.flash-inline         { color: var(--amber); margin-bottom: 16px; }

/* Forms and layout helpers */
.field-row    { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.plain-list   { list-style: none; padding: 0; }
.plain-list li { margin-bottom: 16px; font-size: 15px; }
.detail-table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 2; }
.detail-table .mono-label { padding-right: 32px; }
.detail-table th { text-align: left; font-weight: inherit; }
.updates-grid--single { grid-template-columns: 1fr; }
.is-hidden { display: none; }
