/* Kodkollektivet – kodkollektivet.se
   Inga externa resurser: systemtypsnitt, inline-SVG, inga cookies. */

:root {
  --bg: #f6f3ec;
  --bg-alt: #ece6da;
  --surface: #fffdf8;
  --fg: #16201c;
  --muted: #56615b;
  --line: #d9d1c2;
  --accent: #1f5c4b;
  --accent-2: #3f8f74;
  --accent-ink: #f6f3ec;
  --hero-1: #14332b;
  --hero-2: #1f4a3d;
  --warm: #c8893a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(22, 32, 28, .06), 0 8px 24px rgba(22, 32, 28, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --bg-alt: #141c19;
    --surface: #18211e;
    --fg: #ebe8e1;
    --muted: #a2aca6;
    --line: #27322e;
    --accent: #6cc3a3;
    --accent-2: #3f8f74;
    --accent-ink: #0f1513;
    --hero-1: #0c1714;
    --hero-2: #12251f;
    --warm: #e0a457;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(28px, 4.2vw, 40px); margin-bottom: 16px; }
h3 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 8px; }
p { margin: 0 0 16px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- toppmeny ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 14px;
}
.brand-name { font-size: 18px; letter-spacing: -.01em; }
nav { display: flex; align-items: center; gap: 4px; }
nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
nav a:hover, nav a:focus-visible { color: var(--fg); background: var(--bg-alt); outline: none; }
nav .nav-cta { color: var(--accent-ink); background: var(--accent); }
nav .nav-cta:hover, nav .nav-cta:focus-visible { color: var(--accent-ink); background: var(--accent-2); }
@media (max-width: 720px) {
  nav a:not(.nav-cta) { display: none; }
}

/* ---------- knappar ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 16px;
  text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }
.btn-primary { background: var(--warm); color: #1a1208; }
.btn-ghost { color: #f6f3ec; border: 1px solid rgba(246, 243, 236, .35); }
.btn-ghost:hover { border-color: rgba(246, 243, 236, .8); }
.btn-light { background: #f6f3ec; color: #14332b; font-family: var(--mono); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(63, 143, 116, .35), transparent 60%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
  color: #f6f3ec;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero .eyebrow { color: #9fd9c2; }
.hero h1 { font-size: clamp(36px, 6vw, 62px); margin-bottom: 24px; }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: rgba(246, 243, 236, .82); max-width: 34em; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-art figcaption { font-family: var(--mono); font-size: 13px; color: rgba(246, 243, 236, .6); text-align: center; margin-top: 8px; }
.grid-lines path { stroke: rgba(246, 243, 236, .07); stroke-width: 1; fill: none; }
.links path { stroke: rgba(159, 217, 194, .45); stroke-width: 1.5; fill: none; }
.nodes circle { fill: #1f4a3d; stroke: #9fd9c2; stroke-width: 2; }
.stop-a { stop-color: #c8893a; }
.stop-b { stop-color: #e0a457; }
.core-text { font-family: var(--mono); font-size: 20px; font-weight: 700; fill: #1a1208; }
@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin: 0 auto; }
}

/* ---------- sektioner ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { font-size: 19px; color: var(--muted); max-width: 40em; margin-bottom: 40px; }
@media (max-width: 600px) { .section { padding: 64px 0; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); margin-bottom: 20px;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none; }
.steps li { border-top: 2px solid var(--accent); padding-top: 20px; }
.step-num { font-family: var(--mono); font-size: 14px; color: var(--warm); display: block; margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: start; }
.about p { color: var(--muted); max-width: 36em; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.values li {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px;
}
.values span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- kontakt ---------- */
.contact { background: linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #f6f3ec; text-align: center; }
.contact-inner { max-width: 720px; }
.contact p { color: rgba(246, 243, 236, .82); font-size: 19px; margin-bottom: 32px; }
.contact .join { font-size: 15px; margin: 28px 0 0; color: rgba(246, 243, 236, .65); }
.contact .join a { color: #9fd9c2; }

/* ---------- sidfot ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot a { color: var(--muted); }
