/* ============================================================
   Tjernobylkatastrofen.se — gemensam stilmall
   Dokumentär, pedagogisk, mörk men läsbar design.
   ============================================================ */

/* --- Reset & bas --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  /* Bakgrunder — betong/grafit, varm svart */
  --bg:        #14130f;
  --bg-2:      #1b1a14;
  --surface:   #201e17;
  --surface-2: #27241b;
  --raised:    #2f2b20;
  --border:    #3a352a;
  --border-2:  #4a443590;

  /* Text */
  --text:      #ece7d8;
  --text-soft: #c6c0ad;
  --text-mut:  #968f7c;

  /* Accenter — varningsskylt, rost, militärgrönt */
  --yellow:    #d8a73f;   /* dämpad varningsgul */
  --yellow-d:  #b88a2a;
  --rust:      #c06a3e;   /* rost */
  --green:     #7c8a55;   /* militärgrönt */
  --red:       #c45741;   /* fara/notis */
  --blue:      #6f93a8;   /* Sverige/info */

  --maxw: 1140px;
  --radius: 4px;
  --radius-lg: 8px;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtil betong-textur via gradient */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(216,167,63,.05), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(124,138,85,.05), transparent 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout --- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

/* --- Typografi --- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: .6em; }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); margin-bottom: .35em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-soft); line-height: 1.6; }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--yellow); font-weight: 600;
}

/* --- Skip link --- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--yellow); color: #14130f; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ============================================================
   Header / navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20,19,15,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background:
    conic-gradient(from 45deg, var(--yellow) 0 25%, #14130f 0 50%, var(--yellow) 0 75%, #14130f 0 100%);
  border: 2px solid var(--yellow);
  box-shadow: 0 0 0 2px #14130f inset;
}
.brand small { display:block; font-family: var(--mono); font-size:.6rem; letter-spacing:.12em; color: var(--text-mut); font-weight:500; text-transform: uppercase; }

.menu { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > button {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .8rem; color: var(--text-soft); font-size: .95rem; font-weight: 500;
  background: none; border: 0; font-family: inherit; cursor: pointer; border-radius: var(--radius);
}
.menu > li > a:hover, .menu > li > button:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.menu > li.current > a { color: var(--yellow); }
.menu .caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity:.7; transition: transform .2s; }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: .4rem; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .16s ease;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown:hover .caret, .dropdown:focus-within .caret { transform: rotate(-135deg) translateY(2px); }
.dropdown-menu a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius);
  color: var(--text-soft); font-size: .92rem;
}
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* hamburger */
.burger {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer;
  padding: .5rem; border-radius: var(--radius);
}
.burger span { width: 24px; height: 2px; background: var(--text); transition: .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .burger { display: flex; }
  .menu {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: .5rem 1rem 1.25rem; max-height: calc(100vh - 64px); overflow-y: auto;
    transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .menu.open { transform: translateY(0); }
  .menu > li > a, .menu > li > button { width: 100%; justify-content: space-between; padding: .8rem .4rem; font-size: 1.05rem; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--border-2); border-radius: 0; margin: 0 0 .4rem .4rem;
    max-height: 0; overflow: hidden; padding: 0 0 0 .6rem; transition: max-height .25s ease;
  }
  .dropdown-menu.open { max-height: 600px; }
  .dropdown:hover .dropdown-menu:not(.open) { opacity:0; visibility:hidden; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(20,19,15,.55), rgba(20,19,15,.92)),
    repeating-linear-gradient(135deg, #1c1b14 0 22px, #19180f 22px 44px);
}
.hero::before {
  /* varningstejp-kant upptill */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 18px, #14130f 18px 36px);
}
.hero .wrap { padding-block: clamp(3rem, 9vw, 6.5rem); position: relative; }
.hero h1 { max-width: 18ch; }
.hero .lead { max-width: 62ch; margin-top: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* --- Knappar --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: var(--radius); font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--yellow); color: #1a1709; }
.btn-primary:hover { background: var(--yellow-d); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-mut); }

/* ============================================================
   Snabbfakta
   ============================================================ */
.factstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.factstrip .cell { background: var(--surface); padding: 1.1rem 1.2rem; }
.factstrip dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); margin-bottom: .35rem; }
.factstrip dd { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.factstrip dd small { display:block; font-family: var(--sans); font-size:.78rem; font-weight:500; color: var(--text-mut); margin-top: .15rem; }

/* ============================================================
   Kort / grid
   ============================================================ */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem;
  transition: .18s; position: relative;
}
a.card:hover { border-color: var(--yellow-d); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.card .kicker { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); margin-bottom: .5rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-soft); font-size: .96rem; }
.card .more { margin-top: auto; padding-top: .9rem; color: var(--yellow); font-weight: 600; font-size: .9rem; display:inline-flex; gap:.35rem; align-items:center; }
a.card:hover .more { gap: .6rem; }

/* ============================================================
   Innehållssidor — typografisk artikel
   ============================================================ */
.layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1000px) { .layout.has-aside { grid-template-columns: minmax(0,1fr) 280px; } }

.article > * + * { margin-top: 1.15rem; }
.article h2 { margin-top: 2.4rem; padding-top: .2rem; }
.article h2:first-of-type { margin-top: 1rem; }
.article h3 { margin-top: 1.6rem; }
.article ul, .article ol { padding-left: 1.3rem; color: var(--text-soft); }
.article li + li { margin-top: .4rem; }
.article p { color: var(--text-soft); }
.article strong { color: var(--text); }
.article hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }

/* breadcrumb */
.crumbs { font-size: .82rem; color: var(--text-mut); font-family: var(--mono); letter-spacing: .04em; padding-top: 1.5rem; }
.crumbs a { color: var(--text-mut); }
.crumbs a:hover { color: var(--yellow); }
.crumbs span { opacity: .5; margin: 0 .35rem; }

.page-head { border-bottom: 1px solid var(--border); padding-bottom: 1.6rem; margin-bottom: .5rem; }
.page-head .lead { margin-top: .8rem; }

/* ============================================================
   Faktaruta / varning / notis / källor
   ============================================================ */
.box {
  border: 1px solid var(--border); border-left: 4px solid var(--text-mut);
  background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.25rem;
  margin: 1.6rem 0;
}
.box .box-title { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; }
.box p, .box li { color: var(--text-soft); font-size: .96rem; }
.box p + p { margin-top: .6rem; }
.box--fact   { border-left-color: var(--yellow); }
.box--fact .box-title { color: var(--yellow); }
.box--warn   { border-left-color: var(--red); background: linear-gradient(0deg, var(--surface), rgba(196,87,65,.06)); }
.box--warn .box-title { color: var(--red); }
.box--info   { border-left-color: var(--blue); }
.box--info .box-title { color: var(--blue); }
.box--source { border-left-color: var(--green); background: var(--bg-2); }
.box--source .box-title { color: var(--green); }
.box--source ul { padding-left: 1.1rem; margin-top: .3rem; }
.box--source li { font-size: .88rem; }

/* uppskattning-tagg */
.tag { display:inline-block; font-family: var(--mono); font-size:.66rem; letter-spacing:.08em; text-transform:uppercase; padding:.12rem .45rem; border-radius:3px; border:1px solid var(--border-2); color: var(--text-mut); vertical-align: middle; }
.tag--est { color: var(--yellow); border-color: var(--yellow-d); }

/* ============================================================
   Tidslinje
   ============================================================ */
.timeline { position: relative; margin: 1.5rem 0; padding-left: 1.75rem; }
.timeline::before { content:""; position:absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--yellow), var(--border)); }
.tl-item { position: relative; padding-bottom: 1.6rem; }
.tl-item::before { content:""; position:absolute; left: -1.75rem; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--yellow); transform: translateX(0); }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; color: var(--yellow); font-weight: 600; }
.tl-item h3 { margin: .2rem 0 .25rem; font-size: 1.1rem; }
.tl-item p { color: var(--text-soft); font-size: .95rem; }

/* kompakt tidslinje (startsida) */
.tl-mini { display: grid; gap: .8rem; }
.tl-mini .row { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.tl-mini .row:last-child { border-bottom: 0; }
.tl-mini .when { font-family: var(--mono); font-size: .82rem; color: var(--yellow); font-weight: 600; }
.tl-mini .what { color: var(--text-soft); }
@media (max-width: 560px) { .tl-mini .row { grid-template-columns: 1fr; gap: .15rem; } }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: var(--surface); border: 0; cursor: pointer;
  font-family: var(--serif); font-size: 1.08rem; font-weight: 700; color: var(--text);
  padding: 1.05rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q:hover { background: var(--surface-2); }
.faq-q .plus { flex: none; width: 20px; height: 20px; position: relative; }
.faq-q .plus::before, .faq-q .plus::after { content:""; position:absolute; background: var(--yellow); transition: .2s; }
.faq-q .plus::before { left: 0; right: 0; top: 9px; height: 2px; }
.faq-q .plus::after { top: 0; bottom: 0; left: 9px; width: 2px; }
.faq-q[aria-expanded="true"] .plus::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; background: var(--bg-2); }
.faq-a .faq-a-inner { padding: 0 1.2rem 1.15rem; color: var(--text-soft); }
.faq-a p + p { margin-top: .7rem; }

/* ============================================================
   Bildplatshållare
   ============================================================ */
.placeholder {
  position: relative; border: 1px dashed var(--border-2); border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(45deg, var(--surface) 0 12px, var(--bg-2) 12px 24px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 220px; padding: 1.5rem; color: var(--text-mut);
}
.placeholder .ph-inner { max-width: 38ch; }
.placeholder .ph-tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); display:block; margin-bottom:.4rem; }
.placeholder .ph-desc { font-family: var(--mono); font-size: .8rem; color: var(--text-soft); }
.placeholder.wide { min-height: 300px; }
.figure { margin: 1.8rem 0; }
.figure figcaption { font-size: .84rem; color: var(--text-mut); margin-top: .5rem; font-style: italic; }

/* ============================================================
   Definition / ordlista
   ============================================================ */
.glossary { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.glossary .term { background: var(--surface); padding: 1.1rem 1.3rem; }
.glossary dt { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--yellow); }
.glossary dd { color: var(--text-soft); margin-top: .25rem; font-size: .97rem; }

/* jämförelsetabell */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; min-width: 540px; }
table.data th, table.data td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .94rem; }
table.data thead th { background: var(--surface-2); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
table.data tbody th { font-family: var(--serif); color: var(--text); font-weight: 700; }
table.data td { color: var(--text-soft); }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface); }

/* "Läs vidare"-rutnät i botten av artiklar */
.readmore { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.readmore h2 { font-size: 1.3rem; }

/* aside / i denna artikel */
.toc { position: sticky; top: 84px; align-self: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem; }
.toc .box-title { font-family: var(--mono); font-size: .7rem; letter-spacing:.12em; text-transform: uppercase; color: var(--text-mut); margin-bottom: .7rem; }
.toc ul { list-style: none; padding: 0; display: grid; gap: .1rem; }
.toc a { color: var(--text-soft); font-size: .92rem; display: block; padding: .35rem .5rem; border-radius: var(--radius); border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; border-left-color: var(--yellow); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 3rem; }
.site-footer::before { content:""; display:block; height: 4px; background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, #14130f 14px 28px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); margin-bottom: .9rem; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer-grid a { color: var(--text-soft); font-size: .92rem; }
.footer-grid a:hover { color: var(--yellow); }
.footer-about p { color: var(--text-mut); font-size: .9rem; margin-top: .8rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--text-mut); font-size: .82rem; }
.footer-bottom .disclaimer { max-width: 60ch; }

/* utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-mut); }
.divider-label { display:flex; align-items:center; gap:1rem; margin: 2.5rem 0 1.5rem; color: var(--text-mut); font-family: var(--mono); font-size:.72rem; letter-spacing:.14em; text-transform: uppercase; }
.divider-label::before, .divider-label::after { content:""; height:1px; background: var(--border); flex:1; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
