/* Fastighetsbevakningen — Design System v8 */
/* =========================================== */

:root {
  /* Colors */
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --bg-dark: #0f172a;
  --bg-dark-card: #1e293b;
  --bg-dark-hover: #334155;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  --text-inverse-muted: #94a3b8;

  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: #ccfbf1;
  --accent-dark: #115e59;

  --border: #e2e8f0;
  --border-dark: #334155;

  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --green: #16a34a;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 0 1px rgba(13,148,136,0.1), 0 4px 20px rgba(13,148,136,0.1);

  /* Transition */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

/* ====== Typography ====== */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.125rem; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ====== Header ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-img { height: 28px; width: auto; }
.logo-text { font-size: 0.95rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.logo-accent { color: var(--accent); }

.nav-desktop { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.625rem 1.25rem;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.625rem 1.25rem;
}
.btn-ghost:hover { color: var(--text); background: var(--bg); }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ====== Hero ====== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-highlight {
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Hero Visual */
.hero-visual { position: relative; }

.hero-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.hero-card-dots {
  display: flex;
  gap: 4px;
}
.hero-card-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.hero-card-dots span:nth-child(1) { background: #ef4444; }
.hero-card-dots span:nth-child(2) { background: #eab308; }

.hero-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-card-body { padding: 0.625rem 0; }

.hero-card-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background var(--transition);
}
.hero-card-item:hover { background: var(--bg); }

.hero-card-icon { font-size: 1.25rem; flex-shrink: 0; width: 2rem; text-align: center; }
.hero-card-title { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; }
.hero-card-meta { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.125rem; }

.hero-card-item.pulse .hero-card-icon {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.hero-card-footer {
  position: relative;
  height: 3px;
}

.hero-card-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #06b6d4, var(--accent));
  opacity: 0.7;
}

/* ====== Value Section ====== */
.value-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.value-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.value-card:hover::before { opacity: 1; }

.value-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.value-card h3 { margin-bottom: 0.5rem; }
.value-card p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.65; }

/* ====== Steps Section ====== */
.steps-section {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 5rem 1.5rem;
}

.steps-section .section-label { color: #2dd4bf; }
.steps-section .section-title { color: var(--text-inverse); }
.steps-section .section-sub { color: var(--text-inverse-muted); }

.steps-grid {
  max-width: 1200px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
  padding: 2.5rem 1.5rem;
}

.step-number {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: var(--radius);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 2;
}

.step-line {
  position: absolute;
  top: 24px;
  left: calc(50% + 48px);
  width: calc(100% - 96px);
  height: 2px;
  background: var(--border-dark);
  z-index: 1;
}

.step-card:last-child .step-line { display: none; }

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--text-inverse-muted);
  line-height: 1.6;
}

/* ====== Sources Section ====== */
.sources-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.5rem 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition);
}

.source-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.source-icon { font-size: 1.5rem; }

/* ====== Demo Section ====== */
.demo-section {
  background: var(--bg-dark);
  padding: 5rem 1.5rem;
}

.demo-section .section-label { color: #2dd4bf; }
.demo-section .section-title { color: var(--text-inverse); }
.demo-section .section-sub { color: var(--text-inverse-muted); }

.demo-card {
  max-width: 720px;
  margin: 3rem auto 0;
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-dark);
}

.demo-header-left { display: flex; align-items: center; gap: 0.75rem; }

.demo-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(13,148,136,0.15);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.demo-date { font-size: 0.8125rem; color: var(--text-inverse-muted); }

.demo-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251,191,36,0.15);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.demo-body { padding: 1.25rem; }

.demo-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-dark);
}

.demo-item:last-child { border-bottom: none; }

.demo-item-marker {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 0.4rem;
  flex-shrink: 0;
}

.demo-marker-red { background: var(--red); }
.demo-marker-amber { background: var(--amber); }
.demo-marker-green { background: var(--green); }

.demo-item h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-inverse);
  margin-bottom: 0.25rem;
}

.demo-item p {
  font-size: 0.8125rem;
  color: var(--text-inverse-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.demo-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(13,148,136,0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-dark);
  font-size: 0.75rem;
  color: var(--text-inverse-muted);
}

/* ====== Pricing ====== */
.pricing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 3rem auto 0;
}

.pricing-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
}

.pricing-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

.pricing-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.pricing-featured:hover { border-color: var(--accent-hover); box-shadow: 0 0 0 1px rgba(13,148,136,0.2), 0 8px 30px rgba(13,148,136,0.15); }

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 999px;
}

.pricing-level {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pricing-price { margin-bottom: 0.75rem; }
.pricing-amount { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.pricing-period { font-size: 0.9375rem; color: var(--text-muted); font-weight: 500; }

.pricing-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pricing-trial {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ====== CTA Section ====== */
.cta-section {
  position: relative;
  background: var(--bg-dark);
  padding: 5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(13,148,136,0.15), transparent 60%);
  pointer-events: none;
}

.cta-section h2 {
  color: var(--text-inverse);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.cta-section p {
  color: var(--text-inverse-muted);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.cta-section .btn {
  position: relative;
  z-index: 1;
}

/* ====== Footer ====== */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-trust {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-trust span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--text); }

/* ====== Scroll Reveal ====== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { max-width: 500px; margin: 0 auto; }
  .sources-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .nav-desktop.nav-open { display: flex; }
  .nav-toggle { display: flex; }

  .nav-link {
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-sm);
  }

  .hero { padding: 3rem 1rem 4rem; }
  .hero-trust { flex-direction: column; gap: 0.5rem; }

  .value-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; max-width: 400px; }
  .step-line { display: none; }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .demo-footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; }
  .section-title { font-size: 1.5rem; }
}
