/* ==============================
   Tema & bas
============================== */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --card: #f8fafc;
  --accent: #93b1f8;
  --accent-2: #ed64ef;
  --border: #e2e8f0;
  --shadow: 0 8px 28px rgba(2, 6, 23, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --card: #121821;
    --accent: #93b1f8;
    --accent-2: #ed64ef;
    --border: #1f2937;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html:focus-within {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}

#huvudnav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

.section-title {
  position: relative;
  padding-bottom: 0.35rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 4px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ==============================
   Länkar & knappar
============================== */
a {
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
}

/* ==============================
   Header & navigation (glossy + hamburger)
============================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

/* Desktop-nav */
nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
nav a {
  color: var(--muted);
  padding: 0.25rem 0.1rem;
  position: relative;
}
nav a:hover,
nav a:focus {
  color: var(--text);
}
nav a.is-active::after,
nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ==============================
   Cards
============================== */

.card {
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease;
  position: relative;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  ::selection {
    background: #1f2937;
    color: #e5e7eb;
  } /* gray-800 / gray-200 */
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  header.is-open {
    background: var(--bg) !important; /* ingen transparens */
  }
}
