/* ==========================================================================
   marketingfunnel.se — designsystem
   ========================================================================== */

:root {
  /* Bakgrunder */
  --bg-primary: #FCFAED;
  --bg-secondary: #FFFFFF;
  --bg-muted: rgba(36, 33, 54, 0.04);

  /* Text */
  --text-primary: #242136;
  --text-secondary: rgba(36, 33, 54, 0.72);
  --text-tertiary: rgba(36, 33, 54, 0.55);

  /* Borders */
  --border-subtle: rgba(36, 33, 54, 0.08);
  --border-medium: rgba(36, 33, 54, 0.2);

  /* Accent (orange) — används sparsamt */
  --accent: #F37F16;
  --accent-dark: #B85F0F;
  --accent-soft: rgba(243, 127, 22, 0.07);

  /* Meta-tillägget (dämpad lavender) */
  --meta-bg: rgba(83, 74, 183, 0.06);
  --meta-border: rgba(83, 74, 183, 0.4);
  --meta-text: #3C3489;
  --meta-strong: #26215C;

  /* Steg-färger för sökresan */
  --steg-orange: #BA7517;
  --steg-pink: #D4537E;
  --steg-purple: #534AB7;
  --steg-green: #1D9E75;

  /* Konverterings-badges */
  --konv-bg: rgba(29, 158, 117, 0.15);
  --konv-text: #0F6E56;
  --mjuk-bg: rgba(29, 158, 117, 0.08);
  --mjuk-text: rgba(15, 110, 86, 0.75);
  --ingen-bg: rgba(36, 33, 54, 0.06);
  --ingen-text: rgba(36, 33, 54, 0.55);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;

  /* Layout */
  --maxw-text: 680px;
  --maxw-page: 1120px;
}

/* ==========================================================================
   Reset & bas
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

p { margin: 0 0 1rem; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ==========================================================================
   Typografi
   ========================================================================== */

h1, h2, h3 {
  margin: 0 0 0.75rem;
  font-weight: 500;
}

h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sokterm {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.accent { color: var(--accent); }

strong { font-weight: 500; }

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: 0 24px;
}

.text-spalt {
  max-width: var(--maxw-text);
  margin: 0 auto 2.5rem;
}

section {
  padding: 4.5rem 0;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  padding: 1.5rem 0;
  border-bottom: 0.5px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 15px;
  color: var(--text-secondary);
}

.nav-links a:hover { color: var(--text-primary); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 6rem 0 4rem;
}

.hero .eyebrow { margin-bottom: 1.25rem; }

.hero h1 {
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.hero-tes {
  max-width: var(--maxw-text);
  color: var(--text-secondary);
  font-size: 18px;
}

/* ==========================================================================
   Exempel-grid
   ========================================================================== */

.exempel-sektion { padding-top: 2rem; }

.exempel-sektion .eyebrow { margin-bottom: 1.5rem; }

.exempel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.exempel-kort {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: left;
  width: 100%;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.exempel-kort:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.exempel-kort.aktiv {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.exempel-kategori {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 10px;
}

.exempel-namn {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Analys-panel
   ========================================================================== */

.analys-panel {
  padding-top: 0;
  padding-bottom: 0;
  display: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.analys-panel.synlig {
  display: block;
  opacity: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.analys-inner {
  max-width: var(--maxw-page);
  margin: 0 auto;
}

.analys-kategori {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.analys-panel .eyebrow {
  margin-bottom: 0.75rem;
}

.analys-panel h2 {
  margin-bottom: 0;
}

.analys-tes {
  max-width: var(--maxw-text);
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 2.25rem;
}

.sokresa-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Laddnings-state
   ========================================================================== */

.analys-laddar {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  animation: fadeIn 200ms ease;
}

.analys-laddar .eyebrow {
  margin-bottom: 0.75rem;
}

.laddar-text {
  font-size: 22px;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  font-weight: 500;
}

.laddar-dots {
  display: inline-block;
  margin-left: 2px;
}

.laddar-dots span {
  opacity: 0;
  animation: dots-pulse 1.2s infinite;
  color: var(--accent);
  font-weight: 500;
}

.laddar-dots span:nth-child(2) { animation-delay: 0.2s; }
.laddar-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dots-pulse {
  0%, 70%, 100% { opacity: 0; }
  30% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Sökresa-grid
   ========================================================================== */

.steg-rad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.steg-rad.steg-2 { grid-template-columns: repeat(2, 1fr); }
.steg-rad.steg-3 { grid-template-columns: repeat(3, 1fr); }

/* ==========================================================================
   Steg-kort
   ========================================================================== */

.steg {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border-left: 3px solid;
  background: var(--bg-secondary);
  border-top: 0.5px solid var(--border-subtle);
  border-right: 0.5px solid var(--border-subtle);
  border-bottom: 0.5px solid var(--border-subtle);
  opacity: 0;
  animation: slideIn 300ms ease forwards;
}

.steg:nth-child(1) { animation-delay: 0ms; }
.steg:nth-child(2) { animation-delay: 100ms; }
.steg:nth-child(3) { animation-delay: 200ms; }
.steg:nth-child(4) { animation-delay: 300ms; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.steg-fas {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-weight: 500;
}

.steg .sokterm {
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.3;
  display: block;
}

.steg-beskrivning {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
}

.steg-status {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-block;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.status-ingen { background: var(--ingen-bg); color: var(--ingen-text); }
.status-mjuk { background: var(--mjuk-bg); color: var(--mjuk-text); }
.status-konv { background: var(--konv-bg); color: var(--konv-text); }

/* ==========================================================================
   Meta-tillägget
   ========================================================================== */

.meta-tillagg {
  margin-top: 1.25rem;
  padding: 16px 20px;
  background: var(--meta-bg);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--meta-border);
}

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--meta-text);
  font-weight: 500;
  margin-bottom: 8px;
}

.meta-text {
  font-size: 13px;
  color: rgba(60, 52, 137, 0.85);
  line-height: 1.6;
  margin: 0;
}

.meta-text strong {
  font-weight: 500;
  color: var(--meta-strong);
}

.meta-tom {
  margin-top: 1.25rem;
  padding: 14px 20px;
  background: rgba(36, 33, 54, 0.03);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* ==========================================================================
   Insiktsruta
   ========================================================================== */

.insikt {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-top: 2rem;
}

.insikt-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: 8px;
}

.insikt-text {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.insikt-text strong { font-weight: 500; }

/* ==========================================================================
   Pedagogiska text-sektioner
   ========================================================================== */

.pedagogik {
  border-top: 0.5px solid var(--border-subtle);
  display: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.pedagogik.synlig {
  display: block;
  opacity: 1;
}

.pedagogik .text-spalt:last-child { margin-bottom: 0; }

/* ==========================================================================
   Modell-sektion (under pedagogik)
   ========================================================================== */

.modell-sektion {
  max-width: var(--maxw-text);
  margin: 3.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modell-sektion > .text-spalt {
  max-width: none;
  margin: 0 0 0.25rem;
}

.modell-block {
  display: block;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.modell-block:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.modell-block:hover .modell-block-visual {
  background: var(--accent-soft);
}

.modell-block .eyebrow {
  margin-bottom: 0.5rem;
}

.modell-block-namn {
  font-size: 24px;
  margin: 0 0 1.5rem;
  letter-spacing: -0.015em;
}

.modell-block-visual {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 1.5rem;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease;
}

.modell-block-visual svg {
  max-width: 380px;
  width: 100%;
  height: 100%;
}

.modell-block-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 1rem;
  max-width: 640px;
}

.modell-las-mer {
  display: inline-block;
  font-size: 14px;
  color: var(--accent-dark);
  font-weight: 500;
}

@media (max-width: 600px) {
  .modell-block { padding: 22px; }
  .modell-block-visual { height: 180px; padding: 16px; }
  .modell-block-namn { font-size: 20px; }
}

/* ==========================================================================
   Modell-sidor (dedikerade fördjupnings-sidor)
   ========================================================================== */

.modell-hero .eyebrow { margin-bottom: 1rem; }

.tillbaka-lank {
  display: inline-block;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  transition: color 160ms ease;
}

.tillbaka-lank:hover { color: var(--accent-dark); }

.modell-visual-sektion {
  padding: 0 0 3rem;
}

.modell-visual-stor {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.modell-visual-stor svg {
  max-width: 560px;
  width: 100%;
  height: auto;
}

.modell-text-sektion {
  padding-top: 1rem;
  border-top: 0.5px solid var(--border-subtle);
}

.modell-text-sektion .text-spalt:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .modell-visual-stor {
    padding: 28px 18px;
    min-height: 260px;
  }
}

/* ==========================================================================
   Boka-sektion
   ========================================================================== */

.boka {
  background: var(--accent-soft);
  border-top: 0.5px solid var(--border-subtle);
  border-bottom: 0.5px solid var(--border-subtle);
}

.boka-inner {
  max-width: var(--maxw-text);
  margin: 0 auto;
  text-align: center;
}

.boka h2 { margin-bottom: 1rem; }

.boka p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.boka-knapp {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
  transition: background-color 160ms ease;
}

.boka-knapp:hover { background: var(--accent-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 2.5rem 0;
  font-size: 13px;
  color: var(--text-tertiary);
  border-top: 0.5px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsivitet
   ========================================================================== */

@media (max-width: 900px) {
  .exempel-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  .hero { padding: 4rem 0 3rem; }
  section { padding: 3rem 0; }
}

@media (max-width: 700px) {
  .steg-rad,
  .steg-rad.steg-2,
  .steg-rad.steg-3 {
    grid-template-columns: 1fr;
  }
  .steg { animation-delay: 0ms !important; }
  .nav-links { gap: 1.25rem; font-size: 14px; }
  body { font-size: 16px; }
  h1 { font-size: 28px; }
}

@media (max-width: 480px) {
  .exempel-grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 18px; }
}
