/*
Theme Name: Remilurud 2026
Theme URI: https://www.remilurud.no/
Description: ORM-optimalisert child-theme med topic cluster-struktur. Lavmælt redaktørestetikk, lys/mørk modus, mobile-first.
Author: Remi André Lurud
Version: 1.0.0
Template: generatepress
Text Domain: remilurud-2026
*/

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-elev: #fafaf9;
  --bg-muted: #f4f4f2;
  --ink: #15171a;
  --ink-soft: #4a4d52;
  --ink-muted: #767a82;
  --line: #e5e5e3;
  --accent: #1f3d2f;            /* dyp grønn — én aksent, ikke gradient */
  --accent-hover: #2a4f3f;
  --link: var(--accent);
  --max-w: 72rem;
  --max-w-prose: 42rem;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
  --font-serif: "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --step--1: clamp(0.83rem, 0.78rem + 0.25vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.18rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 0.8vw, 2rem);
  --step-3: clamp(2.1rem, 1.7rem + 1.6vw, 3rem);
  --step-4: clamp(2.7rem, 2.1rem + 2.5vw, 4.2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1012;
    --bg-elev: #15181b;
    --bg-muted: #1d2125;
    --ink: #f0f0ee;
    --ink-soft: #c5c8cc;
    --ink-muted: #8a8e94;
    --line: #2a2e33;
    --accent: #6fa88a;
    --accent-hover: #8cbfa3;
    --link: var(--accent);
    --shadow: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  }
}

[data-theme="light"] {
  --bg: #ffffff; --bg-elev: #fafaf9; --bg-muted: #f4f4f2;
  --ink: #15171a; --ink-soft: #4a4d52; --ink-muted: #767a82;
  --line: #e5e5e3; --accent: #1f3d2f; --accent-hover: #2a4f3f; --link: var(--accent);
  --shadow: 0 1px 2px rgba(0,0,0,0.04); --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --bg: #0e1012; --bg-elev: #15181b; --bg-muted: #1d2125;
  --ink: #f0f0ee; --ink-soft: #c5c8cc; --ink-muted: #8a8e94;
  --line: #2a2e33; --accent: #6fa88a; --accent-hover: #8cbfa3; --link: var(--accent);
  --shadow: 0 1px 2px rgba(0,0,0,0.4); --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

/* ─── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ─── Layout primitives ──────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: var(--max-w-prose); }
.prose p, .prose ul, .prose ol { font-size: var(--step-0); line-height: 1.7; color: var(--ink-soft); }
.prose h2 { margin-top: 2.5em; }
.prose a { color: var(--link); }

/* ─── Header / Nav ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 0; gap: 2rem;
}
.brand {
  font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600;
  text-decoration: none; color: var(--ink); letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.nav-primary { display: none; gap: 1.75rem; align-items: center; }
.nav-primary a {
  font-size: var(--step--1); font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms, border-color 160ms;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav-primary a:hover, .nav-primary a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.theme-toggle, .menu-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
  transition: border-color 160ms, color 160ms;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: inline-flex; }
@media (min-width: 880px) {
  .nav-primary { display: flex; }
  .menu-toggle { display: none; }
}

/* Mobile drawer */
.nav-drawer {
  position: fixed; inset: 0; background: var(--bg); z-index: 60;
  display: flex; flex-direction: column; padding: 1.25rem;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform 320ms ease, opacity 200ms ease;
}
.nav-drawer.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-drawer__close { align-self: flex-end; }
.nav-drawer ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.nav-drawer a {
  display: block; font-size: var(--step-2); font-family: var(--font-serif);
  color: var(--ink); text-decoration: none; padding: 1rem 0;
  border-bottom: 1px solid var(--line); min-height: 44px;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero__eyebrow {
  font-size: var(--step--1); font-weight: 500; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 1rem;
}
.hero__name { font-size: var(--step-4); margin: 0 0 0.5rem; line-height: 1.05; }
.hero__lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 38rem; margin: 0 0 2rem; line-height: 1.5; font-family: var(--font-serif); font-weight: 400; }
.hero__cta-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2.5rem; }
@media (min-width: 720px) { .hero__cta-grid { grid-template-columns: repeat(3, 1fr); } }
.hero__cta {
  display: block; padding: 1.5rem 1.25rem; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: border-color 200ms, transform 200ms;
  min-height: 44px;
}
.hero__cta:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero__cta strong { display: block; font-family: var(--font-serif); font-size: var(--step-1); margin-bottom: 0.25rem; }
.hero__cta span { font-size: var(--step--1); color: var(--ink-muted); }

/* ─── Sections ───────────────────────────────────────────────── */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section--alt { background: var(--bg-elev); }
.section__eyebrow {
  font-size: var(--step--1); color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem;
}
.section__title { margin: 0 0 1.5rem; }

/* Card grid */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; text-decoration: none;
  color: var(--ink); display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 200ms, transform 200ms;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__kicker { font-size: var(--step--1); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.card__title { font-family: var(--font-serif); font-size: var(--step-1); margin: 0; line-height: 1.3; }
.card__desc { color: var(--ink-soft); font-size: var(--step--1); }

/* ─── Author byline component ────────────────────────────────── */
.byline {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 2rem 0;
}
.byline__avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0;
}
.byline__meta { display: flex; flex-direction: column; gap: 0.125rem; }
.byline__name { font-weight: 600; color: var(--ink); text-decoration: none; }
.byline__name:hover { color: var(--accent); text-decoration: underline; }
.byline__date { font-size: var(--step--1); color: var(--ink-muted); }

/* ─── Hobby bio-box ──────────────────────────────────────────── */
.bio-box {
  margin: 3rem 0 0; padding: 1.5rem; background: var(--bg-muted);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.bio-box p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.6; }
.bio-box a { color: var(--ink); font-weight: 500; }

/* ─── Related articles ───────────────────────────────────────── */
.related {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.related h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .related ul { grid-template-columns: repeat(2, 1fr); } }
.related a {
  display: block; padding: 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color 200ms;
}
.related a:hover { border-color: var(--accent); }
.related a strong { display: block; margin-bottom: 0.25rem; font-family: var(--font-serif); }
.related a span { font-size: var(--step--1); color: var(--ink-muted); }

/* ─── Breadcrumbs ────────────────────────────────────────────── */
.breadcrumbs {
  font-size: var(--step--1); color: var(--ink-muted);
  margin: 1rem 0 1.5rem;
}
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs span[aria-current] { color: var(--ink); }
.breadcrumbs li { display: inline; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: inline; }
.breadcrumbs li + li::before { content: " / "; padding: 0 0.5rem; color: var(--ink-muted); }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem; padding: 3rem 0 2rem;
  border-top: 1px solid var(--line); background: var(--bg-elev);
}
.site-footer__grid {
  display: grid; gap: 2rem; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin: 0 0 0.75rem; font-family: var(--font-sans); font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer__legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-muted); }

/* ─── Speakable ──────────────────────────────────────────────── */
.speakable-summary, .speakable-definition, .speakable-answer { /* no visual change, just markup hint */ }

/* ─── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
