:root {
    --bg: #faf8f4;
    --surface: #ffffff;
    --tint: #f0ede6;
    --text: #1d2420;
    --muted: #5c6660;
    --border: #e3dfd6;
    --accent: #2f6b4f;
    --accent-strong: #234f3b;
    --on-accent: #ffffff;
    --radius: 18px;
    --shadow: 0 1px 2px rgb(20 30 25 / 6%), 0 8px 24px rgb(20 30 25 / 6%);
    --shadow-hover: 0 2px 4px rgb(20 30 25 / 8%), 0 16px 40px rgb(20 30 25 / 12%);
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Fraunces", Georgia, serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121614;
        --surface: #1a201d;
        --tint: #171c19;
        --text: #e8ebe8;
        --muted: #9aa49e;
        --border: #2a322e;
        --accent: #7cc4a0;
        --accent-strong: #9dd8b9;
        --on-accent: #0f1a14;
        --shadow: 0 1px 2px rgb(0 0 0 / 30%);
        --shadow-hover: 0 12px 32px rgb(0 0 0 / 45%);
        color-scheme: dark;
    }
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.container { width: min(100% - 2rem, 1180px); margin-inline: auto; }
.container--narrow { width: min(100% - 2rem, 720px); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 68px; }
.logo { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--text); text-decoration: none; }
.nav ul { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.nav a {
    display: block;
    padding: .45rem .9rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.nav a:hover { color: var(--text); background: var(--tint); }
.nav a.is-active { color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* Hero */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #1d2a24;
    color: #fff;
    isolation: isolate;
}
.hero--large { min-height: min(82vh, 760px); }
.hero--small { min-height: 360px; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(0 0 0 / 0%) 30%, rgb(10 18 14 / 75%) 100%);
}
.hero__content { padding-block: 4rem 3.5rem; }
.hero__title { max-width: 16ch; margin: 0 0 1rem; font-size: clamp(2.5rem, 6vw, 4.75rem); }
.hero--small .hero__title { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.hero__intro { max-width: 52ch; margin: 0 0 2rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); opacity: .92; }
.hero--small .hero__intro { margin-bottom: 0; }

.button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 1.5rem;
    border-radius: 999px;
    background: #fff;
    color: #1d2420;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgb(0 0 0 / 25%); }

/* Seksjoner */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tinted { background: var(--tint); }
.section__header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section__header h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); }

.intro { display: grid; gap: 1rem 4rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .intro { grid-template-columns: 2fr 3fr; } }
.intro__heading { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); }

.link-arrow { color: var(--accent); font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow--back { display: inline-block; margin-bottom: 1.5rem; font-size: .95rem; }

/* Kort */
.grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; }
.card__title { margin: .35rem 0 .6rem; font-size: 1.4rem; }
.card__text { margin: 0; color: var(--muted); font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; color: var(--muted); font-size: .85rem; font-weight: 500; }
.meta > * + *::before { content: "·"; margin-right: 1rem; }

/* Artikkel */
.article-header { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.article-header__title { margin: 0 0 1.25rem; font-size: clamp(2.25rem, 5vw, 3.5rem); }
.lead { margin: 0 0 1.5rem; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; }
.article-figure { margin-block: 0 clamp(2rem, 5vw, 3.5rem); }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { margin-top: .75rem; color: var(--muted); font-size: .875rem; }

.prose { padding-bottom: 1rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.5rem 0 .75rem; font-size: 1.75rem; }
.prose h3 { margin: 2rem 0 .5rem; font-size: 1.35rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
    margin: 2rem 0;
    padding: .25rem 0 .25rem 1.5rem;
    border-left: 3px solid var(--accent);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.4;
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 4rem; padding: 0; list-style: none; }
.tags li {
    padding: .3rem .85rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-strong);
    font-size: .85rem;
    font-weight: 500;
}

.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; }
.pagination a {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
}
.pagination a.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.empty { color: var(--muted); }

/* Footer */
.site-footer { padding-block: 3rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.site-footer p { margin: 0; }

@media (max-width: 640px) {
    .site-header__inner { flex-direction: column; align-items: flex-start; gap: .25rem; padding-block: .75rem; }
    .nav a { padding-inline: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
