/* ============================================================
   ourvoice.no — editorial design system
   Signature: "the spectrum voiceline" (pride gradient, used with restraint)
   Display: Bricolage Grotesque · Body: Newsreader
   Theme: warm ivory paper + plum-aubergine ink + rose accent
   ============================================================ */

:root {
  /* light (default) */
  --paper:      #FDF7F2;
  --paper-2:    #F7ECE3;
  --paper-3:    #F0E1D6;
  --ink:        #2A1A2E;
  --ink-soft:   #5B4858;
  --muted:      #8C7884;
  --accent:     #D81E5B;
  --accent-ink: #B0144A;
  --border:     rgba(42, 26, 46, 0.12);
  --border-2:   rgba(42, 26, 46, 0.18);
  --shadow:     0 1px 2px rgba(42,26,46,.05), 0 8px 24px rgba(42,26,46,.06);
  --shadow-lg:  0 2px 6px rgba(42,26,46,.06), 0 20px 50px rgba(42,26,46,.12);

  /* the spectrum — softened pride, the brand signature */
  --spectrum: linear-gradient(90deg,
      #E5484D 0%, #F2A65A 22%, #EBC75B 40%,
      #4FA87F 60%, #4C86C6 80%, #8A5FB0 100%);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;

  --measure: 64ch;
  --wrap: 1140px;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  color-scheme: light;
}

[data-theme="dark"] {
  --paper:      #1A1220;
  --paper-2:    #241830;
  --paper-3:    #2E2039;
  --ink:        #F3E8E1;
  --ink-soft:   #CBB7C4;
  --muted:      #9A8593;
  --accent:     #FF6C97;
  --accent-ink: #FF93B4;
  --border:     rgba(243, 232, 225, 0.13);
  --border-2:   rgba(243, 232, 225, 0.20);
  --shadow:     0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg:  0 2px 6px rgba(0,0,0,.35), 0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

::selection { background: rgba(216,30,91,.18); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

/* ---------- the spectrum voiceline ---------- */
.voiceline {
  height: 4px;
  border: 0;
  border-radius: 4px;
  background: var(--spectrum);
  margin: 0;
}
.voiceline--thin { height: 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex; flex-direction: column; line-height: 1; gap: 4px;
}
.brand:hover { color: var(--ink); }
.brand .brand-mark { display: inline-block; }
.brand .brand-mark b { color: var(--accent); font-weight: 800; }
.brand .brand-rule {
  display: block; height: 3px; width: 100%; border-radius: 3px;
  background: var(--spectrum);
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--spectrum); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .nav-ext { color: var(--muted); }

/* theme toggle */
.theme-btn {
  border: 1px solid var(--border-2);
  background: var(--paper-2);
  color: var(--ink);
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; font-size: 1rem; line-height: 1;
  display: grid; place-items: center;
  transition: border-color .2s, transform .2s;
}
.theme-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 16ch;
}
.hero .lede {
  margin: 1.5rem 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero .hero-voiceline {
  width: 132px; margin: 2rem 0 0;
}

/* ---------- section heads ---------- */
.section { padding: clamp(2rem,4vw,3rem) 0; }
.section-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 0 0 2rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em;
  margin: 0; color: var(--ink);
}
.section-head .rule { flex: 1; height: 1px; background: var(--border-2); }
.section-head .count { font-family: var(--font-display); font-size: .9rem; color: var(--muted); }

/* ---------- featured article ---------- */
.featured {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 1rem;
}
.featured::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  background: var(--spectrum); border-radius: 5px;
}
.featured .feat-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.featured .feat-media img { width: 100%; aspect-ratio: 16/11; object-fit: cover; }
.featured .feat-body { }
.card-meta {
  font-family: var(--font-display); font-size: .8rem; letter-spacing: .04em;
  color: var(--muted); display: flex; gap: .6rem; align-items: center; margin-bottom: .9rem;
}
.topic {
  font-family: var(--font-display); font-weight: 600; font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 3px 9px; border-radius: 100px;
}
.featured h3 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.025em;
  margin: 0 0 .8rem;
}
.featured h3 a { color: var(--ink); }
.featured h3 a:hover { color: var(--accent); }
.featured p { margin: 0 0 1.3rem; color: var(--ink-soft); font-size: 1.18rem; }

.readmore {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  color: var(--accent); display: inline-flex; align-items: center; gap: .4rem;
}
.readmore .arrow { transition: transform .25s ease; }
.readmore:hover .arrow { transform: translateX(4px); }

/* ---------- article grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
}
.entry {
  display: flex; flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.entry:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.entry .entry-media { aspect-ratio: 16/10; overflow: hidden; background: var(--paper-3); }
.entry .entry-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.entry:hover .entry-media img { transform: scale(1.04); }
.entry .entry-body { padding: 1.25rem 1.3rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.entry h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.28rem;
  line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 .6rem;
}
.entry h3 a { color: var(--ink); }
.entry h3 a:hover { color: var(--accent); }
.entry p { margin: 0 0 1.1rem; font-size: 1rem; color: var(--ink-soft); line-height: 1.55; }
.entry .entry-foot { margin-top: auto; }

/* ---------- article page ---------- */
.article { padding: clamp(1.5rem, 4vw, 3rem) 0 1rem; }
.article-head { max-width: var(--measure); margin: 0 auto clamp(1.5rem,4vw,2.5rem); }
.back {
  font-family: var(--font-display); font-weight: 500; font-size: .9rem;
  color: var(--muted); display: inline-flex; gap: .4rem; margin-bottom: 1.6rem;
}
.back:hover { color: var(--accent); }
.article-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -0.03em;
  margin: .6rem 0 0;
}
.byline {
  display: flex; align-items: center; gap: .6rem; margin-top: 1.3rem;
  font-family: var(--font-display); font-size: .92rem; color: var(--muted);
}
.byline .author { color: var(--ink); font-weight: 600; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

.article-hero {
  max-width: var(--wrap); margin: 0 auto clamp(2rem,5vw,3rem);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.article-hero img { width: 100%; max-height: 540px; object-fit: cover; }

/* the readable column */
.prose { max-width: var(--measure); margin-inline: auto; }
.prose > p { margin: 0 0 1.5rem; }
.article .prose > p:first-child::first-letter {
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4em; line-height: .8; float: left;
  padding: .05em .12em 0 0; color: var(--accent);
}
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose h2, .prose h3 {
  font-family: var(--font-display); letter-spacing: -0.02em; color: var(--ink);
  margin: 2.5rem 0 .9rem; line-height: 1.2;
}
.prose h2 { font-size: 1.7rem; font-weight: 700; }
.prose h3 { font-size: 1.32rem; font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.prose figure { margin: 2rem 0; text-align: center; }
.prose figure img { border-radius: var(--radius); margin-inline: auto; box-shadow: var(--shadow); }
.prose figcaption { font-family: var(--font-display); font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.prose hr { border: 0; height: 2px; background: var(--spectrum); border-radius: 2px; max-width: 80px; margin: 2.5rem auto; }
.prose blockquote {
  margin: 2rem 0; padding: .4rem 0 .4rem 1.4rem;
  border-left: 4px solid; border-image: var(--spectrum) 1;
  font-style: italic; color: var(--ink-soft);
}

/* end-of-article footer */
.article-end {
  max-width: var(--measure); margin: 3rem auto 0; padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.article-end .share { font-family: var(--font-display); font-size: .95rem; color: var(--muted); }
.btn {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: 100px; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }

/* ---------- simple page (about / contact) ---------- */
.page { padding: clamp(2rem,5vw,3.5rem) 0; }
.page .prose h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.06;
  margin: 0 0 .4rem;
}
.page .prose .voiceline { width: 110px; margin: 1.2rem 0 2rem; }

/* contact card */
.contact-card {
  max-width: var(--measure); margin: 2rem auto 0;
  background: var(--paper-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}
.contact-card .big-mail {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem,3vw,1.9rem);
  letter-spacing: -0.02em; color: var(--ink); display: inline-block; margin: .5rem 0 1.5rem;
}
.contact-card .big-mail:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); }
.site-footer .voiceline { width: 100%; border-radius: 0; }
.site-footer .foot-inner {
  padding: 2.5rem 0 3rem; display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: flex-start; justify-content: space-between;
}
.site-footer .foot-brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -0.02em; color: var(--ink); margin: 0 0 .4rem;
}
.site-footer .foot-brand b { color: var(--accent); }
.site-footer .foot-tag { color: var(--muted); margin: 0; max-width: 36ch; font-size: 1rem; }
.site-footer .foot-links { display: flex; flex-direction: column; gap: .5rem; font-family: var(--font-display); font-size: .95rem; }
.site-footer .foot-links a { color: var(--ink-soft); }
.site-footer .foot-links a:hover { color: var(--accent); }
.site-footer .foot-meta { font-family: var(--font-display); font-size: .82rem; color: var(--muted); width: 100%; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured .feat-media { order: -1; }
}
@media (max-width: 620px) {
  body { font-size: 1.06rem; }
  .grid { grid-template-columns: 1fr; }
  .nav { gap: 1rem; }
  .nav .nav-hideable { display: none; }
  .site-header .wrap { gap: .75rem; }
}

/* ---------- a11y ---------- */
a:focus-visible, .btn:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .entry:hover { transform: none; }
}
.skip-link {
  position: absolute; left: -999px; top: .5rem;
  background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100;
  font-family: var(--font-display);
}
.skip-link:focus { left: .5rem; color: #fff; }
