/* Upphandlingskompassen – informationssida
   Husets designsystem (Critero v1.3): sand, skogsgrön, varm svart, Space Grotesk.
   Typsnitten ligger på sidan själv; inget hämtas från andra värdar. */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f0ead8;
  --bg-deep: #e8dfc8;
  --surface: #faf6ed;
  --text: #1a1a12;
  --muted: #5a5848;
  --line: #d9d0b8;
  --green: #3d6e50;
  --green-hover: #2e5540;
  --green-deep: #24432f;
  --on-green: #f5f1e6;
  --on-green-muted: #c9d6c6;
  --accent: #cc5a3e; /* signaturdetalj, aldrig text */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(26, 26, 18, 0.06), 0 12px 32px rgba(26, 26, 18, 0.10);
  --shadow-lg: 0 2px 4px rgba(26, 26, 18, 0.06), 0 30px 60px rgba(26, 26, 18, 0.16);
  --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-hover); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- typografi ---------- */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.28rem; letter-spacing: -0.01em; }
p { margin: 0; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--muted); line-height: 1.55; }

/* ---------- knappar ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font); text-decoration: none;
  border: 1px solid transparent; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green-hover); }
.btn-light { background: var(--on-green); color: var(--green-deep); }
.btn-light:hover { background: #fff; color: var(--green-deep); }

/* ---------- sidhuvud ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240, 234, 216, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(26, 26, 18, 0.06);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span b { font-weight: 600; }
.brand span i { font-style: normal; font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }
.site-header .btn { padding: 10px 18px; font-size: 0.93rem; }
@media (max-width: 860px) { .nav { display: none; } .site-header .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; }
.hero h1 { margin-top: 18px; max-width: 15ch; }
.hero .lead { margin-top: 22px; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: 0.93rem; padding: 0; list-style: none; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { color: var(--green); flex: none; }
.hero-shot { margin: 12px 0 0; position: relative; }
.hero-shot::before {
  content: ""; position: absolute; inset: 12% -4% -8% -4%;
  background: radial-gradient(60% 60% at 50% 40%, rgba(61, 110, 80, 0.20), transparent 70%);
  z-index: 0;
}
.hero-shot .window { position: relative; z-index: 1; margin-bottom: -2px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ---------- appfönster runt skärmdumpar ---------- */
.window {
  background: var(--surface);
  border: 1px solid rgba(26, 26, 18, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #e9e2cf; border-bottom: 1px solid rgba(26, 26, 18, 0.07); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d3c9b0; }
.window-bar i:first-child { background: #d9826b; }
.window-bar i:nth-child(2) { background: #dcb65f; }
.window-bar i:nth-child(3) { background: #8fb28f; }
.window-bar span { margin-left: 10px; font: 500 0.74rem/1 var(--mono); color: var(--muted); }
.window button.zoom { all: unset; display: block; cursor: zoom-in; width: 100%; }
.window button.zoom:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }

/* ---------- sektioner ---------- */
section { padding: 110px 0; }
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 14px; }
.section-head .lead { margin-top: 18px; }

/* utmaningen */
.challenge { background: var(--surface); border-top: 1px solid rgba(26, 26, 18, 0.06); }
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 54px; }
.challenge-card { background: var(--bg); border-radius: var(--radius); padding: 28px 28px 30px; border: 1px solid rgba(26, 26, 18, 0.06); }
.challenge-card .num { font: 500 0.8rem/1 var(--mono); color: var(--green-hover); letter-spacing: 0.06em; }
.challenge-card h3 { margin-top: 14px; }
.challenge-card p { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
.challenge-close { margin-top: 48px; font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.4; max-width: 34ch; letter-spacing: -0.01em; }
.challenge-close em { font-style: normal; color: var(--green-hover); }

/* rundtur */
.tour-item { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; margin-top: 96px; }
.tour-item:first-of-type { margin-top: 64px; }
.tour-text h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; margin-top: 12px; }
.tour-text p { margin-top: 14px; color: var(--muted); }
.tour-text ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tour-text li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.98rem; }
.tour-text li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: rgba(61, 110, 80, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e5540' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/11px no-repeat; }
.tour-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tour-item { grid-template-columns: 5fr 7fr; gap: 64px; }
  .tour-item.flip { grid-template-columns: 7fr 5fr; }
  .tour-item.flip .tour-text { order: 2; }
}
/* Två skärmdumpar bredvid varandra får hela bredden under texten, så de går att läsa */
.tour-item.wide { grid-template-columns: 1fr !important; gap: 32px; }
.tour-item.wide .tour-text { order: 0 !important; max-width: 760px; }
.tour-item.wide .tour-text ul { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 28px; }
.tour-pair { gap: 20px; }
@media (max-width: 640px) { .tour-pair { grid-template-columns: 1fr; } section { padding: 80px 0; } }

/* trygghet */
.trust { background: var(--green-deep); color: var(--on-green); }
.trust .eyebrow { color: var(--on-green-muted); }
.trust .lead { color: var(--on-green-muted); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 1px; margin-top: 56px; background: rgba(245, 241, 230, 0.14); border-radius: var(--radius); overflow: hidden; }
.trust-item { background: var(--green-deep); padding: 30px 28px; }
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item svg { color: var(--on-green); opacity: 0.9; }
.trust-item h3 { margin-top: 16px; color: var(--on-green); font-size: 1.12rem; }
.trust-item p { margin-top: 8px; color: var(--on-green-muted); font-size: 0.96rem; }

/* för vem */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 52px; }
.role { background: var(--surface); border-radius: var(--radius); padding: 26px; border: 1px solid rgba(26, 26, 18, 0.06); }
.role h3 { font-size: 1.1rem; }
.role p { margin-top: 8px; color: var(--muted); font-size: 0.96rem; }
.not-list { margin-top: 44px; padding: 24px 28px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--muted); max-width: 820px; font-size: 0.98rem; }
.not-list strong { color: var(--text); font-weight: 600; }

/* om */
.about { background: var(--surface); border-top: 1px solid rgba(26, 26, 18, 0.06); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.portrait { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); max-width: 380px; background: var(--bg-deep); }
.portrait img { width: 100%; aspect-ratio: 583 / 700; object-fit: cover; object-position: center 20%; filter: grayscale(1) contrast(1.02); }
.about blockquote { margin: 26px 0 0; padding-left: 20px; border-left: 3px solid var(--green); font-size: 1.15rem; line-height: 1.55; color: var(--text); }
.about p { margin-top: 18px; color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.about-meta { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 0.92rem; }
.about-meta img { width: 44px; height: 44px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 380px 1fr; gap: 72px; } }

/* uppmaning */
.cta { padding: 0 0 110px; }
.cta-box { background: var(--green); color: #fff; border-radius: 24px; padding: clamp(36px, 6vw, 72px); display: grid; gap: 28px; position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(245, 241, 230, 0.10); }
.cta-box h2 { color: #fff; max-width: 20ch; }
.cta-box p { color: #e7eee6; max-width: 56ch; font-size: 1.08rem; }
.cta-box .btn { justify-self: start; }

/* sidfot */
.site-footer { border-top: 1px solid rgba(26, 26, 18, 0.08); padding: 40px 0 56px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* bildvisning */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1680px); width: 100%; }
dialog.lightbox::backdrop { background: rgba(20, 20, 14, 0.82); }
dialog.lightbox img { width: 100%; border-radius: 12px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4); }
dialog.lightbox p { color: #f5f1e6; text-align: center; margin-top: 14px; font-size: 0.95rem; }
dialog.lightbox button { position: fixed; top: 18px; right: 22px; border: 0; background: rgba(245, 241, 230, 0.16); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
dialog.lightbox button:hover { background: rgba(245, 241, 230, 0.28); }

/* 404 */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { margin-top: 16px; font-size: 2.4rem; }
.notfound .lead { margin-top: 14px; }
.notfound p.action { margin-top: 28px; }
