/* =====================================================================
   Republiken pitch, reveal.js-theme
   Brand: bg_brown #26211F, accent_yellow #F8B62B, offwhite #F5EFE6, white
   Fonts: Dr Raymond Display (display), Playfair Display (serif), Inter (sans)
   Format: 16:9 (1280x720)
   ===================================================================== */

@font-face {
  font-family: 'Dr Raymond Display';
  src: url('../assets/fonts/dr-raymond-display.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-brown:     #26211F;
  --accent:       #F8B62B;
  --offwhite:     #F5EFE6;
  --white:        #FFFFFF;
  --display:      'Dr Raymond Display', 'Playfair Display', Georgia, serif;
  --serif:        'Playfair Display', 'Newsreader', Georgia, serif;
  --sans:         'Inter', Arial, sans-serif;
}

/* ---------- Reveal base overrides ---------- */
html, body { background: var(--bg-brown); }

.reveal { font-family: var(--sans); color: var(--white); }
.reveal .slides { text-align: left; }
.reveal .slides section {
  width: 1280px;
  height: 720px;
  padding: 0;
  background: var(--bg-brown);
  box-sizing: border-box;
  overflow: hidden;
}
.reveal h1, .reveal h2, .reveal h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0; text-transform: none; margin: 0; }
.reveal p, .reveal li { line-height: 1.5; margin: 0; }

/* Reveal progress + controls i brand-färger */
.reveal .progress { color: var(--accent); height: 4px; }
.reveal .controls { color: var(--accent); }

/* Alla slides har mörkbrun bakgrund och basal padding */
.slide {
  position: relative;
  background: var(--bg-brown);
  color: var(--white);
}

/* Gemensam kicker (små versaler) */
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--offwhite);
  margin: 0 0 20px 0;
}

/* =====================================================================
   Slide 1: Cover
   Vertikalt centrerat på bg_brown
   ===================================================================== */
.reveal .slides section.slide-cover {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 80px;
}
.slide-cover .cover-inner {
  text-align: center;
  max-width: 1000px;
}
.slide-cover .kicker {
  margin-bottom: 28px;
  text-align: center;
}
.slide-cover .cover-title {
  font-family: var(--display);
  font-size: 92px;
  line-height: 1.0;
  color: var(--accent);
  font-weight: 400;
  margin: 0 0 28px 0;
}
.slide-cover .cover-tagline {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  color: var(--offwhite);
}
.slide-cover .cover-raven {
  position: absolute;
  left: 48px;
  bottom: 40px;
  width: 48px;
  height: auto;
  opacity: 0.9;
}

/* =====================================================================
   Slide 2: Vem vi är + kungar-bilden (foto fyller höger halva)
   ===================================================================== */
.reveal .slides section.slide-intro-kungar {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.slide-intro-kungar .intro-left {
  padding: 96px 64px 64px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.slide-intro-kungar .intro-title {
  font-family: var(--display);
  font-size: 72px;
  line-height: 1;
  color: var(--accent);
  margin: 0 0 24px 0;
}
.slide-intro-kungar .intro-body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--white);
  margin: 0 0 28px 0;
  max-width: 520px;
}
.slide-intro-kungar .intro-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slide-intro-kungar .intro-bullets li {
  position: relative;
  padding-left: 20px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--offwhite);
}
.slide-intro-kungar .intro-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.slide-intro-kungar .intro-right {
  position: relative;
  overflow: hidden;
}
.slide-intro-kungar .intro-right img {
  position: absolute;
  right: -40px;
  bottom: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: right bottom;
}

/* =====================================================================
   Slide 3: Så tänker vi + header-strip + trespalt
   ===================================================================== */
.reveal .slides section.slide-trespalt {
  display: flex !important;
  flex-direction: column;
}
.slide-trespalt .header-strip {
  width: 100%;
  height: 380px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-brown);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-trespalt .header-strip img {
  width: 100%;
  height: auto;
  display: block;
}
.slide-trespalt .trespalt-inner {
  flex: 1;
  padding: 24px 80px 32px 80px;
  display: flex;
  flex-direction: column;
}
.slide-trespalt .section-title {
  font-family: var(--display);
  font-size: 44px;
  line-height: 1.05;
  color: var(--accent);
  margin: 0 0 24px 0;
}
.slide-trespalt .columns-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.slide-trespalt .col-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 14px 0;
  text-transform: none;
}
.slide-trespalt .col-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--white);
}

/* =====================================================================
   Slide 4: Bakgrund och mål (tvåspalt)
   ===================================================================== */
.reveal .slides section.slide-tvaspalt {
  padding: 96px 80px 64px 80px;
  display: flex !important;
  align-items: center;
}
.slide-tvaspalt .tvaspalt-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  width: 100%;
}
.slide-tvaspalt .col-title {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.1;
  color: var(--white);
  margin: 0 0 32px 0;
}
.slide-tvaspalt .col-title.yellow {
  color: var(--accent);
}
.slide-tvaspalt .col-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.slide-tvaspalt .col-bullets li {
  position: relative;
  padding-left: 28px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--white);
}
.slide-tvaspalt .col-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 14px;
  height: 2px;
  background: var(--offwhite);
}
.slide-tvaspalt .col-bullets.yellow-markers li::before {
  background: var(--accent);
}

/* =====================================================================
   Slide 5: Strategi, tre numrerade steg
   ===================================================================== */
.reveal .slides section.slide-steps {
  padding: 96px 80px 64px 80px;
  display: flex !important;
  flex-direction: column;
}
.slide-steps .steps-header {
  margin-bottom: 48px;
}
.slide-steps .section-title {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1.05;
  color: var(--accent);
  margin: 0 0 10px 0;
}
.slide-steps .section-sub {
  font-family: var(--sans);
  font-size: 16px;
  font-style: italic;
  color: var(--offwhite);
}
.slide-steps .steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.slide-steps .step {
  position: relative;
  padding-top: 12px;
}
.slide-steps .step-num {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 96px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}
.slide-steps .step-title {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  color: var(--white);
  margin: 0 0 14px 0;
}
.slide-steps .step-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--offwhite);
  max-width: 320px;
}

/* =====================================================================
   Edit-mode UI
   ===================================================================== */
.edit-toolbar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 1000;
  font-family: var(--sans);
}
.edit-btn {
  background: var(--bg-brown);
  color: var(--offwhite);
  border: 1px solid var(--accent);
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.edit-btn:hover { background: var(--accent); color: var(--bg-brown); }
.edit-btn.primary { background: var(--accent); color: var(--bg-brown); border-color: var(--accent); }
.edit-btn.primary:hover { background: var(--offwhite); }

/* Highlight editable elements när edit mode är på */
body.edit-on [data-token] {
  outline: 1px dashed rgba(248, 182, 43, 0.6);
  outline-offset: 4px;
  cursor: text;
}
body.edit-on [data-token]:hover {
  outline-color: var(--accent);
}
body.edit-on [data-token]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  background: rgba(248, 182, 43, 0.08);
}

/* Export modal */
.export-modal[hidden] {
  display: none !important;
}
.export-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.export-modal-inner {
  background: var(--bg-brown);
  border: 1px solid var(--accent);
  border-radius: 4px;
  width: min(720px, 90vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
}
.export-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--offwhite);
  font-family: var(--sans);
  font-size: 14px;
}
.export-modal textarea {
  flex: 1;
  min-height: 320px;
  background: #1a1614;
  color: var(--offwhite);
  border: 1px solid #3a332f;
  border-radius: 2px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 12px;
  resize: vertical;
}
.export-modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.export-copied {
  color: var(--accent);
  font-size: 12px;
}
