/*
Theme Name: Klimahjulet
Theme URI: https://klimahjulet.dk
Author: Redaktionen, Klimahjulet
Description: Hurtigt og tilgængeligt tema udviklet til Klimahjulet.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: fjordmedia
Tags: blog, custom-logo, editor-style, featured-images, post-thumbnails, threaded-comments
*/

/* ═══════════════════════════════════════════════════════════════════
   JOURNAL — redaktionel base.
   Designprincip: et magasin adskiller indhold med LINJER og LUFT,
   ikke med kasser og skygger. Ingen border-radius på indholdskort,
   ingen box-shadow i flowet. Accentfarven bruges sparsomt — kickers,
   links og hårlinjer — så den føles redaktionel og ikke som en knap.
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  /* Papir og blæk — varm off-white frem for rent hvidt giver trykfølelse */
  --paper:    #fffdf9;
  --paper2:   #f7f4ee;
  --ink:      #15140f;
  --ink2:     #33302a;
  --muted:    #6f6a60;
  --muted2:   #9a948a;
  --rule:     #e0dbd1;
  --rule2:    #cfc8bb;
  --accent: #f72585;   /* patches pr. site */
  --accent-ink: #0d2f9e;

  /* 'Sora' erstattes pr. site af deploy → display-fladen varierer.
     Brødtekst i system-serif: ingen webfont at vente på, og det er
     hvad rigtige magasiner sætter løbende tekst i. */
  --display:  'Sora', 'Iowan Old Style', Georgia, serif;
  --serif:    'Iowan Old Style', 'Charter', 'Georgia', 'Times New Roman', serif;
  --ui:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max:      1180px;
  --measure:  680px;
  --gap:      clamp(1.5rem, 3vw, 2.75rem);
}

html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.4em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Fælles: lille versal-etiket. Magasinets vigtigste typografiske greb. */
.kicker, .grid-section-label, .card-tag, .widget-title, .nav-highlight,
.topic-badge, .related-heading {
  font-family: var(--ui);
  font-size: .688rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ── Masthead ──────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--ink); background: var(--paper); }

.header-strip {
  border-bottom: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.header-strip .wrap {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 34px; gap: 1rem;
}
.masthead-date { white-space: nowrap; }
.masthead-tag { color: var(--muted2); }

.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 2rem) 0 clamp(.9rem, 2vw, 1.4rem);
  max-width: var(--max); margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem); padding-right: clamp(1rem, 4vw, 2.5rem);
}

.site-logo { grid-column: 2; display: flex; align-items: center; gap: .5rem; justify-self: center; }
.logo-glyph { display: none; }          /* magasinet bærer ordmærke, ikke ikon */
.logo-label {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.9rem);
  letter-spacing: -.03em;
  line-height: 1;
  text-align: center;
}
.logo-label span { color: var(--accent); }

.header-slot { display: flex; align-items: center; gap: 1rem; font-family: var(--ui); }
.header-slot.left  { grid-column: 1; }
.header-slot.right { grid-column: 3; justify-content: flex-end; }
.header-slot a { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.header-slot a:hover { color: var(--accent); }

/* Sektionsnavigation — hårlinje over og under, centreret */
.main-nav { border-top: 1px solid var(--rule); }
.main-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  max-width: var(--max); margin: 0 auto;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
}
.main-nav a {
  font-family: var(--ui); font-size: .75rem; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; color: var(--ink2);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-highlight a { color: var(--accent); }

.menu-btn {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .4rem; gap: 4px; flex-direction: column;
}
.menu-btn span { display: block; width: 20px; height: 1.5px; background: var(--ink); }

/* ── Forside: lead + skinne ────────────────────────────────────── */
.lead { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--gap);
}
.feature-main .lead-figure { margin-bottom: 1.25rem; overflow: hidden; }
.feature-main .lead-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  margin: .4rem 0 .7rem;
}
.hero-title a:hover { color: var(--accent); }
.cover-dek {
  font-family: var(--serif); font-size: 1.14rem; line-height: 1.55;
  color: var(--ink2); max-width: 54ch;
}

/* Skinnen: sekundære historier adskilt af hårlinjer */
.side-rail { border-left: 1px solid var(--rule); padding-left: var(--gap); }
.rail-item { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.rail-item:first-child { padding-top: 0; }
.rail-item:last-child { border-bottom: 0; padding-bottom: 0; }
.side-title {
  font-family: var(--display); font-size: 1.06rem; font-weight: 700;
  line-height: 1.25; letter-spacing: -.015em; margin-top: .3rem;
}
.side-title a:hover { color: var(--accent); }

.card-tag, .topic-badge { color: var(--accent); display: inline-block; }

.article-card-meta, .rail-byline, .entry-meta {
  font-family: var(--ui); font-size: .72rem; color: var(--muted);
  letter-spacing: .04em;
}
.byline-sep { margin: 0 .45rem; color: var(--rule2); }

/* ── Sektioner og kortgitter ───────────────────────────────────── */
.grid-section { padding: clamp(2rem, 4vw, 3rem) 0; border-top: 1px solid var(--ink); }
.grid-section + .grid-section { border-top: 1px solid var(--rule); }

.grid-section-label {
  display: flex; align-items: center; gap: 1rem;
  color: var(--ink); margin-bottom: 1.6rem;
}
.grid-section-label::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.feed-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
}

.story-card { display: flex; flex-direction: column; }
.post-tile-media { overflow: hidden; margin-bottom: .85rem; background: var(--paper2); }
.post-tile-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.6,.2,1);
}
.story-card:hover .post-tile-media img { transform: scale(1.035); }
.post-card-body { display: flex; flex-direction: column; gap: .4rem; }
.post-tile-title {
  font-family: var(--display); font-size: 1.16rem; font-weight: 700;
  line-height: 1.24; letter-spacing: -.018em;
}
.post-tile-title a:hover { color: var(--accent); }
.post-card-excerpt {
  font-family: var(--serif); font-size: .94rem; line-height: 1.5; color: var(--muted);
}

/* ── Arkiv / sidehoved ─────────────────────────────────────────── */
.page-header { padding: clamp(2.2rem, 5vw, 3.5rem) 0 1.6rem; border-bottom: 1px solid var(--ink); }
.page-header h1 {
  font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
}
.page-header p { font-family: var(--serif); color: var(--muted); margin-top: .6rem; max-width: 60ch; }

/* ── Artikel ───────────────────────────────────────────────────── */
.story-head { padding: clamp(2rem, 5vw, 3.25rem) 0 0; }
.story-head .wrap { max-width: calc(var(--measure) + 6rem); }
.article-headline {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -.032em;
  margin: .5rem 0 .8rem;
}
.post-standfirst {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.55;
  color: var(--ink2); margin-bottom: 1.4rem;
}

.entry-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: .55rem;
  padding: .9rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.author-pill { display: inline-flex; align-items: center; gap: .55rem; }
.author-img, .avatar-initials { border-radius: 50%; flex: none; }
.byline-name { font-weight: 600; color: var(--ink); }

.article-media { margin: clamp(1.5rem, 3vw, 2.25rem) 0; }
.article-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-media figcaption {
  font-family: var(--ui); font-size: .74rem; color: var(--muted2);
  padding-top: .5rem; border-bottom: 1px solid var(--rule); padding-bottom: .7rem;
}

.article-body { max-width: var(--measure); margin: 0 auto; padding: 0 0 clamp(2rem, 5vw, 3rem); }
.article-body > * { margin-bottom: 1.15rem; }
.article-body p {
  font-family: var(--serif); font-size: 1.11rem; line-height: 1.72; color: var(--ink2);
}
.article-body h2 {
  font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700; letter-spacing: -.022em; line-height: 1.2;
  margin: 2.2rem 0 .7rem; padding-top: .9rem; border-top: 1px solid var(--rule);
}
.article-body h3 {
  font-family: var(--display); font-size: 1.24rem; font-weight: 700;
  letter-spacing: -.015em; margin: 1.7rem 0 .5rem;
}
.article-body a { color: var(--accent); border-bottom: 1px solid rgba(0,0,0,.16); }
.article-body a:hover { border-bottom-color: currentColor; }
.article-body ul, .article-body ol { font-family: var(--serif); font-size: 1.08rem; line-height: 1.68; color: var(--ink2); }
.article-body li { margin-bottom: .45rem; }
.article-body blockquote {
  border-left: 2px solid var(--accent); padding: .2rem 0 .2rem 1.3rem;
  margin: 1.8rem 0; font-family: var(--display); font-size: 1.3rem;
  line-height: 1.4; letter-spacing: -.02em; color: var(--ink);
}
.article-body img { margin: 1.6rem 0; }
.article-body table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .95rem; }
.article-body th, .article-body td { padding: .65rem .8rem; border-bottom: 1px solid var(--rule); text-align: left; }
.article-body th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Faktaboks / opsummering */
.article-body .takeaways, .takeaways {
  background: var(--paper2); border-top: 2px solid var(--ink);
  padding: 1.3rem 1.4rem; margin: 1.9rem 0;
}
.takeaways h3 { margin-top: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--ui); }

.author-bio {
  display: flex; gap: 1.1rem; align-items: flex-start;
  border-top: 1px solid var(--ink); padding: 1.4rem 0;
  max-width: var(--measure); margin: 0 auto;
}
.author-bio p { font-family: var(--serif); font-size: .96rem; color: var(--muted); margin-top: .3rem; }

/* ── Relaterede ────────────────────────────────────────────────── */
.you-may-like { border-top: 1px solid var(--ink); padding: clamp(2rem, 4vw, 2.8rem) 0; }
.related-heading { display: block; margin-bottom: 1.3rem; }
.read-next-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar-widget { margin-bottom: 2rem; }
.widget-title { display: block; padding-bottom: .5rem; border-bottom: 1px solid var(--ink); margin-bottom: .8rem; }
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget li { padding: .45rem 0; border-bottom: 1px solid var(--rule); font-size: .93rem; }
.sidebar-widget a:hover { color: var(--accent); }

/* ── Nyhedsbrev ────────────────────────────────────────────────── */
.nl-widget {
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: clamp(1.6rem, 3vw, 2.4rem) 0; margin: 0;
}
.nl-widget h3 { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; }
.nl-widget p { font-family: var(--serif); color: var(--muted); margin: .45rem 0 1rem; max-width: 46ch; }
.nl-form { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 430px; }
.nl-form input {
  flex: 1 1 200px; padding: .7rem .85rem; font: inherit; font-size: .93rem;
  border: 1px solid var(--rule2); background: var(--paper); color: var(--ink);
}
.nl-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.nl-form button {
  padding: .7rem 1.15rem; font-family: var(--ui); font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
}
.nl-form button:hover { background: var(--accent); border-color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--ink); margin-top: clamp(2rem, 5vw, 4rem); padding: clamp(2rem, 4vw, 3rem) 0 1.5rem; }
.footer-layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr)); }
.brand-col .logo-label { font-size: 1.5rem; text-align: left; }
.brand-col p { font-family: var(--serif); color: var(--muted); font-size: .93rem; margin-top: .5rem; max-width: 40ch; }
.foot-col h4 { font-family: var(--ui); font-size: .688rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .7rem; }
.foot-col ul { list-style: none; padding: 0; }
.foot-col li { margin-bottom: .4rem; font-size: .9rem; }
.foot-col a { color: var(--muted); }
.foot-col a:hover { color: var(--accent); }
.footer-end {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  font-family: var(--ui); font-size: .76rem; color: var(--muted2);
}

/* ── Cookie ────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  background: var(--ink); color: var(--paper);
  transform: translateY(100%); transition: transform .35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.gdpr-inner {
  max-width: var(--max); margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--ui); font-size: .85rem;
}
.gdpr-inner p { flex: 1 1 260px; }
.consent-actions { display: flex; gap: .5rem; }
.accept-cookies, .cookie-essential {
  padding: .5rem .95rem; font-family: var(--ui); font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border: 1px solid var(--paper);
}
.accept-cookies { background: var(--paper); color: var(--ink); }
.cookie-essential { background: transparent; color: var(--paper); }

/* ── Paginering ────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 2rem 0; font-family: var(--ui); }
.pagination .page-numbers {
  padding: .45rem .75rem; border: 1px solid var(--rule2); font-size: .85rem;
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Responsivt ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .top-grid { grid-template-columns: 1fr; }
  .side-rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
}
@media (max-width: 700px) {
  html { font-size: 16px; }
  .header-row { grid-template-columns: auto 1fr auto; padding-top: .9rem; }
  .site-logo { grid-column: 2; }
  .header-slot.left { grid-column: 1; }
  .header-slot.right { grid-column: 3; }
  .header-slot a { display: none; }
  .menu-btn { display: flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: .1rem; }
  .main-nav li { width: 100%; border-bottom: 1px solid var(--rule); }
  .main-nav a { display: block; padding: .7rem 0; }
  .footer-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-layout { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .cookie-banner, .nl-widget, .you-may-like { display: none; }
}

/* Stack: fuldbredde hero med overlejret titel, derefter to spalter. */
.topper-hero { position: relative; border-bottom: 1px solid var(--ink); }
.topper-hero.has-img .banner-media img { width: 100%; height: clamp(320px, 52vh, 560px); object-fit: cover; }
.topper-hero.has-img .splash-body {
  position: absolute; inset: auto 0 0 0; color: #fff;
  background: linear-gradient(to top, rgba(8,8,10,.86) 12%, rgba(8,8,10,.45) 55%, transparent);
  padding: clamp(2rem,6vw,4.5rem) 0 clamp(1.2rem,3vw,2.2rem);
}
.topper-hero.has-img .card-tag { color: #fff; opacity: .92; }
.topper-hero.has-img .article-card-meta { color: rgba(255,255,255,.82); }
.topper-hero:not(.has-img) .splash-body { padding: clamp(2rem,5vw,3.5rem) 0; }
.stack-title { font-family: var(--display); font-size: clamp(2rem,5vw,3.6rem); font-weight: 800; line-height: 1.03; letter-spacing: -.035em; margin: .4rem 0 .6rem; max-width: 20ch; }
.stack-title a { color: inherit; }
.stack-dek { font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; max-width: 52ch; opacity: .95; }
.twin-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.pair-item { display: grid; grid-template-columns: 128px 1fr; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.pair-thumb img { width: 128px; height: 96px; object-fit: cover; }
@media (max-width: 560px) { .pair-item { grid-template-columns: 92px 1fr; } .pair-thumb img { width: 92px; height: 74px; } }

/* Artikel med fuldbredde hero og overlejret titel. */
.lede-head { position: relative; border-bottom: 1px solid var(--ink); }
.lede-head.has-img .topper-head-img img { width: 100%; height: clamp(340px, 58vh, 620px); object-fit: cover; }
.lede-head.has-img .masthead-body {
  position: absolute; inset: auto 0 0 0; color: #fff;
  background: linear-gradient(to top, rgba(8,8,10,.88) 15%, rgba(8,8,10,.4) 60%, transparent);
  padding: clamp(2.5rem,7vw,5rem) 0 clamp(1.4rem,3vw,2.4rem);
}
.lede-head.has-img .article-headline { color: #fff; max-width: 20ch; }
.lede-head.has-img .entry-meta { border-color: rgba(255,255,255,.28); color: rgba(255,255,255,.88); }
.lede-head.has-img .byline-name { color: #fff; }
.lede-head.has-img .topic-badge { color: #fff; opacity: .95; }
.lede-head:not(.has-img) .masthead-body { padding: clamp(2rem,5vw,3.2rem) 0 0; }
.cover-dek { max-width: var(--measure); margin: clamp(1.4rem,3vw,2rem) auto .4rem; font-size: 1.24rem; }
.read-hero .article-body { padding-top: .4rem; }

/* SKIN: Dark Masthead — mørkt hovede, resten lyst. Stærkt brandudtryk. */
:root { --paper: #fffefc; --rule: #e6e1d8; }
.site-header { background: var(--ink); border-bottom: 0; }
.header-strip { border-bottom-color: rgba(255,255,255,.16); color: rgba(255,255,255,.62); }
.masthead-tag { color: rgba(255,255,255,.45); }
.logo-label { color: var(--paper); }
.header-slot a { color: rgba(255,255,255,.66); }
.header-slot a:hover { color: #fff; }
.menu-btn span { background: var(--paper); }
.main-nav { border-top-color: rgba(255,255,255,.16); background: var(--ink); }
.main-nav a { color: rgba(255,255,255,.85); }
.main-nav a:hover { color: #fff; border-bottom-color: #fff; }
.grid-section { border-top-color: var(--rule2); }

/* LOGO: underline-accent */
.site-logo { position:relative; padding-bottom:4px; }
.site-logo::after { content:''; position:absolute; bottom:-4px; left:0; right:0; height:3px; background:var(--accent); border-radius:2px; }
