/* Lokaltinget — publikumssite
 * Prioriteter: læsbarhed, hastighed, ingen gimmicks.
 * Ingen JS påkrævet for basis-funktion.
 */

:root {
    --bg:        #fafaf9;
    --surface:   #ffffff;
    --border:    #e7e5e4;
    --text:      #1c1917;
    --text-muted:#78716c;
    --primary:   #0f766e;
    --primary-fg:#ffffff;
    --accent:    #dc2626;
    --radius:    4px;
    --maxw:      72rem;
    --serif:     "Georgia", "Times New Roman", serif;
    --sans:      -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--sans); font-size: 16px; line-height: 1.6;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.2rem; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.6rem; margin: 1.4em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1em 0 0.3em; }

.muted { color: var(--text-muted); font-size: 0.92em; }
.meta { color: var(--text-muted); font-size: 0.88em; margin: 0 0 0.3em; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

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

/* ---------- Site header ---------- */
.site-header {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px 0; position: sticky; top: 0; z-index: 10;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header .logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--text);
}
.site-header .logo:hover { text-decoration: none; }
.site-header .logo .mark { color: var(--primary); }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: var(--text-muted); font-weight: 500; }
.site-header nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    padding: 64px 0 48px;
    background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.8rem; max-width: 40rem; }
.hero .lead { max-width: 36rem; }

/* ---------- Area grid ---------- */
.areas-grid { padding: 48px 20px; }
.areas-grid .grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    margin-top: 24px;
}
.area-card {
    background: var(--surface); padding: 24px 20px;
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); transition: border-color 0.15s, transform 0.15s;
}
.area-card:hover {
    border-color: var(--primary); transform: translateY(-2px); text-decoration: none;
}
.area-card h3 { margin: 0 0 4px; }
.area-card .meta { margin: 0; }

/* ---------- Story grids ---------- */
.story-grid {
    display: grid; gap: 28px; margin-top: 24px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.story-card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); transition: border-color 0.15s;
}
.story-card:hover { border-color: var(--primary); }
.story-card img { width: 100%; height: 180px; object-fit: cover; }
.story-card__body { padding: 20px; }
.story-card h3 { margin: 4px 0 8px; font-size: 1.15rem; }
.story-card h3 a { color: var(--text); }
.story-card p { margin: 0; color: var(--text-muted); }

.story-card--wide {
    display: grid; grid-template-columns: 200px 1fr; gap: 20px;
    padding: 0; margin-bottom: 20px;
}
.story-card--wide img { height: 100%; min-height: 120px; }
.story-card--wide h2 { font-size: 1.4rem; margin: 4px 0 8px; }
.story-card--wide h2 a { color: var(--text); }
@media (max-width: 640px) {
    .story-card--wide { grid-template-columns: 1fr; }
    .story-card--wide img { height: 180px; }
}

/* ---------- Area page ---------- */
.area-hero { padding: 48px 0; border-bottom: 1px solid var(--border); }
.area-hero h1 { font-size: 2.6rem; margin: 0 0 8px; }
.signup-inline {
    display: flex; gap: 8px; margin-top: 20px; max-width: 480px;
}
.signup-inline input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: inherit; }
.category-nav {
    display: flex; gap: 4px; padding: 16px 20px; overflow-x: auto;
    border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.category-nav a {
    padding: 6px 12px; color: var(--text-muted); white-space: nowrap;
    border-radius: 9999px; font-size: 0.9rem;
}
.category-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }

.story-list { padding: 24px 20px; }

/* ---------- Article page ---------- */
.article-header { padding: 48px 20px 24px; max-width: 44rem; }
.article-header h1 { font-size: 2.4rem; margin: 0 0 0.4em; }
.article-header .subtitle { font-size: 1.3rem; color: var(--text-muted); font-family: var(--serif); }
.hero-image { max-width: 56rem; margin: 0 auto 24px; padding: 0 20px; }
.hero-image img { width: 100%; border-radius: var(--radius); }
.hero-image figcaption { padding: 8px 4px 0; font-size: 0.85rem; }
.article-body {
    max-width: 40rem; padding: 0 20px; font-family: var(--serif); font-size: 1.15rem;
    line-height: 1.7;
}
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { margin-top: 1.5em; font-size: 1.5rem; }
.article-body a { border-bottom: 1px solid currentColor; }
.article-sources {
    max-width: 44rem; padding: 32px 20px; margin-top: 48px;
    background: var(--surface); border-top: 1px solid var(--border);
}
.article-sources h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-family: var(--sans); }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.source-list li:last-child { border-bottom: none; }

.ai-tag {
    display: inline-block; font-size: 0.75rem; padding: 2px 8px;
    background: #fef3c7; color: #92400e; border-radius: 9999px;
    font-family: var(--sans); margin-left: 4px;
}

.related {
    max-width: 44rem; padding: 32px 20px 64px; margin-top: 24px;
}
.related ul { list-style: none; padding: 0; }
.related li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.related li a { font-weight: 500; color: var(--text); }

/* ---------- Signup / tilmeld ---------- */
.signup { padding: 64px 20px; text-align: center; }
.signup-page { padding-bottom: 64px; }
.signup-form, .signup-success { max-width: 480px; margin: 48px auto; }
.signup-form form { background: var(--surface); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 24px; }
.signup-form label { display: block; margin-bottom: 16px; font-weight: 500; font-size: 0.95rem; }
.signup-form input[type="email"], .signup-form input[type="text"] {
    display: block; width: 100%; padding: 10px 14px; margin-top: 4px;
    border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
}
.signup-form .checkbox {
    display: block; font-weight: normal; margin: 6px 0;
}
.signup-form fieldset { border: 1px solid var(--border); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.signup-form legend { padding: 0 6px; font-weight: 500; }
.signup-form .required { color: var(--accent); }
.signup-form .small { font-size: 0.85rem; margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 10px 20px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font-family: inherit; font-size: 1rem; font-weight: 500; cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: #0d5f58; border-color: #0d5f58; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--border); }
.alert-error   { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border); background: var(--surface);
    margin-top: 64px; padding: 48px 0 24px;
}
.footer-cols {
    display: grid; gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 32px;
}
.site-footer h4 { margin: 0 0 12px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text-muted); }
.copyright { text-align: center; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.85rem; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 120px 20px; }
.error-page h1 { font-size: 6rem; color: var(--text-muted); margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    h1 { font-size: 1.8rem !important; }
    .hero h1 { font-size: 2rem; }
    .article-header h1 { font-size: 1.9rem; }
    .article-body { font-size: 1.05rem; }
    .site-header nav a:not(.btn) { display: none; }
    .signup-inline { flex-direction: column; }
}
