/* RättsKlart – startsidan */

:root {
  --navy:        #001f3f;
  --navy-light:  #1a3a5c;
  --green:       #2d4a3e;
  --green-dark:  #1f3329;
  --green-tint:  #e6ede8;
  --warm-white:  #fafaf8;
  --gray-bg:     #f4f4f1;
  --gray-border: #d6d6d0;
  --gray-text:   #5a5a55;
  --ink:         #1a1a1a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--warm-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAV ── */
.nav {
  border-bottom: 1px solid var(--gray-border);
  background: var(--warm-white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.015em;
  line-height: 1;
}
.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}
.logo-text-wrap {
  display: flex;
  flex-direction: column;
}
.logo .accent { color: var(--green); }
.logo-tag {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 4px;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--green); }
.btn-login {
  border: 1px solid var(--navy);
  padding: 8px 18px;
  border-radius: 2px;
  color: var(--navy) !important;
  transition: all 0.15s ease;
}
.btn-login:hover { background: var(--navy); color: white !important; }

/* ── KNAPPAR ── */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--sans);
}
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--green); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: white; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── HERO ── */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--gray-border);
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 24px;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.015em;
  max-width: 760px;
  margin: 0 auto 24px;
}
.lede {
  font-size: 18px;
  color: var(--gray-text);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.55;
}
.lede strong { color: var(--ink); font-weight: 500; }
.trust-row {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  padding: 28px 0;
  margin: 0 0 48px;
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
  font-size: 14px;
  color: var(--gray-text);
}
.trust-row > div { display: flex; align-items: center; gap: 8px; }
.trust-row .icon { color: var(--green); font-weight: 700; }

/* ── SEKTIONSRUBRIKER ── */
.section-eyebrow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.section-lede {
  text-align: center;
  color: var(--gray-text);
  max-width: 580px;
  margin: 0 auto 56px;
  font-size: 16px;
}

/* ── FUNKTIONER ── */
.funktioner { padding: 88px 0 64px; }
.funktioner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.funktion-card {
  padding: 32px 28px;
  border: 1px solid var(--gray-border);
  background: white;
  transition: all 0.2s ease;
}
.funktion-card:hover { border-color: var(--green); transform: translateY(-2px); }
.funktion-card .num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.funktion-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}
.funktion-card p { font-size: 14.5px; color: var(--gray-text); line-height: 1.55; }

/* ── PRISER / HELHETS ── */
.helhets {
  background: var(--navy);
  color: white;
  padding: 80px 0;
  position: relative;
}
.helhets::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 4px; height: 100%;
  background: var(--green);
}
.helhets-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.helhets-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b0c2b6;
  margin-bottom: 16px;
}
.helhets h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.helhets p { color: #c5cfd0; font-size: 16px; line-height: 1.65; margin-bottom: 16px; }
.helhets-pris {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid var(--green);
  padding: 32px 36px;
}
.helhets-pris .pris-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b0c2b6;
  margin-bottom: 12px;
}
.helhets-pris .pris-stor {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}
.helhets-pris .pris-suffix { font-size: 16px; color: #c5cfd0; margin-bottom: 24px; }
.helhets-pris .pris-jamf {
  font-size: 14px;
  color: #c5cfd0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.helhets-pris .pris-jamf strong { color: white; }
.helhets-jamf-text {
  font-size: 14px;
  color: #b0c2b6;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 8px;
  font-style: italic;
}

/* ── RÄKNEEXEMPEL ── */
.priser-section {
  padding: 88px 0;
  text-align: center;
  background: var(--gray-bg);
}
.pris-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-border);
  padding: 36px 56px;
  margin-top: 32px;
}
.pris-card .from {
  font-size: 12px;
  color: var(--gray-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pris-card .pris {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.pris-card .pris-detalj { font-size: 14px; color: var(--gray-text); margin-top: 8px; }
.pris-card a {
  margin-top: 24px;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}
.pris-card a:hover { text-decoration: underline; }

/* ── OM ── */
.om { padding: 88px 0; text-align: center; }
.om-content { max-width: 680px; margin: 0 auto; }
.om p {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-style: italic;
}

/* ── FINAL CTA ── */
.final-cta {
  background: var(--green-tint);
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--gray-border);
}
.final-cta h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}
.final-cta p { color: var(--gray-text); font-size: 16px; margin-bottom: 32px; }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: #c5cfd0;
  padding: 56px 0 32px;
  font-size: 14px;
}
footer .footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
footer h4 { font-family: var(--serif); color: white; font-size: 18px; margin-bottom: 12px; }
footer p { line-height: 1.6; margin-bottom: 8px; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: #c5cfd0; text-decoration: none; }
footer a:hover { color: white; }
footer .footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.disclaimer {
  background: rgba(0,0,0,0.2);
  padding: 16px 20px;
  border-left: 2px solid var(--green);
  margin-top: 24px;
  font-size: 13px;
  color: #b0c2b6;
  line-height: 1.6;
}

/* ── HISTORIK-PANEL (JS-styrd) ── */
.historik-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
}
.historik-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 400px;
  background: white;
  z-index: 201;
  overflow-y: auto;
  padding: 24px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.historik-topp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.historik-topp h2 { font-size: 1.1rem; font-weight: 700; }
.stang-knapp {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
}
.historik-rad {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.historik-rad:hover { background: #f8fafc; }
.historik-rad .typ {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e2a3a;
  text-transform: uppercase;
}
.historik-rad .datum { font-size: 0.8rem; color: #64748b; }
.historik-rad .info { font-size: 0.78rem; color: #94a3b8; }

/* ── MARKDOWN-TABELLER (för historik-visning) ── */
.tabell-wrapper { overflow-x: auto; margin: 16px 0; }
.tabell-wrapper table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tabell-wrapper th {
  background: var(--navy);
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.78rem;
}
.tabell-wrapper td { padding: 8px 12px; border-bottom: 1px solid #f1f4f8; }
.tabell-wrapper tr:last-child td { border-bottom: none; }

/* ── MOBILANPASSNING ── */
@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .hero { padding: 64px 0 48px; }
  .trust-row {
    gap: 12px;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin: 0 0 32px;
  }
  .helhets-grid { grid-template-columns: 1fr; gap: 32px; }
  footer .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .btn { padding: 14px 24px; font-size: 14px; }
  .historik-panel { width: 100%; }
}
