/* /teknik/teknik.css
 * SENZAI Teknik, publik teknisk översikt.
 * Steg 1, grundstruktur med ljus footer som matchar resten av sajten.
 */

/* ─── Variabler ─── */
:root {
  --teknik-bg: #f7f9f7;
  --teknik-surface: #ffffff;
  --teknik-text: #1a2a1f;
  --teknik-text-muted: #5b6b60;
  --teknik-accent: #1A4D2E;
  --teknik-accent-soft: #5a9a5a;
  --teknik-border: #e3e8e4;
  --teknik-shadow: 0 1px 2px rgba(20, 40, 25, 0.04), 0 8px 24px rgba(20, 40, 25, 0.05);
  --teknik-radius: 10px;
  --teknik-max: 1180px;
  --teknik-content-max: 720px;
}

/* ─── Reset, begränsat ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--teknik-text);
  background: var(--teknik-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--teknik-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teknik-accent);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 0 0 var(--teknik-radius) 0;
}
.skip-link:focus {
  left: 0;
  outline: 2px solid var(--teknik-accent-soft);
  outline-offset: 2px;
}

/* ─── Fokusring, global, jade-glow ─── */
*:focus-visible {
  outline: 2px solid var(--teknik-accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scroll-marginal under sticky header */
:target,
.teknik-section {
  scroll-margin-top: 90px;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--teknik-border);
}
.site-header-inner {
  max-width: var(--teknik-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teknik-accent);
  text-decoration: none;
  font-size: 18px;
}
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--teknik-text);
  text-decoration: none;
  font-size: 15px;
}
.site-nav a[aria-current="page"] {
  color: var(--teknik-accent);
  font-weight: 600;
}

/* ─── Hero ─── */
.teknik-hero {
  background: linear-gradient(180deg, #eef3ee 0%, var(--teknik-bg) 100%);
  border-bottom: 1px solid var(--teknik-border);
}
.teknik-hero-inner {
  max-width: var(--teknik-max);
  margin: 0 auto;
  padding: 64px 24px 56px;
}
.teknik-eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: var(--teknik-accent);
  font-weight: 600;
}
.teknik-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.teknik-lead {
  max-width: 60ch;
  margin: 0;
  font-size: 1.1rem;
  color: var(--teknik-text-muted);
}

/* ─── Layout, två kolumner med sticky TOC ─── */
.teknik-layout {
  max-width: var(--teknik-max);
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
}

.teknik-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 14px;
  border-left: 2px solid var(--teknik-border);
  padding-left: 18px;
}
.teknik-toc-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teknik-text-muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.teknik-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.teknik-toc a {
  color: var(--teknik-text-muted);
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
.teknik-toc a:hover,
.teknik-toc a.is-active {
  color: var(--teknik-accent);
}

/* ─── Innehållskolumn ─── */
.teknik-content {
  max-width: var(--teknik-content-max);
}
.teknik-section {
  background: var(--teknik-surface);
  border: 1px solid var(--teknik-border);
  border-radius: var(--teknik-radius);
  padding: 32px 36px;
  margin-bottom: 32px;
  box-shadow: var(--teknik-shadow);
}
.teknik-section h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.teknik-section p {
  margin: 0 0 14px;
}
.teknik-section p:last-child {
  margin-bottom: 0;
}
.teknik-placeholder {
  color: var(--teknik-text-muted);
  font-style: italic;
}
.teknik-section ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.teknik-section li {
  margin-bottom: 6px;
}
.teknik-section li:last-child {
  margin-bottom: 0;
}

/* Underrubriker inom sektioner */
.teknik-section h3 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--teknik-accent);
}
.teknik-section h3:first-of-type {
  margin-top: 8px;
}
.teknik-section h4 {
  margin: 22px 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teknik-text-muted);
}

/* Tabell */
.teknik-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.teknik-table th,
.teknik-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--teknik-border);
  vertical-align: top;
}
.teknik-table th {
  background: var(--teknik-bg);
  font-weight: 600;
  color: var(--teknik-text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.teknik-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Relaterade sidor, länklista med pilar */
.teknik-related {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.teknik-related li {
  margin-bottom: 8px;
  padding-left: 22px;
  position: relative;
}
.teknik-related li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--teknik-accent-soft);
  font-weight: 600;
}

/* ─── Footer ─── */
.footer {
  padding: 3rem 1.5rem;
  background-color: var(--teknik-bg);
  border-top: 1px solid var(--teknik-border);
  margin-top: 80px;
}
.footer .container {
  max-width: var(--teknik-max);
  margin: 0 auto;
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon-small {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
}
.logo-circle-small {
  position: absolute;
  border-radius: 50%;
}
.logo-circle-small.logo-circle-1 {
  inset: 0;
  border: 1.5px solid var(--teknik-accent);
  opacity: 0.6;
}
.logo-circle-small.logo-circle-3 {
  inset: 0.35rem;
  background-color: var(--teknik-accent-soft);
  opacity: 0.4;
}
.logo-text-small {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teknik-accent);
  transition: color 0.2s ease;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.footer-link {
  color: var(--teknik-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--teknik-accent-soft);
}
.footer-text {
  color: var(--teknik-text-muted);
  font-size: 0.875rem;
}

/* ─── Mobil ─── */
@media (max-width: 880px) {
  .teknik-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 18px 64px;
  }
  .teknik-toc {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--teknik-border);
    border-bottom: 1px solid var(--teknik-border);
    padding: 18px 0;
  }
  .teknik-toc ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .teknik-hero-inner {
    padding: 44px 18px 36px;
  }
  .teknik-section {
    padding: 24px 22px;
  }
  .site-header-inner {
    padding: 12px 18px;
  }
  .site-nav {
    gap: 14px;
  }
}

/* ─── Reducerad rörelse ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}