/* Pakk sammen – pakksammen.no
   Én stilfil, ingen eksterne ressurser. Systemfonter og lokale ikoner,
   slik at ingen tredjepart får se hvem som besøker sida. */

:root {
    color-scheme: light dark;

    --ink: #10151f;
    --ink-soft: #4a5568;
    --paper: #ffffff;
    --paper-tint: #f4f6fa;
    --line: #e2e7f0;
    --accent: #e05a00;
    --accent-soft: #fff1e6;
    --green: #0f8a53;

    --radius: 14px;
    --measure: 68ch;
    --shell: 1080px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #eef2f8;
        --ink-soft: #a3aec1;
        --paper: #0d1117;
        --paper-tint: #151b24;
        --line: #242c38;
        --accent: #ff8a3d;
        --accent-soft: #2a1a0f;
        --green: #3ecf8e;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

.shell {
    width: min(100% - 2.5rem, var(--shell));
    margin-inline: auto;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* ---------- Forhåndsvisningsstripe ---------- */

/* Vises bare på den fulle sida, som publikum ikke får se ennå. */
.preview-bar {
    padding: 0.5rem 0;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.82rem;
    text-align: center;
}

.preview-bar a {
    color: inherit;
}

/* ---------- Topplinje ---------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.masthead .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 62px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: var(--ink);
    text-decoration: none;
}

.wordmark svg {
    width: 26px;
    height: 26px;
    flex: none;
}

.masthead nav {
    display: flex;
    gap: 1.4rem;
    font-size: 0.95rem;
}

.masthead nav a {
    white-space: nowrap;
    color: var(--ink-soft);
    text-decoration: none;
}

.masthead nav a:hover {
    color: var(--accent);
}

/* På smale skjermer er det ikke plass til alle lenkene ved siden av navnetrekket.
   Da faller de minst viktige bort framfor å brekke over flere linjer. */
@media (max-width: 34rem) {
    .masthead nav {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .masthead nav .secondary {
        display: none;
    }
}

/* ---------- Hero ---------- */

.hero {
    padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero .shell {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 6vw, 4rem);
    align-items: center;
}

@media (max-width: 52rem) {
    .hero .shell {
        grid-template-columns: 1fr;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.hero h1 {
    margin: 1.1rem 0 0;
    font-size: clamp(2.3rem, 6.2vw, 3.6rem);
}

.hero .lead {
    max-width: 46ch;
    margin: 1.1rem 0 0;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: var(--ink-soft);
}

.hero .fine {
    margin-top: 1.6rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ---------- Varsel-illustrasjon ---------- */

.stage {
    display: grid;
    gap: 0.85rem;
    padding: 1.6rem;
    background: var(--paper-tint);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.alert {
    display: flex;
    gap: 0.8rem;
    padding: 0.85rem 0.95rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px -12px rgb(0 0 0 / 0.4);
}

.alert.is-late {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.alert .glyph {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
}

.alert .glyph svg {
    width: 20px;
    height: 20px;
}

.alert .copy {
    min-width: 0;
}

.alert strong {
    display: block;
    font-size: 0.92rem;
}

.alert p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.alert time {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.stage figcaption {
    font-size: 0.82rem;
    color: var(--ink-soft);
    text-align: center;
}

/* ---------- Seksjoner ---------- */

section {
    padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

section + section {
    border-top: 1px solid var(--line);
}

.section-title {
    margin: 0 0 0.6rem;
    font-size: clamp(1.6rem, 3.6vw, 2.1rem);
}

.section-intro {
    max-width: var(--measure);
    margin: 0 0 2.2rem;
    color: var(--ink-soft);
}

/* Fire kort, bevisst i 2×2 og ikke auto-fit – ellers ender de som 3+1
   på mellomstore skjermer, som ser ut som en feil. */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

@media (min-width: 40rem) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    padding: 1.4rem;
    background: var(--paper-tint);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.card h3 {
    margin: 0.7rem 0 0.4rem;
    font-size: 1.05rem;
}

.card p {
    margin: 0;
    font-size: 0.94rem;
    color: var(--ink-soft);
}

.card .glyph {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
}

.card .glyph svg {
    width: 19px;
    height: 19px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    padding-top: 0.9rem;
    border-top: 2px solid var(--accent);
}

.steps li::before {
    content: counter(step);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.steps h3 {
    margin: 0.3rem 0 0.35rem;
    font-size: 1.05rem;
}

.steps p {
    margin: 0;
    font-size: 0.94rem;
    color: var(--ink-soft);
}

/* ---------- Kontakt ---------- */

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
}

.contact div {
    min-width: 14rem;
}

.contact dt {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.contact dd {
    margin: 0.25rem 0 0;
    font-size: 1.02rem;
}

/* ---------- Brødtekst på undersider ---------- */

.prose {
    max-width: var(--measure);
}

.prose h2 {
    margin: 2.4rem 0 0.6rem;
    font-size: 1.3rem;
}

.prose h2:first-of-type {
    margin-top: 1.8rem;
}

.prose p,
.prose li {
    color: var(--ink-soft);
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose strong {
    color: var(--ink);
}

.updated {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--paper-tint);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.callout {
    margin: 1.8rem 0;
    padding: 1.1rem 1.3rem;
    background: var(--paper-tint);
    border-left: 3px solid var(--green);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p {
    margin: 0;
}

/* ---------- Bunn ---------- */

.colophon {
    padding-block: 2.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.colophon .shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem 1.6rem;
}

.colophon nav {
    display: flex;
    gap: 1.2rem;
}

.colophon a {
    color: var(--ink-soft);
}

/* ---------- Teaser («kommer») ---------- */

.teaser {
    display: grid;
    place-items: center;
    min-height: clamp(26rem, 72vh, 40rem);
    text-align: center;
}

.teaser .shell {
    max-width: 42rem;
}

.teaser h1 {
    margin: 1.1rem 0 0;
    font-size: clamp(2.1rem, 6vw, 3.2rem);
}

.teaser .lead {
    margin: 1.1rem auto 0;
    max-width: 34ch;
    font-size: clamp(1.02rem, 2.2vw, 1.15rem);
    color: var(--ink-soft);
}

.teaser .fine {
    margin-top: 1.8rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ---------- Kompakt på mobil ---------- */

@media (max-width: 34rem) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    .shell {
        width: min(100% - 2rem, var(--shell));
    }

    .hero {
        padding: 2rem 0 2.25rem;
    }

    .hero .shell {
        gap: 1.75rem;
    }

    .hero h1 {
        margin-top: 0.85rem;
        font-size: 2rem;
    }

    .hero .lead {
        margin-top: 0.8rem;
        font-size: 1rem;
    }

    .hero .fine {
        margin-top: 1.1rem;
        font-size: 0.85rem;
    }

    section {
        padding-block: 2.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-intro {
        margin-bottom: 1.4rem;
        font-size: 0.94rem;
    }

    .stage {
        gap: 0.6rem;
        padding: 1rem;
        border-radius: 16px;
    }

    .alert {
        gap: 0.65rem;
        padding: 0.7rem 0.75rem;
    }

    .alert .glyph {
        width: 30px;
        height: 30px;
    }

    .alert .glyph svg {
        width: 17px;
        height: 17px;
    }

    .alert strong {
        font-size: 0.88rem;
    }

    .alert p {
        font-size: 0.82rem;
    }

    .grid {
        gap: 0.7rem;
    }

    .card {
        padding: 1.1rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .steps {
        gap: 1.2rem;
    }

    .prose h2 {
        margin: 1.6rem 0 0.45rem;
        font-size: 1.15rem;
    }

    .prose h2:first-of-type {
        margin-top: 1.4rem;
    }

    .prose p,
    .prose li {
        font-size: 0.95rem;
    }

    .callout {
        margin: 1.3rem 0;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .contact {
        gap: 1.1rem;
    }

    .teaser {
        min-height: 60vh;
    }

    .colophon {
        padding-block: 1.6rem;
        font-size: 0.84rem;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
