/* 2-rymden — Ståhle Digital showroom
   Nästan svart rymd, levande färgfält, frostat glas på olika djup, ljus som följer pekaren. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2-variations"), url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #050509;
  --text: #eceef6;
  --soft: #c9ccdb;
  --muted: #a4a9bc;
  --faint: #8b90a6;
  --lila: #a78bfa;
  --bla: #7aa2ff;
  --turkos: #5eead4;
  --edge: rgba(255, 255, 255, 0.09);
  --edge-2: rgba(255, 255, 255, 0.16);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4.4vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --r: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.03em; }
::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }
:focus-visible { outline: 1.5px solid var(--turkos); outline-offset: 3px; border-radius: 6px; }

.acc {
  background: linear-gradient(90deg, var(--lila), var(--turkos));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.acc-2 {
  background: linear-gradient(90deg, var(--bla), var(--lila));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- rymden, ljus, korn */
.space {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 20% 10%, rgba(88, 60, 170, 0.28), transparent 60%),
    radial-gradient(70% 60% at 85% 30%, rgba(40, 80, 180, 0.22), transparent 60%),
    radial-gradient(80% 70% at 60% 100%, rgba(20, 120, 130, 0.2), transparent 60%),
    var(--bg);
}
.space-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.space-gl.is-ready { opacity: 1; }

.lightcone {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 210, 255, 0.075), rgba(160, 140, 255, 0.03) 45%, transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transition: opacity 1s;
}
.lightcone.is-on { opacity: 1; }

.grain {
  position: fixed;
  inset: -100px;
  z-index: 60;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-37px, 21px, 0); }
  40% { transform: translate3d(28px, -44px, 0); }
  60% { transform: translate3d(-12px, 53px, 0); }
  80% { transform: translate3d(46px, 9px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------------------------------------------------------------- glas */
.glass {
  --lx: -999px;
  --ly: -999px;
  --li: 0;
  position: relative;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform-style: preserve-3d;
}
.glass::before {
  /* kanten som tänds av ljuset */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  padding: 1.2px;
  background: radial-gradient(460px circle at var(--lx) var(--ly), #fff, rgba(200, 185, 255, 0.7) 22%, rgba(120, 200, 255, 0.18) 50%, transparent 68%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: var(--li);
  pointer-events: none;
  z-index: 2;
}
.glass::after {
  /* svagt sken i glaset */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(560px circle at var(--lx) var(--ly), rgba(210, 200, 255, 0.11), transparent 55%);
  opacity: var(--li);
  pointer-events: none;
  z-index: 0;
}
.glass > * { position: relative; z-index: 1; }
html.lowfx .glass {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: linear-gradient(180deg, rgba(26, 27, 44, 0.86), rgba(14, 15, 26, 0.9));
}

.tilt { will-change: transform; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 10px 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease), -webkit-backdrop-filter 0.6s, backdrop-filter 0.6s;
}
.site-header.is-solid {
  background: rgba(14, 14, 24, 0.55);
  border-color: var(--edge);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}
.brand-logo { display: block; width: 116px; flex: none; }
.brand-logo img { width: 100%; height: auto; }
.site-header nav { display: flex; gap: 2px; margin-left: auto; font-size: 14.5px; }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.3s, background-color 0.3s;
}
.site-header nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------------------------------------------------------------- knappar */
.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dfe2f4);
  color: #0a0a12;
  font: 500 15.5px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 10px 40px -10px rgba(140, 120, 255, 0.65),
    0 0 60px -20px rgba(94, 234, 212, 0.5);
  transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn > span { position: relative; z-index: 1; pointer-events: none; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120px circle at var(--mx) var(--my), rgba(167, 139, 250, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
}
.btn:hover::before { opacity: 1; }
.btn:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 16px 50px -10px rgba(140, 120, 255, 0.85), 0 0 80px -20px rgba(94, 234, 212, 0.7); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn.is-stamped { animation: stamp 0.7s var(--ease); }
@keyframes stamp { 30% { transform: scale(0.95); } 100% { transform: scale(1); } }
.btn .pulse {
  position: absolute;
  z-index: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.7), rgba(94, 234, 212, 0.4));
  pointer-events: none;
  animation: pulse 0.8s var(--ease) forwards;
}
@keyframes pulse { from { transform: scale(0); opacity: 1; } to { transform: scale(40); opacity: 0; } }

.text-link {
  color: var(--text);
  background-image: linear-gradient(90deg, var(--lila), var(--turkos));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease);
}
.text-link:hover { background-size: 0% 1px; background-position: 100% 100%; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(48px, 9vh, 110px)) var(--gutter) clamp(60px, 10vh, 120px);
}
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  gap: clamp(28px, 4vw, 64px) clamp(28px, 4vw, 72px);
  align-items: start;
}
.hero-copy { display: contents; }
.hero-copy .tag { grid-column: 1 / -1; }
[data-sweep] {
  --sxp: -400px;
}
.hero-copy h1 {
  grid-column: 1 / -1;
  margin-top: -8px;
  font-size: clamp(50px, 9.4vw, 150px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 250;
}
.hero-copy h1 br, .contact h2 br { display: none; }
.h1-line {
  display: block;
  padding-bottom: 0.06em;
  background-image:
    linear-gradient(100deg, transparent calc(var(--sxp) - 180px), rgba(255, 255, 255, 1) var(--sxp), transparent calc(var(--sxp) + 180px)),
    linear-gradient(var(--soft), var(--soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-sweep] em {
  --el: 0px;
  white-space: nowrap;
  font-style: normal;
  background-image:
    linear-gradient(100deg, transparent calc(var(--sxp) - var(--el) - 180px), rgba(255, 255, 255, 1) calc(var(--sxp) - var(--el)), transparent calc(var(--sxp) - var(--el) + 180px)),
    linear-gradient(90deg, var(--lila), var(--bla) 45%, var(--turkos));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy .lead {
  grid-column: 1;
  align-self: start;
  max-width: 30ch;
  margin-top: 8px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 350;
}
.hero-main > .depth { grid-column: 2; grid-row: 3; }

.hero-koll { padding: clamp(26px, 2.8vw, 40px); }
.koll-entry { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0 clamp(20px, 2.4vw, 36px); }
.koll-entry > .tag { grid-column: 1 / -1; margin-bottom: 22px; }
.koll-entry-divider { background: linear-gradient(180deg, transparent, var(--edge-2), transparent); }
.koll-q h2 { font-size: clamp(26px, 2.3vw, 34px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 420; }
.koll-q > p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.koll-q-open { display: none; margin-top: 18px; }
.koll-q-body { margin-top: 20px; }
.koll-form { display: grid; gap: 12px; }
.koll-form .btn { width: 100%; }

label { display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); letter-spacing: 0; }
input, textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--edge-2);
  border-radius: 14px;
  background: rgba(8, 8, 16, 0.45);
  color: var(--text);
  font: 400 16.5px/1.4 var(--sans);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder { color: #767b92; }
input:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.26); }
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.8);
  background: rgba(10, 10, 22, 0.7);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.16), 0 0 40px -10px rgba(94, 234, 212, 0.5);
}
.agar-doh-note { font-size: 13.5px; line-height: 1.55; color: var(--faint); }

.hero > .depth { margin-top: clamp(36px, 5vw, 64px); max-width: 720px; }
.anders-trust {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 24px 16px 16px;
  border-radius: 999px;
}
.anders-trust picture { display: block; width: 72px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--edge-2); }
.anders-trust img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.anders-trust-copy p { color: var(--soft); font-size: 15px; line-height: 1.5; }
.anders-social { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; font-size: 14px; }
.anders-social a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); transition: color 0.3s; }
.anders-social a:hover { color: var(--text); }

/* ---------------------------------------------------------------- horisontella kapitel */
.home-story { position: relative; }
.hscroll {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hscroll-progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(22px, 4vh, 40px);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.hscroll-progress span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--lila), var(--bla), var(--turkos));
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
}
.home-chapters {
  display: flex;
  gap: clamp(16px, 2.2vw, 32px);
  padding: calc(var(--header-h) + 24px) var(--gutter) 60px;
  will-change: transform;
}
.home-chapter {
  flex: none;
  width: min(880px, 68vw);
  height: calc(100svh - var(--header-h) - 130px);
  max-height: 760px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.home-chapter-summary {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: clamp(26px, 3vw, 44px);
  list-style: none;
  cursor: pointer;
  transition: flex-grow 0.7s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.home-chapter[open] .home-chapter-summary { flex-grow: 0; }
.home-chapter-summary::-webkit-details-marker { display: none; }
.home-chapter-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.home-chapter-kicker {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 330;
  color: var(--text);
}
.kicker-num {
  display: block;
  margin-bottom: auto;
  padding-bottom: clamp(20px, 6vh, 90px);
  font-size: clamp(88px, 12vw, 190px);
  line-height: 0.85;
  font-weight: 150;
  letter-spacing: -0.07em;
  color: rgba(236, 238, 246, 0.9);
  font-variant-numeric: tabular-nums;
  transition: font-size 0.7s var(--ease), padding 0.7s var(--ease);
}
.kicker-num .acc { font-size: 0.3em; letter-spacing: 0; margin-left: 0.2em; vertical-align: 0.9em; }
.home-chapter[open] .kicker-num { font-size: clamp(40px, 4vw, 60px); padding-bottom: 14px; }
.home-chapter-lede { max-width: 46ch; color: var(--muted); font-size: clamp(15.5px, 1.15vw, 17.5px); }
.home-chapter-arrow {
  position: relative;
  flex: none;
  align-self: flex-start;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--edge-2);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.6s var(--ease), background-color 0.3s, border-color 0.3s;
}
.home-chapter-arrow::before, .home-chapter-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin: -0.75px 0 0 -8px;
  border-radius: 2px;
  background: var(--text);
}
.home-chapter-arrow::after { transform: rotate(90deg); }
.home-chapter-summary:hover .home-chapter-arrow { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.home-chapter[open] .home-chapter-arrow { transform: rotate(45deg); }

.home-chapter-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 clamp(26px, 3vw, 44px) clamp(26px, 3vw, 44px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
details.is-animating { overflow: hidden; }

.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.service-list article {
  padding: 20px 20px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--edge);
  transition: background-color 0.4s, border-color 0.4s;
}
.service-list article:hover { background: rgba(255, 255, 255, 0.065); border-color: var(--edge-2); }
.service-list h3 { font-size: 20px; font-weight: 450; letter-spacing: -0.02em; }
.service-list h3 a { display: inline-flex; min-height: 32px; align-items: center; }
.service-list p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.scope { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(22px, 3vw, 44px); }
.scope-full { grid-template-columns: 1fr; }
.scope > div > p { color: var(--muted); font-size: 16px; }
.scope-full > div > p { padding: 12px 0; border-bottom: 1px solid var(--edge); }
.scope-full > div > p:last-child { border-bottom: 0; }
.scope-full .text-link { font-size: 18px; font-weight: 450; }
.scope > div > .text-link { display: inline-block; margin-top: 18px; font-weight: 450; }
.scope ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.scope li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
.scope li small { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 4px; }
.scope li h3 { font-size: 19px; font-weight: 450; letter-spacing: -0.02em; }
.scope li p { margin-top: 4px; color: var(--muted); font-size: 15px; }

.faq-list { display: grid; }
.faq-list details { border-bottom: 1px solid var(--edge); }
.faq-list summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 40px 12px 0;
  list-style: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 420;
  letter-spacing: -0.02em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.5s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(225deg); margin-top: -1px; }
.faq-list details p { padding: 0 0 18px; color: var(--muted); font-size: 16px; }

/* ---------------------------------------------------------------- kontakt */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 6vw, 100px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(110px, 16vh, 190px) var(--gutter) clamp(90px, 14vh, 150px);
}
.contact h2 {
  margin-top: 20px;
  font-size: clamp(44px, 5vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 260;
}
.contact-copy > p:last-child { margin-top: 26px; max-width: 40ch; color: var(--muted); font-size: 18px; }
.contact-form { display: grid; gap: 16px; padding: clamp(24px, 3vw, 40px); }
.contact-form .btn { justify-self: start; margin-top: 4px; }
.contact-form small { color: var(--faint); font-size: 13.5px; line-height: 1.55; }
.contact-form small a { color: var(--soft); text-decoration: underline; text-decoration-color: rgba(167, 139, 250, 0.6); text-underline-offset: 3px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- sidfot */
.site-footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  grid-template-areas: "brand addr contact nav" "copy copy copy nav";
  gap: 28px 32px;
  max-width: calc(1440px - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto clamp(16px, 3vw, 40px);
  padding: clamp(28px, 3vw, 44px);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}
.site-footer .brand-logo-footer { grid-area: brand; width: 170px; }
.site-footer > p { grid-area: addr; }
.site-footer > div { grid-area: contact; }
.footer-nav { grid-area: nav; }
.site-footer a { transition: color 0.3s; }
.site-footer a:hover { color: var(--text); }
.footer-nav a.acc:hover { color: transparent; }
.site-footer small { grid-area: copy; align-self: end; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }

/* ---------------------------------------------------------------- framträdanden */
.js.motion .rv { opacity: 0; transform: translate3d(0, 40px, 0) scale(0.98); filter: blur(8px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease), filter 1.2s var(--ease); }
.js.motion .rv.is-in { opacity: 1; transform: none; filter: none; }
/* introt: dolt innan JS tar över; reserv visar allt efter 3 s om skripten uteblir */
.js.motion .site-header,
.js.motion .hero .tag,
.js.motion .hero .h1-line,
.js.motion .hero .lead,
.js.motion .hero .depth > .glass { opacity: 0; }
.js.motion:not(.intro-run) .site-header,
.js.motion:not(.intro-run) .hero .tag,
.js.motion:not(.intro-run) .hero .h1-line,
.js.motion:not(.intro-run) .hero .lead,
.js.motion:not(.intro-run) .hero .depth > .glass { animation: intro-fallback 0.6s 3s forwards; }
@keyframes intro-fallback { to { opacity: 1; } }

/* ---------------------------------------------------------------- responsivt */
@media (max-width: 1100px) {
  .site-header .small { display: none; }
  .hero-main { grid-template-columns: 1fr; }
  .hero-main > .depth { grid-column: 1; grid-row: auto; }
  .hero-copy .lead { max-width: 40ch; }
}

@media (max-width: 850px) {
  :root { --header-h: 104px; --r: 20px; }
  .site-header {
    top: 8px;
    left: 10px;
    right: 10px;
    height: auto;
    flex-wrap: wrap;
    gap: 0;
    padding: 8px 12px 2px 16px;
    border-radius: 22px;
  }
  .brand-logo { width: 104px; }
  .site-header nav { order: 3; width: 100%; margin: 0 -4px; justify-content: space-between; font-size: 13.5px; }
  .site-header nav a { padding: 0 8px; }
  .site-header.is-solid { background: rgba(14, 14, 24, 0.72); }

  .hero { padding-top: calc(var(--header-h) + 44px); }
  .hero-copy h1 { font-size: clamp(46px, 13vw, 72px); letter-spacing: -0.05em; font-weight: 280; }
  .koll-entry { grid-template-columns: 1fr; }
  .koll-entry-divider { height: 1px; margin: 26px 0; background: linear-gradient(90deg, transparent, var(--edge-2), transparent); }
  .koll-q-open { display: inline-flex; }
  .koll-q-body { display: none; }
  .koll-q[data-open="true"] .koll-q-body { display: block; }
  .koll-q[data-open="true"] .koll-q-open { display: none; }
  .anders-trust { border-radius: var(--r); align-items: start; }

  .home-chapters { gap: 12px; padding-top: calc(var(--header-h) + 20px); padding-bottom: 56px; }
  .home-chapter { width: 84vw; height: calc(100svh - var(--header-h) - 100px); min-height: 420px; }
  .home-chapter-summary { gap: 12px; padding: 22px; }
  .home-chapter-arrow { width: 44px; height: 44px; }
  .home-chapter-kicker { font-size: 27px; }
  .kicker-num { font-size: 92px; }
  .home-chapter[open] .kicker-num { font-size: 40px; }
  .home-chapter-body { padding: 0 22px 22px; }
  .scope { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; grid-template-areas: "brand brand" "addr contact" "nav nav" "copy copy"; }
  .footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .footer-nav br { display: none; }
  .footer-nav a { display: flex; align-items: center; min-height: 40px; line-height: 1.3; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .hero-copy h1 { font-size: 50px; }
  .hero-koll { padding: 24px 20px; }
  .home-chapter-lede { font-size: 15.5px; }
  .scope li { grid-template-columns: 1fr; gap: 2px; }
  .site-footer { grid-template-columns: 1fr; grid-template-areas: "brand" "addr" "contact" "nav" "copy"; gap: 20px; }
  .contact h2 { font-size: 46px; }
}

/* ---------------------------------------------------------------- utan horisontell scroll (reducerad rörelse) */
html:not(.hs) .hscroll { height: auto; overflow: visible; display: block; }
html:not(.hs) .hscroll-progress { display: none; }
html:not(.hs) .home-chapters {
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}
html:not(.hs) .home-chapter { width: 100%; height: auto; min-height: 0; max-height: none; }
html:not(.hs) .home-chapter-summary { flex: none; }
html:not(.hs) .kicker-num { font-size: clamp(40px, 5vw, 64px); padding-bottom: 14px; }
html:not(.hs) .home-chapter-body { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .grain { animation: none; }
}

.stilprov-note {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 36rem;
}
.stilprov-note a { font-weight: 650; }
.sd-live-link {
  position: fixed;
  z-index: 60;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: rgba(15, 15, 16, 0.88);
  color: #f6f5f1;
  border: 1px solid rgba(246, 245, 241, 0.28);
  backdrop-filter: blur(8px);
}
.sd-live-link:hover,
.sd-live-link:focus-visible {
  outline: 2px solid #f0643b;
  outline-offset: 2px;
}
html[data-theme="light"] .sd-live-link,
body.theme-light .sd-live-link {
  background: rgba(253, 251, 247, 0.94);
  color: #161412;
  border-color: rgba(22, 20, 18, 0.18);
}
