/* ========================================
   Chefsrapporten — holmberg & friends
   Design: light, editorial, The Economist
   meets Scandinavian intelligence
   ======================================== */

:root {
  --bg: #fafaf8;
  --bg-surface: #ffffff;
  --bg-sidebar: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --accent: #FF9F46;
  --accent-hover: #e88a2e;
  --border: #e8e8e4;
  --font-headline: 'Crimson Pro', Georgia, serif;
  --font-body: Helvetica, Arial, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ── Landing page ─────────────────────── */

.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing-header {
  padding: 2rem 3rem;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.landing-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
}

.landing-content {
  max-width: 680px;
  width: 100%;
}

.landing-content h1 {
  font-family: var(--font-headline);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

/* ── Signup form ──────────────────────── */

.signup-form {
  margin-bottom: 3rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
}

.form-row input[type="email"] {
  flex: 1;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-row input[type="email"]::placeholder {
  color: #999;
}

.form-row input[type="email"]:focus {
  border-color: var(--accent);
}

.form-row button {
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.form-row button:hover {
  background: var(--accent-hover);
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #999;
}

/* ── Landing stats ────────────────────── */

.landing-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 160px;
  line-height: 1.4;
}

.landing-footer {
  padding: 2rem 3rem;
  font-size: 0.8rem;
  color: #999;
}

/* ── Report layout ────────────────────── */

.report-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ── Report header ────────────────────── */

.report-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.report-header .logo {
  font-size: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.lang-toggle button {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-toggle button.active {
  background: var(--accent);
  color: var(--bg);
}

.btn-download {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-download:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ── Sidebar ──────────────────────────── */

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav li a {
  display: block;
  padding: 0.9rem 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar nav li a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.sidebar nav li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(255, 159, 70, 0.05);
}

.sidebar nav li a .chapter-num {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
  opacity: 0.6;
}

/* ── Report content ───────────────────── */

.report-content {
  padding: 3rem 4rem 6rem;
  max-width: 820px;
}

.chapter {
  display: none;
  animation: fadeIn 0.3s ease;
}

.chapter.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chapter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.chapter h2 {
  font-family: var(--font-headline);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.chapter h3 {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.chapter p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

blockquote {
  border-left: 4px solid #FF9F46;
  padding: 1.25rem 1.75rem;
  margin: 2.5rem 0;
  font-family: 'Crimson Pro', serif;
  font-size: 1.35rem;
  color: #222;
  background: #fafaf5;
  line-height: 1.5;
}

blockquote small {
  display: block;
  font-family: Helvetica, sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  font-style: normal;
}

.chapter blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
}

.chapter .data-highlight {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  background: var(--bg-surface);
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.data-highlight .big-number {
  font-family: var(--font-headline);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.data-highlight .big-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Charts ───────────────────────────── */

.chart-container {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-surface);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-container h4 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.chart-container canvas {
  max-height: 320px;
}

.chart-source {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #999;
}

/* ── Share tooltip ────────────────────── */

.share-tooltip {
  position: absolute;
  display: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.share-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent);
}

/* ── Chapter lead ─────────────────────── */

.chapter-lead {
  font-size: 1.3rem;
  color: #555;
  font-style: italic;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  border-left: 3px solid #FF9F46;
  padding-left: 1.2rem;
}

/* ── Fact callout ─────────────────────── */

.fact-callout {
  background: #fff8f0;
  border-left: 5px solid #FF9F46;
  padding: 2rem 2rem 1.5rem;
  margin: 2.5rem 0;
}

.fact-number {
  display: block;
  font-family: 'Crimson Pro', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #FF9F46;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.fact-source {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fact-callout p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* ── Question blocks (Kap 5) ─────────── */

.question-block {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem 0;
  border-bottom: 1px solid #e8e8e4;
}

.question-number {
  font-family: 'Crimson Pro', serif;
  font-size: 3rem;
  color: #FF9F46;
  line-height: 1;
  min-width: 3.5rem;
  font-weight: 700;
}

.question-block p {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  line-height: 1.7;
}

.question-context {
  font-size: 0.9rem !important;
  color: #777;
  font-style: italic;
}

/* ── CTA block ────────────────────────── */

.cta-block {
  background: #fff8f0;
  border: 2px solid #FF9F46;
  padding: 3rem;
  margin-top: 4rem;
  text-align: center;
}

.cta-block h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cta-block p {
  max-width: 600px;
  margin: 0 auto 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
}

.cta-button {
  display: inline-block;
  background: #FF9F46;
  color: #ffffff;
  padding: 1rem 2.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.5rem;
  letter-spacing: 0.02em;
}

.cta-button:hover {
  background: #e8893a;
  color: #ffffff;
}

/* ── Placeholder content ──────────────── */

.placeholder-note {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin: 2rem 0;
}

/* ── Print stylesheet ─────────────────── */

@media print {
  .report-header,
  .sidebar,
  .share-tooltip,
  .btn-download,
  .lang-toggle {
    display: none !important;
  }

  .report-layout {
    display: block;
  }

  .report-content {
    padding: 0;
    max-width: 100%;
  }

  .chapter {
    display: block !important;
    page-break-before: always;
  }

  .chapter:first-child {
    page-break-before: avoid;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .chapter h2 {
    color: #111;
  }

  .chapter h3 {
    color: #111;
  }

  .chapter blockquote {
    border-left-color: #333;
    background: #f5f5f5;
  }

  .chart-container {
    background: #f9f9f9;
    border-color: #ddd;
  }

  .data-highlight {
    background: #f9f9f9;
    border-color: #ddd;
  }

  .data-highlight .big-number {
    color: #111;
  }
}

/* ── Responsive ───────────────────────── */

@media (max-width: 900px) {
  .report-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 150;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .report-content {
    padding: 2rem 1.5rem 4rem;
  }

  .menu-toggle {
    display: block;
  }
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem;
}

@media (max-width: 600px) {
  .landing-content h1 {
    font-size: 2rem;
  }

  .form-row {
    flex-direction: column;
  }

  .landing-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .landing-main {
    padding: 2rem 1.5rem;
  }

  .landing-header {
    padding: 1.5rem 1.5rem;
  }
}
