/* klovning.net — palette drawn from Utsira:
   North Sea blue, pale sky and sea mist, the warm light of the lighthouse,
   and a touch of heather. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #eaf3f5;        /* pale sky over the island */
  --mist: #f6fafa;       /* sea mist */
  --card: rgba(255, 255, 255, 0.78);
  --ink: #16313d;        /* deep North Sea */
  --muted: #587480;
  --line: #d3e3e8;
  --sea: #2a7896;        /* North Sea blue */
  --sea-soft: #dcecf1;
  --light: #ffd98a;      /* lighthouse light */
  --heather: #9a86b8;    /* heather on the moor */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #0f1d24;
    --mist: #13242c;
    --card: rgba(20, 38, 46, 0.72);
    --ink: #e6f0f2;
    --muted: #93adb7;
    --line: #23404c;
    --sea: #7cc3dc;
    --sea-soft: #1d3a46;
    --light: #ffd27a;
    --heather: #b4a3d2;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--mist); }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sky) 0%, var(--mist) 55%, var(--mist) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Language switching: show only the active language */
/* (only used on the 404 page, which carries both languages) */
html[data-lang="no"] body [lang="en"],
html[data-lang="en"] body [lang="nb"] { display: none; }

/* Background: a soft, blurred map of Utsira (Kartverket coastline),
   with depth bands in the sea and the red lighthouse, Utsira fyr,
   sweeping its beam across the page. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: blur(4px);
  opacity: 0.6;
}
@media (prefers-color-scheme: dark) { .backdrop { opacity: 0.7; } }

/* Klovning's place on the island, drawn sharp on top of the blurred map */
.backdrop.backdrop-marks { filter: none; opacity: 1; }
.k-dot { fill: var(--sea); }
.k-ring { fill: #fff; opacity: 0.9; }
.k-pulse { fill: none; stroke: var(--sea); stroke-width: 18; opacity: 0;
  transform-box: view-box; animation: pulse 3.2s ease-out infinite; }
@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(3.2); opacity: 0; }
}
.k-label { fill: var(--ink); font-family: var(--font); font-weight: 700; font-size: 150px; letter-spacing: -2px;
  paint-order: stroke; stroke: var(--mist); stroke-width: 36px; stroke-linejoin: round; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .k-pulse { animation: none; } }
.backdrop svg { width: 100%; height: 100%; display: block; }

.utsira {
  --land: #c4d8cc; --shore: #e4ece2; --heather-c: #b9a8d3;
  --depth-1: #d7e8ee; --depth-2: #deedf1; --depth-3: #e5f1f4;
  --lamp: #ffd98a; --beam: #ffe3a0; --red: #c8322b;
}
@media (prefers-color-scheme: dark) {
  .utsira {
    --land: #22403f; --shore: #2b4c48; --heather-c: #4a4170;
    --depth-1: #16323d; --depth-2: #142c36; --depth-3: #12262f;
    --lamp: #ffd27a; --beam: #ffd98a; --red: #e0483e;
  }
}
.u-depth { fill: none; stroke-linejoin: round; }
.u-depth-1 { stroke: var(--depth-1); stroke-width: 280; }
.u-depth-2 { stroke: var(--depth-2); stroke-width: 650; }
.u-depth-3 { stroke: var(--depth-3); stroke-width: 1150; }
.u-land { fill: var(--land); }
.u-shore { fill: none; stroke: var(--shore); stroke-width: 150; stroke-linejoin: round; }
.u-heather-a { stop-color: var(--heather-c); stop-opacity: 0.3; }
.u-heather-b { stop-color: var(--heather-c); stop-opacity: 0; }
.u-light { fill: var(--red); }
.u-light-ring { fill: #fff; opacity: 0.9; }
.u-beam-a { stop-color: var(--beam); stop-opacity: 0.25; }
.u-beam-b { stop-color: var(--beam); stop-opacity: 0; }
.u-glow-a { stop-color: var(--lamp); stop-opacity: 0.85; }
.u-glow-b { stop-color: var(--lamp); stop-opacity: 0; }

.u-beam-rot {
  transform-box: view-box;
  animation: turn 30s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .u-beam-rot { animation: none; transform: rotate(-12deg); }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) { .wrap { padding: 1.75rem 2rem 2.5rem; } }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Small mark: the Klovning marker from the map */
.mark {
  position: relative;
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea) 55%, #fff), 0 0 0 7px var(--sea-soft);
}
.mark::after {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border-radius: 50%;
  background: var(--sea);
}

.lang {
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sea);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.lang:hover { border-color: var(--sea); }
.lang:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

main { flex: 1; padding-top: clamp(2.5rem, 10vh, 6rem); }

h1 {
  font-weight: 700;
  font-size: clamp(2.9rem, 10vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 2.25rem;
}

.intro {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 2.5rem;
}

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .people { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

.person {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem 1.35rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.2s;
}
.person:hover { border-color: color-mix(in srgb, var(--sea) 45%, var(--line)); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .person, .person:hover { transition: none; transform: none; } }

.avatar {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sea-soft);
  color: var(--sea);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.person:nth-child(4n+2) .avatar { background: color-mix(in srgb, var(--heather) 22%, transparent); color: #6f5a96; }
.person:nth-child(4n+3) .avatar { background: color-mix(in srgb, var(--light) 40%, transparent); color: #9a6b12; }
@media (prefers-color-scheme: dark) {
  .person:nth-child(4n+2) .avatar { color: var(--heather); }
  .person:nth-child(4n+3) .avatar { color: var(--light); }
}

.person-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.person-name a { color: inherit; text-decoration: none; }
.person-name a:hover { color: var(--sea); }
.person-name a:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }

.person-desc { margin: 0; color: var(--muted); }

.links {
  list-style: none;
  margin: auto 0 0;
  padding: 0.7rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--sea);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--sea-soft); border-color: var(--sea-soft); }
.chip:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.chip-main { background: var(--sea); border-color: var(--sea); color: #fff; }
.chip-main:hover { background: color-mix(in srgb, var(--sea) 85%, #000); border-color: transparent; }
@media (prefers-color-scheme: dark) { .chip-main { color: #0f1d24; } .chip-main:hover { background: color-mix(in srgb, var(--sea) 85%, #fff); } }
.arrow { font-size: 0.8em; opacity: 0.8; }

.origin {
  margin-top: clamp(2.5rem, 7vh, 4.5rem);
  padding: 1.6rem 1.5rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  max-width: 42rem;
}
.origin h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
}
.qa { margin: 0 0 1.15rem; }
.qa h3 { margin: 0 0 0.3rem; font-size: 1.02rem; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.qa p { margin: 0; color: var(--muted); }
.origin .links { padding-top: 0.25rem; }

.foot {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.foot a { color: inherit; }

.notfound p { color: var(--muted); }
.notfound a { color: var(--sea); font-weight: 600; }
