:root {
  --bg: #070b14;
  --bg-elev: #0f1726;
  --ink: #e8eef8;
  --muted: #8fa0b8;
  --line: rgba(126, 200, 255, 0.18);
  --accent: #2b7fd4;
  --accent-2: #5ec8ff;
  --danger: #d45c5c;
  --ok: #3cb371;
  --warn: #d4a017;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --radius: 4px;
  --shell: min(1120px, calc(100% - 2.5rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(43, 127, 212, 0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(20, 60, 110, 0.35), transparent 50%),
    linear-gradient(180deg, #0a1220 0%, var(--bg) 40%, #05080f 100%);
  background-attachment: fixed;
  line-height: 1.55;
}

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

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 2px;
  background: linear-gradient(135deg, #1a5fad, #7ec8ff);
  box-shadow: 0 0 18px rgba(94, 200, 255, 0.45);
  animation: pulse-mark 3.2s ease-in-out infinite;
}

@keyframes pulse-mark {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.brand-text {
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav .nav-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #1a5fad);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
}

.site-nav .nav-user {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.flash {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.flash-error {
  border-color: rgba(212, 92, 92, 0.45);
  color: #ffb4b4;
}

.flash-success {
  border-color: rgba(60, 179, 113, 0.45);
  color: #9be7bc;
}

.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.25) 0%, rgba(7, 11, 20, 0.55) 45%, rgba(7, 11, 20, 0.94) 100%);
  pointer-events: none;
}

.brand-logo {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}

.service-img,
.lead-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.lead-img {
  border-radius: 50%;
  object-fit: cover;
  width: 96px;
  height: 96px;
}

.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500 !important;
}

.check-row input {
  width: auto;
  margin-top: 0.25rem;
}

.hero-content {
  padding: 5rem 0 4.5rem;
  max-width: 34rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  letter-spacing: 0.04em;
  line-height: 0.92;
  margin: 0 0 0.85rem;
  color: #fff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.9s ease both;
}

.hero-lead {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 1.15rem;
  animation: fade-up 0.9s ease 0.12s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fade-up 0.9s ease 0.22s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #174f8c);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  line-height: 1;
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
}

.offer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.offer-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.service-grid,
.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.service-link,
.lead-item {
  display: block;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-link:hover,
.lead-item:hover {
  border-top-color: var(--accent-2);
  transform: translateY(-2px);
  text-decoration: none;
}

.service-link h3,
.lead-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.service-link p,
.lead-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-hero {
  padding: 3.5rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  line-height: 0.95;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2rem;
}

.form-panel,
.panel {
  background: rgba(15, 23, 38, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge-inkommen { color: #f0d060; border-color: rgba(240, 200, 60, 0.55); }
.badge-under_hantering { color: #c9d6e8; border-color: rgba(126, 200, 255, 0.35); }
.badge-godkand { color: #9be7bc; border-color: rgba(60, 179, 113, 0.4); }
.badge-nekad,
.badge-intervju_nekad { color: #ffb4b4; border-color: rgba(212, 92, 92, 0.4); }
.badge-intervju_godkand { color: #9be7bc; border-color: rgba(60, 179, 113, 0.55); }

.timeline {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  padding: 0 0 1.1rem 1rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.notes-chat {
  display: grid;
  gap: 0.75rem;
  max-height: 28rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.notes-chat-item {
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  padding: 0.85rem 1rem;
}

.notes-chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.notes-chat-body {
  white-space: pre-wrap;
  line-height: 1.45;
}

.login-split {
  display: grid;
  gap: 1.5rem;
  max-width: 480px;
  margin: 2rem auto 4rem;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}

.footer-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-grid a {
  display: block;
  color: var(--ink);
  margin: 0.25rem 0;
  text-decoration: none;
}

.copyright {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 4.25rem;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(7, 11, 20, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav.is-open[hidden] {
    display: flex;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

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