@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,600&family=Lora:ital,wght@0,400;0,600;1,400&family=Old+Standard+TT&display=swap');

:root {
    --paper: #f6f1e6;
    --paper-alt: #efe7d5;
    --ink: #211c16;
    --ink-light: #55503f;
    --accent: #7a1f2b;
    --rule: #211c16;
    --rule-light: #c9bfa4;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-meta: 'Old Standard TT', Georgia, serif;
    --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #1b1712;
        --paper-alt: #241f18;
        --ink: #ece4d3;
        --ink-light: #b8ad91;
        --accent: #c9525f;
        --rule: #ece4d3;
        --rule-light: #4a4332;
    }
}

* { box-sizing: border-box; }

body.site-body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* --- Dateline bar --- */

.dateline-bar {
    border-bottom: 1px solid var(--rule-light);
    font-family: var(--font-meta);
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .5rem 0;
}
.dateline-bar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }

/* --- Masthead --- */

.masthead { text-align: center; padding: 1.75rem 1rem 1.25rem; border-bottom: 4px double var(--rule); }
.masthead-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    margin: 0;
    letter-spacing: .01em;
}
.masthead-tagline {
    font-family: var(--font-meta);
    font-style: italic;
    color: var(--ink-light);
    margin: .35rem 0 0;
    font-size: 1rem;
}
.masthead-counter {
    margin-top: .6rem;
    font-family: var(--font-meta);
    font-size: .85rem;
    color: var(--ink-light);
}
.masthead-counter strong { color: var(--accent); font-size: 1.05rem; }

/* --- Nav --- */

.site-nav {
    border-bottom: 1px solid var(--rule);
    background: var(--paper-alt);
}
.site-nav .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.site-nav a {
    display: inline-block;
    padding: .6rem .9rem;
    font-family: var(--font-meta);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink);
}
.site-nav a:hover { color: var(--accent); text-decoration: none; background: rgba(122,31,43,.08); }
.site-nav form { display: flex; align-items: center; padding: .3rem .6rem; }
.site-nav input[type=search] {
    font-family: var(--font-body);
    border: 1px solid var(--rule-light);
    background: var(--paper);
    color: var(--ink);
    padding: .3rem .55rem;
    border-radius: 3px;
    font-size: .85rem;
    width: 150px;
}

/* --- Main layout --- */

.site-main { padding: 2rem 0 3rem; }

.section-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--rule);
    padding-bottom: .4rem;
    margin: 2.5rem 0 1.25rem;
}
.section-heading:first-child { margin-top: 0; }

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

.hero-article {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.75rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule-light);
    margin-bottom: .5rem;
}
.hero-article img { border: 1px solid var(--rule-light); }
.hero-placeholder-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--paper-alt);
    border: 1px solid var(--rule-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    color: var(--rule-light);
    font-size: 2.5rem;
}
.hero-article .kicker {
    font-family: var(--font-meta);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .78rem;
    color: var(--accent);
    margin-bottom: .3rem;
}
.hero-article h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .5rem; line-height: 1.15; }
.hero-article p.excerpt { color: var(--ink-light); }

/* --- On this day --- */

.on-this-day-list { list-style: none; margin: 0; padding: 0; }
.on-this-day-list li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px dotted var(--rule-light);
}
.on-this-day-thumb-link { flex-shrink: 0; }
.on-this-day-list img,
.on-this-day-noimg {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border: 1px solid var(--rule-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: .8rem;
    color: var(--rule-light);
    background: var(--paper-alt);
}
.on-this-day-list .year { font-family: var(--font-meta); color: var(--accent); font-weight: 700; margin-right: .25rem; flex-shrink: 0; }

/* --- Article grid (listing) --- */

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.article-card { border-bottom: 1px solid var(--rule-light); padding-bottom: 1rem; }
.article-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--rule-light); margin-bottom: .6rem; }
.article-card .dateline { font-family: var(--font-meta); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-light); }
.article-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin: .3rem 0; line-height: 1.2; }
.article-card p { color: var(--ink-light); font-size: .92rem; margin: 0; }
.article-card.no-image .placeholder-thumb {
    width: 100%; aspect-ratio: 4/3; margin-bottom: .6rem;
    background: var(--paper-alt); border: 1px solid var(--rule-light);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); color: var(--rule-light); font-size: 2rem;
}

/* --- Decade nav --- */

.decade-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.decade-nav a {
    font-family: var(--font-meta);
    border: 1px solid var(--rule);
    padding: .3rem .8rem;
    font-size: .85rem;
    border-radius: 2px;
}
.decade-nav a.active { background: var(--ink); color: var(--paper); }
.decade-nav a:hover { text-decoration: none; background: var(--rule-light); }

/* --- Single article page --- */

.article-page-header { max-width: 760px; margin: 0 auto 1.5rem; text-align: center; }
.article-page-header .kicker { font-family: var(--font-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-size: .85rem; }
.article-page-header h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: .4rem 0; }
.article-page-header .byline { font-family: var(--font-meta); color: var(--ink-light); font-size: .9rem; }

.article-page-cover { max-width: 900px; margin: 0 auto 2rem; }
.article-page-cover img { width: 100%; border: 1px solid var(--rule-light); }
.article-page-cover figcaption { font-family: var(--font-meta); font-size: .8rem; color: var(--ink-light); margin-top: .4rem; text-align: center; }

.article-body { max-width: 700px; margin: 0 auto; font-size: 1.08rem; }
.article-body p { margin: 0 0 1.1rem; }
.article-body p:first-of-type:first-letter {
    font-family: var(--font-display);
    font-size: 3.4rem;
    float: left;
    line-height: .8;
    padding: .1rem .12rem 0 0;
    color: var(--accent);
    font-weight: 800;
}
.article-meta-box {
    max-width: 700px; margin: 1.75rem auto 0;
    border-top: 1px solid var(--rule-light);
    padding-top: 1rem;
    font-size: .92rem;
    color: var(--ink-light);
}
.article-meta-box strong { color: var(--ink); }

.article-gallery { max-width: 900px; margin: 2rem auto 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.article-gallery img { border: 1px solid var(--rule-light); aspect-ratio: 1; object-fit: cover; cursor: pointer; }

.article-video { max-width: 700px; margin: 2rem auto 0; }
.article-video .video-wrap { position: relative; padding-top: 56.25%; border: 1px solid var(--rule-light); }
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- Forrige/neste-navigasjon på artikkelside --- */

.article-prevnext {
    max-width: 700px;
    margin: 2.5rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.article-prevnext a { display: flex; flex-direction: column; gap: .2rem; }
.article-prevnext a.disabled { color: var(--rule-light); pointer-events: none; }
.article-prevnext .dir { font-family: var(--font-meta); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.article-prevnext a.disabled .dir { color: var(--rule-light); }
.article-prevnext .title { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }

@media (max-width: 480px) {
    .article-prevnext .title { font-size: .88rem; }
}

/* --- Innebygd artistkort (shortcode) --- */

.artist-embed {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.25rem;
    margin: 1.75rem 0;
    padding: 1.25rem;
    background: var(--paper-alt);
    border: 1px solid var(--rule-light);
    border-left: 3px solid var(--accent);
}
.artist-embed-main { width: 100%; border: 1px solid var(--rule-light); }
.artist-embed-kicker { font-family: var(--font-meta); text-transform: uppercase; letter-spacing: .07em; font-size: .72rem; color: var(--accent); margin: 0; }
.artist-embed-body h3 { font-family: var(--font-display); margin: .1rem 0 .5rem; font-size: 1.3rem; }
.artist-embed-body p { font-size: .95rem; }
.artist-embed-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .5rem; margin-top: .75rem; }
.artist-embed-gallery img { aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule-light); }

@media (max-width: 560px) {
    .artist-embed { grid-template-columns: 1fr; }
}

/* --- Artistoversikt --- */

.artist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.artist-card-item { text-align: center; }
.artist-card-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule-light); margin-bottom: .5rem; }
.artist-card-item .placeholder-thumb { aspect-ratio: 1; margin-bottom: .5rem; }
.artist-card-item h3 { font-family: var(--font-display); font-size: 1rem; margin: 0; }

.artist-page-header { max-width: 760px; margin: 0 auto 1.5rem; text-align: center; }
.artist-page-header h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.6rem); margin: .3rem 0; }

@media (max-width: 800px) {
    .artist-grid { grid-template-columns: repeat(2, 1fr); }
}

.draft-preview-banner {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    padding: .6rem 1rem;
    background: #fef4e6;
    border: 1px solid #e8c88a;
    color: #7a5a1a;
    font-family: var(--font-meta);
    font-size: .85rem;
    text-align: center;
}

/* --- Static page --- */

.static-page { max-width: 700px; margin: 0 auto; }
.static-page h1 { font-family: var(--font-display); font-size: 2.2rem; }
.static-page img { margin-bottom: 1.5rem; border: 1px solid var(--rule-light); }

/* --- Search --- */

.search-form { max-width: 500px; margin: 0 auto 2rem; display: flex; gap: .5rem; }
.search-form input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-family: var(--font-body); border-radius: 3px; }
.search-form button { padding: .6rem 1.1rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 3px; cursor: pointer; font-family: var(--font-meta); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; }

/* --- Pagination --- */

.pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; justify-content: center; }
.pagination a, .pagination span {
    font-family: var(--font-meta); font-size: .85rem;
    border: 1px solid var(--rule-light); padding: .3rem .65rem; border-radius: 2px;
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --- Full arrangementsliste --- */

.full-list-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.full-list-table tr { border-bottom: 1px dotted var(--rule-light); }
.full-list-thumb { width: 56px; padding: .4rem .6rem .4rem 0; }
.full-list-thumb img { width: 50px; height: 38px; object-fit: cover; border: 1px solid var(--rule-light); }
.full-list-noimg {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 38px; background: var(--paper-alt); border: 1px solid var(--rule-light);
    font-family: var(--font-display); font-size: .75rem; color: var(--rule-light);
}
.full-list-date { font-family: var(--font-meta); font-size: .82rem; color: var(--ink-light); white-space: nowrap; padding: .4rem .8rem .4rem 0; }
.full-list-title { padding: .4rem 0; font-size: .96rem; }

@media (max-width: 560px) {
    .full-list-date { display: none; }
}

/* --- Lightbox (bildegalleri-popup) --- */

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, .92);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.open { display: flex; }

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 88vh;
}
.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border: 2px solid rgba(255,255,255,.15);
    background: #000;
}
.lightbox-counter {
    color: #e8e2d4;
    font-family: var(--font-meta);
    font-size: .85rem;
    margin-top: .75rem;
    letter-spacing: .04em;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    padding: .25rem .5rem;
}
.lightbox-close:hover { color: var(--accent); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 600px) {
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.3rem; }
    .lightbox-prev { left: .4rem; }
    .lightbox-next { right: .4rem; }
    .lightbox-close { top: .5rem; right: .75rem; font-size: 1.8rem; }
}

/* --- Footer --- */

.site-footer {
    border-top: 4px double var(--rule);
    margin-top: 3rem;
    padding: 1.5rem 0 2.5rem;
    text-align: center;
    font-family: var(--font-meta);
    font-size: .82rem;
    color: var(--ink-light);
}
.site-footer a { color: var(--ink-light); }

.empty-state { text-align: center; color: var(--ink-light); padding: 3rem 0; font-family: var(--font-meta); }

/* --- Responsive --- */

@media (max-width: 800px) {
    .hero-article { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .dateline-bar .container { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
    .article-grid { grid-template-columns: 1fr; }
    .site-nav a { padding: .5rem .6rem; font-size: .75rem; }
    body.site-body { font-size: 16px; }
}
