/* Grunnoppsett for hele siden */

:root {
    --bg: #f5f7fb;
    --bg-alt: #ffffff;
    --primary: #2c4f9e;
    --primary-soft: #e1e8ff;
    --accent: #f8b34b;
    --text: #1f2430;
    --muted: #6b7280;
    --border: #dde1f0;
    --radius: 10px;
    --shadow-soft: 0 8px 18px rgba(15, 23, 42, 0.08);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Layout */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 5vw;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 44px;
    width: auto;
}

.site-title-group h1 {
    font-size: 1.25rem;
    margin: 0;
}

.site-title-group .tagline {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.hero {
    padding: 3rem 5vw 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.hero-text h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.hero-text p {
    max-width: 34rem;
    color: var(--muted);
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    display: block;
    margin-inline: auto;
}

.section {
    padding: 2.5rem 5vw;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

/* Kort og grid */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-alt);
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
}

/* Post-liste og innlegg */

.post-preview {
    background: var(--bg-alt);
    padding: 1.4rem 1.8rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.post-preview h3 {
    margin-top: 0;
}

.post-preview .meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0;
}

.post-preview .read-more {
    font-weight: 600;
}

/* Enkeltinnlegg */

.post-main {
    padding: 2.5rem 5vw 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.post {
    background: var(--bg-alt);
    padding: 2rem 2.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.post-header h2 {
    margin-top: 0;
}

.post-meta {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.post-figure {
    margin: 1.5rem 0;
}

.post-figure img {
    width: 100%;
    border-radius: 12px;
}

.post-figure figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.4rem;
}

.post-footer {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.95rem;
}

/* Diverse */

.button-primary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.8rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.button-primary:hover {
    filter: brightness(1.05);
}

.clean-list {
    list-style: none;
    padding-left: 0;
}

.clean-list li::before {
    content: "• ";
    color: var(--primary);
}

.hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.site-footer {
    padding: 1.5rem 5vw;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Responsivitet */

@media (max-width: 800px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 2rem;
    }

    .grid-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header {
        gap: 0.75rem;
    }
}
