:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #2a2420;
  --muted: #6e6359;
  --line: #e2d8c6;
  --accent: #7a1f1f;
  --accent-ink: #fff;
  --serif: 'Source Serif 4', Georgia, serif;
  --display: 'EB Garamond', Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1816; --paper: #24201d; --ink: #ece4d8; --muted: #a89c8f;
    --line: #3a332d; --accent: #d0705f; --accent-ink: #1b1816;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--serif); }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: .2em 0; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; display: flex; align-items: baseline; gap: 1rem; }
h2 .more { font: 15px var(--serif); margin-left: auto; }

/* header */
header.site { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar { display: flex; align-items: center; gap: 1.5rem; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; }
.brand span { font: 600 1.6rem var(--display); color: var(--accent); }
.brand small { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--accent); }
.search { margin-left: auto; }
.search input, .bigsearch input {
  font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink); width: 220px; max-width: 100%;
}
@media (max-width: 640px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }

.intro { padding: 2rem 0 .5rem; }
.intro p { color: var(--muted); max-width: 60ch; margin: 0; }
.listhead { padding: 1.8rem 0 1rem; }
.kicker { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--muted); margin: 0; }
.count { color: var(--muted); margin: 0; }
.empty { color: var(--muted); padding: 2rem 0; }

/* justert bildegrid */
.grid { display: flex; flex-wrap: wrap; gap: 6px; }
.grid .filler { flex-grow: 1000000; }
.tile { position: relative; display: block; overflow: hidden; background: var(--line); border-radius: 3px; }
.tile i { display: block; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 7px; color: #fff; font-size: .85rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transition: opacity .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile:hover img { transform: scale(1.03); }
.tile:hover span, .tile:focus span { opacity: 1; }
@media (max-width: 640px) { .tile { flex-basis: 100% !important; } .tile span { opacity: 1; } }

/* kort for kategorier/steder/år */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.card { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; background: var(--line); text-decoration: none; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card span { position: absolute; inset: auto 0 0 0; padding: 24px 12px 9px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); display: flex; justify-content: space-between; gap: .5rem; }
.card strong { font: 600 1.15rem var(--display); }
.card em { font-style: normal; opacity: .8; font-size: .85rem; align-self: end; }

/* enkeltbilde */
.photo figure { margin: 1.2rem 0 0; text-align: center; }
.photo figure img { max-height: 85vh; width: auto; height: auto; display: inline-block; background: var(--line); }
.info { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; padding: 1rem 0; }
@media (max-width: 860px) { .info { grid-template-columns: 1fr; gap: 1rem; } }
.desc { max-width: 68ch; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: inline-block; padding: 2px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; background: var(--paper); }
.tags .t-sted a::before { content: '📍 '; }
.facts { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.2rem; align-self: start; }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 4px; text-decoration: none; border: 0; font: inherit; cursor: pointer; }
.credit, .small { font-size: .9rem; color: var(--muted); }
#minimap { height: 180px; border-radius: 4px; margin-top: .8rem; }
#bigmap { height: 72vh; border-radius: 6px; border: 1px solid var(--line); }
.pop { display: block; width: 180px; color: inherit; text-decoration: none; }
.pop img { width: 180px; height: 120px; object-fit: cover; display: block; margin-bottom: 4px; border-radius: 2px; }

.pager { display: flex; justify-content: center; gap: 1.5rem; padding: 2rem 0; }
.bigsearch { display: flex; gap: .5rem; padding: 1rem 0 3rem; }
.bigsearch input { width: 100%; max-width: 480px; font-size: 1.1rem; padding: 10px 16px; }

footer.site { margin-top: 4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.5rem 0; }
