/* Saeviour Solutions – webbplats
   Färger och typsnitt kommer från brand kit 1.0 (04-farger, 05-typsnitt). */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14283D;       /* Bläck   – huvudfärg, bakgrund */
  --lilac: #B59CFF;     /* Syren   – accent, glorian */
  --white: #FFFFFF;     /* Vit     – text på mörk botten */
  --midnight: #0B1A2A;  /* Midnatt – djupare yta för sektioner */
  --steel: #2A3F57;     /* Stål    – linjer på mörk botten */
  --mist: #C9D1DB;      /* Dimma   – brödtext på mörk botten */
  --slate: #8A97A8;     /* Skiffer – bildtexter och metadata */

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 20px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--lilac); color: var(--ink); }

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Sidhuvud ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 40, 61, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(42, 63, 87, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand { display: inline-flex; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.nav a:not(.btn) {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav a:not(.btn):hover { color: var(--white); }

@media (max-width: 680px) {
  .nav li:not(:last-child) { display: none; }
  .brand img { height: 30px; }
}

/* ---------- Knappar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--lilac); color: var(--ink); }
.btn-primary:hover { background: var(--white); }

.btn-ghost { border-color: var(--steel); color: var(--white); }
.btn-ghost:hover { border-color: var(--mist); }

.btn-small { min-height: 40px; padding: 8px 20px; font-size: 0.95rem; }

/* ---------- Gemensamt för sektioner ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--mist);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Liten gloria framför etiketten – samma form som i logotypen */
.eyebrow::before {
  content: "";
  width: 22px;
  height: 8px;
  border: 2px solid var(--lilac);
  border-radius: 50%;
  flex-shrink: 0;
}

h1, h2, h3 { margin: 0; font-weight: 300; }
h1 strong, h2 strong { font-weight: 700; }

h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section { padding: clamp(80px, 12vw, 144px) 0; }
.section-deep { background: var(--midnight); }

.section-head { max-width: 42rem; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { margin-top: 20px; color: var(--mist); font-size: 1.125rem; font-weight: 300; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(96px, 15vh, 176px) 0 clamp(104px, 16vh, 184px);
}

/* Mjukt syrenlila sken bakom glorian */
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -30%;
  right: -20%;
  width: min(1100px, 120vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(181, 156, 255, 0.16), rgba(181, 156, 255, 0.04) 55%, transparent 75%);
  pointer-events: none;
}

.hero-halo {
  position: absolute;
  z-index: -1;
  top: 44%;
  right: max(-200px, calc(50vw - 800px));
  width: clamp(320px, 46vw, 680px);
  height: auto;
  overflow: visible;
  translate: 0 -50%;
  rotate: -8deg;
  pointer-events: none;
  filter: drop-shadow(0 0 28px rgba(181, 156, 255, 0.35));
  animation: hover-halo 9s ease-in-out infinite;
}

@keyframes hover-halo {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.75rem, 7.2vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero .lead {
  max-width: 34rem;
  margin: clamp(24px, 3vw, 36px) 0 0;
  color: var(--mist);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 300;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

@media (max-width: 860px) {
  .hero-halo {
    top: 24px;
    right: -120px;
    width: 360px;
    translate: none;
    opacity: 0.4;
  }
}

/* ---------- Tjänster ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  background: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(181, 156, 255, 0.55); transform: translateY(-2px); }

.card-num {
  color: var(--lilac);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.card h3 {
  margin: 28px 0 12px;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card p { color: var(--mist); }

/* ---------- Om oss ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.about-text {
  color: var(--mist);
  font-size: 1.125rem;
  font-weight: 300;
}
.about-text p:first-child {
  color: var(--white);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding: clamp(28px, 3vw, 36px) 0 0;
  border-top: 1px solid var(--steel);
}
.facts dt { color: var(--slate); font-size: 0.875rem; }
.facts dd { margin: 4px 0 0; color: var(--white); font-size: 1.125rem; font-weight: 500; }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
}

/* ---------- Kontakt ---------- */

.contact { text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact h2 { margin: 0 auto; max-width: 18ch; }
.contact-lead { max-width: 34rem; margin: 20px auto 0; color: var(--mist); font-size: 1.125rem; font-weight: 300; }

.contact-mail {
  display: inline-block;
  margin-top: clamp(32px, 4vw, 48px);
  font-size: clamp(1.375rem, 4.2vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--lilac);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.contact-mail:hover { color: var(--lilac); }

/* ---------- Sidfot ---------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--steel);
  background: var(--midnight);
  color: var(--slate);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.footer-inner img { height: 28px; width: auto; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--mist); text-decoration: none; }
.footer-inner a:hover { color: var(--white); }

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px var(--gutter);
  text-align: center;
}
.notfound img { width: min(320px, 70vw); margin: 0 auto 48px; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
.notfound p { margin: 16px 0 32px; color: var(--mist); }

/* ---------- Mindre rörelse ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
