/* anna.lindenfors.se
   Formgivning 27 november 2026: vit botten, ljusblå fält, mörkblå text. Ett typsnitt, Libre Franklin.
   Mörkblått används bara lokalt, i kontaktfältet och på knappen.
   Rubriken står i vänsterspalten och innehållet till höger. */

@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/libre-franklin-latin.woff2") format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/libre-franklin-latin-italic.woff2") format("woff2"); }

:root {
  --paper: #ffffff;
  --sky: #e3eefb;
  --sky-line: #c3d6ee;
  --wash: #f4f7fb;
  --ink: #14213a;
  --text: #222c40;
  --muted: #56627a;
  --line: #d8dfe9;
  --link: #0d4aa5;
  --link-dark: #08326f;
  --navy: #12305e;
  --on-navy: #dbe6f6;
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --read: 40rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* Sidhuvud */
.site-header { background: var(--paper); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 2rem; padding-block: 1.15rem; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.6rem; font-size: 1rem; }
.nav a { color: var(--ink); text-decoration: none; padding-block: 0.2rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--sky-line); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; }
.nav .lang { color: var(--muted); }

/* Startsidans överdel */
.hero { background: var(--sky); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: clamp(2rem, 6vw, 5rem); align-items: end; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-text { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.role { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; color: var(--ink); line-height: 1.3; margin: 0.6rem 0 1.5rem; }
.hero-text p { font-size: 1.125rem; max-width: 33em; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; align-items: center; margin-top: 1.75rem; }
.button { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; padding: 0.7rem 1.4rem; border-radius: 3px; }
.button:hover { background: var(--link-dark); color: #fff; }
.portrait { margin: 0; align-self: end; }
.portrait img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 20%; }
.portrait figcaption { font-size: 0.8rem; color: var(--muted); padding-block: 0.4rem 0.6rem; text-align: right; }

/* Avsnitt: rubrik till vänster, innehåll till höger */
.section { padding-block: clamp(2.5rem, 5.5vw, 4rem); }
.section + .section { border-top: 1px solid var(--line); }
.hero + .section, .page-head + .section { border-top: 0; }
.section.wash { background: var(--wash); border-top: 0; }
.section.wash + .section { border-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.25rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split-head .note { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0; }
.prose { max-width: var(--read); }
.prose p + h3 { margin-top: 1.5rem; }
.intro { max-width: var(--read); color: var(--muted); }
.more { margin-top: 1.5rem; font-weight: 600; }

.prose + .pairs { margin-top: 2.5rem; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.pairs h3 { margin-bottom: 0.35rem; }
.pairs p { margin: 0; }
.pairs a { font-weight: 700; }
.thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 2.5rem); }
.thirds h3 { margin-bottom: 0.35rem; }

/* Rader med årtal */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.1rem 1.5rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; padding-top: 0.12rem; }
.timeline .what > * { max-width: 42rem; }
.timeline .what strong { display: block; color: var(--ink); }
.timeline .what span { display: block; color: var(--muted); font-size: 0.98rem; }
.timeline .what p { margin: 0.3rem 0 0; font-size: 0.98rem; }
.wash .timeline > li { border-color: var(--sky-line); }

/* Undersidor */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem); background: var(--sky); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); }
.page-head .lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); line-height: 1.5; max-width: 36em; margin: 1rem 0 0; color: var(--text); }
.page-head.has-figure { padding-bottom: 0; }
.page-head.has-figure .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.page-head.has-figure .ph-text { padding-bottom: clamp(2rem, 4vw, 3rem); }
.ph-figure { margin: 0; }
.ph-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ph-figure figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); padding-block: 0.5rem 0.9rem; }
.ph-figure figcaption a { color: inherit; text-decoration: none; }
.ph-figure figcaption a:hover, .ph-figure figcaption a:focus-visible { text-decoration: underline; }

.jump { border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; padding-block: 0.9rem; font-size: 0.98rem; }
[id] { scroll-margin-top: 1.5rem; }

/* Texter och media */
.coauthors { margin-top: 0.5rem; font-size: 0.92rem; color: var(--muted); }
.timeline .coauthors .co-label { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.coauthors ul { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.coauthors li { break-inside: avoid; padding-block: 0.05rem; line-height: 1.4; }
.timeline .what .coauthors ul { max-width: none; }
details.coauthors summary { cursor: pointer; color: var(--link); }
details.coauthors summary:hover { text-decoration: underline; }
details.coauthors ul { margin-top: 0.5rem; }
details.archive > summary { cursor: pointer; color: var(--link); font-weight: 600; padding-block: 0.2rem; }
details.archive > summary:hover { text-decoration: underline; }
details.archive h3 { margin: 2.25rem 0 0.4rem; }
details.archive h3:first-of-type { margin-top: 1.5rem; }
details.archive .note { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.75rem; }

/* Rapporter med omslag */
.reports { display: grid; grid-template-columns: repeat(2, minmax(0, 15rem)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.report { display: block; text-decoration: none; color: var(--text); }
.report img { width: 100%; height: auto; aspect-ratio: 480 / 678; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(20, 33, 58, 0.12); }
.report .r-title { display: block; margin-top: 0.75rem; font-weight: 700; line-height: 1.35; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.report:hover .r-title { color: var(--link-dark); text-decoration-thickness: 2px; }
.report .r-meta { display: block; margin-top: 0.2rem; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 600px) { .reports { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }

/* Kontakt */
.contact-band { background: var(--navy); color: var(--on-navy); padding-block: clamp(2.5rem, 5.5vw, 4rem); }
.contact-band h2 { color: #fff; }
.contact-band a { color: #fff; }
.contact-band a:hover { color: #fff; }
.contact-band :focus-visible { outline-color: #fff; }
.contact-band .email { font-size: clamp(1.3rem, 3.2vw, 2rem); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; margin-top: 1.25rem; }
.contact-band p { max-width: var(--read); }
.contact-list { list-style: none; padding: 0; margin: 0; max-width: 38rem; }
.contact-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .label { color: var(--muted); }
.meta-note { color: var(--muted); font-size: 0.95rem; }

/* Sidfot */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem 2.25rem; font-size: 0.92rem; color: var(--muted); }
.contact-band + .site-footer, main:has(> .contact-band:last-child) + .site-footer { border-top: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--link-dark); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* Endast i förhandsversionen */
.preview-bar { background: var(--wash); color: var(--muted); border-bottom: 1px solid var(--line); font-size: 0.88rem; text-align: center; padding-block: 0.4rem; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

@media (max-width: 860px) {
  .hero .wrap, .page-head.has-figure .wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding-bottom: 0; }
  .portrait { max-width: 20rem; }
  .page-head.has-figure .ph-text { padding-bottom: 0; }
  .ph-figure { max-width: 26rem; }
  .thirds { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .site-header .wrap { flex-direction: column; gap: 0.4rem; }
  .nav { gap: 0.2rem 1.15rem; }
  .pairs { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .timeline > li, .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 0.05rem; }
}

@media print {
  .nav, .jump, .skip, .preview-bar, .site-footer .links, .hero-links { display: none !important; }
  body { font-size: 10.5pt; }
  .hero, .page-head, .contact-band, .section.wash { background: none; }
  .contact-band, .contact-band h2, .contact-band a { color: #000; }
  .section { padding-block: 5mm; }
  a { color: inherit; text-decoration: none; }
}
