/* ============================================
   Fornuftpartiet / Pragmatikerne — Style Sheet
   Based on Style Guide v1.0
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Primary */
  --primary: #1B4332;
  --primary-light: #2D6A4F;
  --primary-lighter: #40916C;

  /* Secondary */
  --sand: #D4A373;
  --sand-light: #E9DCC9;

  /* Neutrals */
  --coal: #2B2D2E;
  --warm-gray: #6B7280;
  --light-gray: #F3F4F6;
  --white: #FFFFFF;

  /* Accent — amber (complement to sand) */
  --amber: #92400E;
  --amber-light: #FEF3C7;
  --amber-border: #FDE68A;

  /* Accent — blue (complement to primary green) */
  --accent-blue: #1E40AF;
  --accent-blue-light: #EFF6FF;
  --accent-blue-border: #BFDBFE;

  /* Alert / cost */
  --alert: #9B2C2C;
  --alert-light: #FEF2F2;
  --alert-bar: #F87171;

  /* Success / income */
  --success-bar: #34D399;

  /* Typography */
  --font: Verdana, Arial, Helvetica, sans-serif;
  --line-height: 1.6;
  --line-height-heading: 1.25;
}

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

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--coal);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: var(--line-height-heading);
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background-color: var(--light-gray);
}

.section--sand {
  background-color: var(--sand-light);
}

.section--dark {
  background-color: var(--primary);
  color: var(--white);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--dark a {
  color: var(--sand);
}

/* --- Header / Navigation --- */
.site-header {
  background: var(--primary);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo:hover {
  color: var(--sand);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--sand);
  color: var(--sand);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.3);
}

.lang-switch a {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border-bottom: none;
}

.lang-switch a:hover,
.lang-switch a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
  border-bottom: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: brightness(0.7);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  font-size: 2.75rem;
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-content .lead {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* --- Red Thread Arrow --- */
.red-thread {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.25rem;
  padding: 1.5rem 1rem;
  margin: 0 auto;
  max-width: 900px;
}

.red-thread .step {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.red-thread .arrow {
  font-size: 1.25rem;
  opacity: 0.7;
}

.red-thread--dark .step {
  background: rgba(27, 67, 50, 0.08);
  border-color: var(--primary-lighter);
  color: var(--primary);
}

.red-thread--dark .arrow {
  color: var(--primary-lighter);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
  min-width: 44px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--sand);
  color: var(--primary);
}

.btn--primary:hover {
  background: #c4924f;
  color: var(--primary);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.btn--green {
  background: var(--primary);
  color: var(--white);
}

.btn--green:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* --- Cards / Values --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid var(--primary-lighter);
  transition: box-shadow 0.2s;
}

.value-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.9375rem;
  color: var(--warm-gray);
  margin-bottom: 0;
}

/* --- Chapter list / Program --- */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.chapter-card {
  display: block;
  background: var(--white);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--coal);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chapter-card:hover {
  border-bottom-color: var(--primary-lighter);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-decoration: none;
}

.chapter-card .num {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.chapter-card h3 {
  display: inline;
  vertical-align: middle;
  font-size: 1.05rem;
}

.chapter-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--warm-gray);
  margin-bottom: 0;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding: 2rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sand-light);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 3px solid var(--sand);
  border-radius: 50%;
}

.timeline-item .phase-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-lighter);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.timeline-item p {
  font-size: 0.9375rem;
  color: var(--warm-gray);
  margin-bottom: 0;
}

/* --- Image blocks --- */
.image-band {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.image-card {
  border-radius: 8px;
  overflow: hidden;
}

.image-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* --- Program detail page --- */
.program-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.program-content h2 {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--sand-light);
}

.program-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.program-content h3 {
  margin-top: 1.5rem;
}

.program-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
  list-style: disc;
}

.program-content ul li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.program-content blockquote {
  border-left: 4px solid var(--sand);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--sand-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--primary);
}

.program-content em {
  color: var(--warm-gray);
}

/* Program sidebar nav */
.program-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.program-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
}

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

.program-sidebar li {
  margin-bottom: 0.25rem;
}

.program-sidebar a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--warm-gray);
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.program-sidebar a:hover,
.program-sidebar a.active {
  color: var(--primary);
  background: var(--light-gray);
  border-left-color: var(--primary-lighter);
  text-decoration: none;
}

/* --- Footer --- */
.site-footer {
  background: var(--coal);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: rgba(255,255,255,0.7);
}

.site-footer a:hover {
  color: var(--sand);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* --- CTA band --- */
.cta-band {
  text-align: center;
  padding: 3rem 1.5rem;
}

.cta-band h2 {
  margin-bottom: 1rem;
}

.cta-band .btn {
  margin: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  .hero-content h1 { font-size: 2rem; }
  .hero { min-height: 60vh; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
  }

  .nav-toggle {
    display: block;
  }

  .program-layout {
    grid-template-columns: 1fr;
  }

  .program-sidebar {
    position: static;
    max-height: none;
  }

  .red-thread {
    flex-direction: column;
    align-items: center;
  }

  .red-thread .arrow {
    transform: rotate(90deg);
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .image-band {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .hero-content h1 { font-size: 1.5rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  .hero { min-height: auto; padding: 2rem 0; }
  .section { padding: 1rem 0; }
  body { font-size: 11pt; }
}

/* --- Budget notes in timeline --- */
.budget-note {
  font-size: 0.85rem;
  color: var(--warm-gray);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--light-gray);
}

/* --- Policy Grid (3x3 on homepage) --- */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.policy-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-top: 4px solid var(--primary-lighter);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--coal);
}

.policy-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.policy-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.policy-card p {
  font-size: 0.9rem;
  color: var(--warm-gray);
  margin-bottom: 0;
  flex-grow: 1;
}

.policy-card .policy-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
}

@media (max-width: 900px) {
  .policy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .policy-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
