/* 1-ritningen — Ståhle Digital showroom
   Hantverk möter precision. Nattblå ritning, cyan linjer, en varm accent för knappar. */

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight.woff2") format("woff2-variations"), url("../fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #070b14;
  --bg-2: #0a1020;
  --sheet: #0b1324;
  --line: #7fe3ff;
  --line-a1: rgba(127, 227, 255, 0.06);
  --line-a2: rgba(127, 227, 255, 0.12);
  --line-a3: rgba(127, 227, 255, 0.28);
  --line-a4: rgba(127, 227, 255, 0.55);
  --text: #f3f7fb;
  --muted: #a3b1c6;
  --dim: #7d8ca3;
  --orange: #ff7a1a;
  --orange-hi: #ff9447;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4.2vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
  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; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -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: 600; letter-spacing: -0.03em; }
::selection { background: rgba(127, 227, 255, 0.3); color: #fff; }

:focus-visible {
  outline: 1.5px solid var(--line);
  outline-offset: 3px;
  border-radius: 2px;
}

.acc { color: var(--line); }
.acc-2 { color: #b9c7ff; }

/* ---------------------------------------------------------------- grid bg */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 0%, rgba(40, 90, 150, 0.16), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(20, 60, 110, 0.14), transparent 60%),
    var(--bg);
}
.grid-bg-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: -240px;
  height: calc(100% + 480px);
  background-image:
    linear-gradient(to right, rgba(127, 227, 255, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(127, 227, 255, 0.075) 1px, transparent 1px),
    linear-gradient(to right, rgba(127, 227, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(127, 227, 255, 0.032) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(140% 100% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%);
  mask-image: radial-gradient(140% 100% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%);
  will-change: transform;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), -webkit-backdrop-filter 0.5s, backdrop-filter 0.5s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(7, 11, 20, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-a2);
}
.brand-logo { display: block; width: 132px; flex: none; }
.brand-logo img { width: 100%; height: auto; }
.site-header nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-header nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  transition: color 0.3s;
}
.site-header nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a:hover::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- buttons */
.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #0a0d14;
  font: 600 16px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 150, 80, 0.4), 0 10px 30px -12px rgba(255, 122, 26, 0.55);
  transition: box-shadow 0.4s var(--ease), background-color 0.3s;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.btn > span { position: relative; z-index: 1; display: inline-block; pointer-events: none; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(160px circle at var(--mx) var(--my), rgba(255, 230, 200, 0.55), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}
.btn:hover::before { opacity: 1; }
.btn:hover { box-shadow: 0 0 0 1px rgba(255, 170, 110, 0.7), 0 18px 44px -14px rgba(255, 122, 26, 0.75); }
.btn.small { min-height: 42px; padding: 0 20px; font-size: 14.5px; }
.btn .pulse {
  position: absolute;
  z-index: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 240, 220, 0.8);
  pointer-events: none;
  animation: btn-pulse 0.7s var(--ease) forwards;
}
@keyframes btn-pulse {
  from { transform: scale(0); opacity: 0.9; }
  to { transform: scale(30); opacity: 0; }
}
.btn.is-stamped { animation: stamp 0.6s var(--ease); }
@keyframes stamp {
  0% { transform: scale(1); }
  30% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

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

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

/* ---------------------------------------------------------------- hero stage */
.hero { position: relative; }
.hero-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.hero-stage::before {
  /* scenen har sitt eget rutnät i 3D; sidans rutnät tonas fram först under den */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 60% 40%, #0b1426 0%, var(--bg) 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
  mask-image: linear-gradient(180deg, #000 82%, transparent);
  pointer-events: none;
}
.ritning {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.ritning.is-ready { opacity: 1; }
.stage-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 0.7) 32%, rgba(7, 11, 20, 0) 58%),
    linear-gradient(0deg, rgba(7, 11, 20, 0.8) 0%, rgba(7, 11, 20, 0) 40%);
}

.stage-hud { position: absolute; inset: 0; pointer-events: none; }
.crop {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--line-a4);
  border-style: solid;
  border-width: 0;
}
.crop-tl { top: calc(var(--header-h) + 18px); left: var(--gutter); border-top-width: 1px; border-left-width: 1px; }
.crop-tr { top: calc(var(--header-h) + 18px); right: var(--gutter); border-top-width: 1px; border-right-width: 1px; }
.crop-bl { bottom: 26px; left: var(--gutter); border-bottom-width: 1px; border-left-width: 1px; }
.crop-br { bottom: 26px; right: var(--gutter); border-bottom-width: 1px; border-right-width: 1px; }

.ruler {
  position: absolute;
  right: calc(var(--gutter) + 6px);
  top: 50%;
  width: 14px;
  height: 44vh;
  transform: translateY(-50%);
  background-image:
    linear-gradient(to bottom, var(--line-a4) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-a3) 1px, transparent 1px);
  background-size: 14px 40px, 7px 8px;
  background-repeat: repeat-y;
  background-position: right top, right top;
  border-right: 1px solid var(--line-a3);
}
.ruler-fill {
  position: absolute;
  right: -1px;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--line);
  box-shadow: 0 0 10px var(--line);
  transform: scaleY(0);
  transform-origin: top;
}

.crosshair { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s; }
.crosshair.is-on { opacity: 1; }
.ch-x, .ch-y, .ch-o { position: absolute; left: 0; top: 0; will-change: transform; }
.ch-x { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(127, 227, 255, 0.22) 20%, rgba(127, 227, 255, 0.22) 80%, transparent); }
.ch-y { width: 1px; height: 100%; background: linear-gradient(180deg, transparent, rgba(127, 227, 255, 0.22) 20%, rgba(127, 227, 255, 0.22) 80%, transparent); }
.ch-o {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid var(--line-a4);
  border-radius: 50%;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 1px;
  height: 64px;
  background: var(--line-a2);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  left: 0;
  top: -30%;
  width: 1px;
  height: 30%;
  background: var(--line);
  box-shadow: 0 0 8px var(--line);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 110%; } }

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 40px) var(--gutter) clamp(64px, 11vh, 120px);
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.hero-copy .tag {
  position: absolute;
  top: calc(var(--header-h) + 30px);
  left: calc(var(--gutter) + 38px);
}
.hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(46px, 7.4vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 600;
  color: var(--text);
}
.hero-copy h1 br { display: none; }
.h1-line { display: block; }
.hero-mark {
  position: relative;
  display: inline-block;
  font-style: normal;
  color: var(--line);
  text-shadow: 0 0 40px rgba(127, 227, 255, 0.35);
}
.mark-dim {
  position: absolute;
  left: 0;
  right: 0.12em;
  bottom: -0.2em;
  width: calc(100% - 0.12em);
  height: 0.16em;
  overflow: visible;
}
.mark-dim path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.js.motion .mark-dim path { stroke-dashoffset: 1; }
.mark-dim.is-drawn path { stroke-dashoffset: 0 !important; transition: stroke-dashoffset 1.3s var(--ease); }
.hero-copy .lead {
  max-width: 34ch;
  margin-top: clamp(26px, 3.4vh, 40px);
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}

/* ---------------------------------------------------------------- sheets */
.sheet {
  --sx: 50%;
  --sy: 0%;
  --spot: 0;
  position: relative;
  background: linear-gradient(180deg, rgba(14, 24, 44, 0.78), rgba(9, 15, 29, 0.86));
  border: 1px solid var(--line-a2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sheet::before {
  /* spotlight på kanten */
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--sx) var(--sy), rgba(127, 227, 255, 0.85), transparent 45%);
  -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(--spot);
  transition: opacity 0.4s;
  pointer-events: none;
}
.sheet::after {
  /* svag inre ljuskägla */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--sx) var(--sy), rgba(127, 227, 255, 0.07), transparent 55%);
  opacity: var(--spot);
  transition: opacity 0.4s;
  pointer-events: none;
}
.sheet > * { position: relative; z-index: 1; }
.corner {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.corner svg { width: 100%; height: 100%; overflow: visible; }
.corner path { fill: none; stroke: var(--line); stroke-width: 1; }
.corner.tl { top: -6px; left: -6px; }
.corner.tr { top: -6px; right: -6px; }
.corner.bl { bottom: -6px; left: -6px; }
.corner.br { bottom: -6px; right: -6px; }

.dim {
  position: absolute;
  left: 0;
  right: 0;
  top: -26px;
  height: 14px;
  pointer-events: none;
  overflow: visible;
}
.dim path {
  fill: none;
  stroke: var(--line-a4);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.js.motion .draw path,
.js.motion .draw line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js.motion .draw.is-drawn path,
.js.motion .draw.is-drawn line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }

/* ---------------------------------------------------------------- hero sheet (koll + anders) */
.hero-sheet {
  position: relative;
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  padding: clamp(56px, 8vh, 96px) var(--gutter) clamp(60px, 10vh, 120px);
  max-width: 1240px;
  margin: 0 auto;
}
.hero-koll { padding: clamp(28px, 3.4vw, 52px); border-radius: 4px; }
.koll-entry {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 clamp(24px, 3vw, 48px);
}
.koll-entry > .tag { grid-column: 1 / -1; margin-bottom: 28px; }
.koll-entry-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-a3) 20%, var(--line-a3) 80%, transparent);
}
.koll-q h2 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.035em; }
.koll-q > p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.koll-q-open { display: none; margin-top: 20px; }
.koll-q-body { margin-top: 22px; }
.koll-form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
input,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-a3);
  border-radius: 2px;
  background: rgba(5, 9, 18, 0.7);
  color: var(--text);
  font: 400 16.5px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder { color: #6f7f96; }
input:hover, textarea:hover { border-color: var(--line-a4); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--line);
  background: rgba(8, 16, 32, 0.9);
  box-shadow: 0 0 0 3px rgba(127, 227, 255, 0.14), 0 0 24px -6px rgba(127, 227, 255, 0.5);
}
.agar-doh-note { font-size: 13.5px; line-height: 1.55; color: var(--dim); color: #8e9cb2; }

.anders-trust {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 22px 28px;
  border-radius: 4px;
}
.anders-trust-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 32px; }
.anders-trust-copy p { max-width: 52ch; }
.anders-trust picture {
  position: relative;
  display: block;
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line-a3);
  background: #0e1628;
}
.anders-trust img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.95);
  mix-blend-mode: luminosity;
  opacity: 0.92;
}
.anders-trust-copy p { color: var(--muted); font-size: 16px; }
.anders-social { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.anders-social a { display: inline-flex; align-items: center; min-height: 44px; color: var(--line); }
.anders-social a:hover { color: var(--text); }

/* ---------------------------------------------------------------- chapters */
.home-story { position: relative; }
.home-chapters {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.home-chapter {
  --hl: 0;
  position: relative;
  border-top: 0;
}
.home-chapter::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line-a3);
  transform-origin: left;
}
.js.motion .home-chapter::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js.motion .home-chapter.is-in::before { transform: scaleX(1); }
.home-chapter:last-child { border-bottom: 1px solid var(--line-a2); }
.home-chapter-summary {
  position: relative;
  display: grid;
  grid-template-columns: clamp(96px, 12vw, 180px) minmax(0, 1fr) 56px;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding: clamp(30px, 4.4vw, 60px) 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-chapter-summary::-webkit-details-marker { display: none; }
.home-chapter-summary::after {
  /* skannerlinje vid hover/touch */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(127, 227, 255, 0.05) 40%, rgba(127, 227, 255, 0.09) 50%, transparent 60%);
  background-size: 250% 100%;
  background-position: 0% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.home-chapter-summary:hover::after,
.home-chapter.is-focus .home-chapter-summary::after { opacity: 1; animation: scan 1.6s var(--ease) forwards; }
@keyframes scan { from { background-position: 0% 0; } to { background-position: 100% 0; } }

.num-draw { width: 100%; height: auto; overflow: visible; }
.num-draw text {
  font: 300 76px/1 var(--sans);
  letter-spacing: -0.04em;
  fill: rgba(127, 227, 255, 0);
  stroke: var(--line);
  stroke-width: 0.8;
  paint-order: stroke;
  transition: fill 0.6s var(--ease);
}
.js.motion .num-draw text { stroke-dasharray: 260; stroke-dashoffset: 260; }
.js.motion .is-in .num-draw text { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease) 0.15s, fill 0.6s var(--ease); }
.home-chapter-summary:hover .num-draw text,
.home-chapter[open] .num-draw text,
.home-chapter.is-focus .num-draw text { fill: rgba(127, 227, 255, 0.16); }

.home-chapter-copy { display: grid; gap: 12px; }
.home-chapter-kicker {
  font-size: clamp(24px, 2.9vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 560;
  color: var(--text);
}
.kicker-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.kicker-num .acc { margin: 0 0.2em; }
.home-chapter-lede { max-width: 60ch; color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); }

.home-chapter-arrow {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line-a3);
  border-radius: 50%;
  transition: border-color 0.3s, background-color 0.3s, transform 0.6s var(--ease);
}
.home-chapter-arrow::before,
.home-chapter-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1px;
  margin: -0.5px 0 0 -9px;
  background: var(--line);
  transition: transform 0.6s var(--ease);
}
.home-chapter-arrow::after { transform: rotate(90deg); }
.home-chapter-summary:hover .home-chapter-arrow { border-color: var(--line); background: rgba(127, 227, 255, 0.06); }
.home-chapter[open] .home-chapter-arrow { transform: rotate(45deg); border-color: var(--line); }

.home-chapter-body {
  padding: 0 0 clamp(40px, 5vw, 72px) calc(clamp(96px, 12vw, 180px) + clamp(16px, 3vw, 48px));
}
details.is-animating { overflow: hidden; }

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  background: var(--line-a2);
  border: 1px solid var(--line-a2);
}
.service-list article {
  position: relative;
  padding: 26px 24px 30px;
  background: var(--bg-2);
  transition: background-color 0.4s;
}
.service-list article:hover { background: #0d1628; }
.service-list h3 { font-size: 22px; letter-spacing: -0.025em; }
.service-list h3 a { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; }
.service-list h3 a::after {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: rotate(45deg) translate(-2px, 2px);
  opacity: 0.6;
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.service-list article:hover h3 a::after { transform: rotate(45deg) translate(1px, -1px); opacity: 1; }
.service-list p { margin-top: 10px; color: var(--muted); font-size: 16px; }

.scope { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); }
.scope-full { grid-template-columns: 1fr; }
.scope > div > p + p { margin-top: 16px; }
.scope > div > p { color: var(--muted); font-size: 17.5px; }
.scope-full > div { display: grid; gap: 0; }
.scope-full > div > p {
  margin: 0 !important;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line-a2);
}
.scope-full > div > p:first-child { border-top: 1px dashed var(--line-a2); }
.scope-full .text-link { font-size: 19px; font-weight: 560; letter-spacing: -0.015em; }
.scope > div > .text-link { display: inline-block; margin-top: 22px; font-weight: 560; }

.scope ol {
  position: relative;
  margin: 0;
  padding: 0 0 0 0;
  list-style: none;
  display: grid;
  gap: 30px;
}
.scope ol::before {
  /* vertikal måttlinje mellan stegen */
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--line), var(--line-a3));
  transform-origin: top;
}
.js.motion .scope ol::before { transform: scaleY(0); transition: transform 1.6s var(--ease) 0.2s; }
.js.motion .home-chapter[open] .scope ol::before { transform: scaleY(1); }
.scope li { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; }
.scope li small {
  position: relative;
  padding-left: 30px;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.scope li small::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 50%;
}
.scope li h3 { font-size: 21px; letter-spacing: -0.02em; }
.scope li p { margin-top: 6px; color: var(--muted); font-size: 16px; }

.faq-list { display: grid; border-top: 1px solid var(--line-a2); max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--line-a2); }
.faq-list summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 14px 44px 14px 0;
  list-style: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 540;
  letter-spacing: -0.015em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
  transition: transform 0.5s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq-list details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* ---------------------------------------------------------------- contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(110px, 16vh, 200px) var(--gutter) clamp(90px, 14vh, 160px);
}
.contact h2 {
  margin-top: 22px;
  font-size: clamp(42px, 5.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.contact h2 em {
  position: relative;
  display: inline-block;
  font-style: normal;
  color: var(--line);
  text-shadow: 0 0 40px rgba(127, 227, 255, 0.3);
}
.contact-copy > p:last-child { margin-top: 26px; max-width: 42ch; color: var(--muted); font-size: 18px; }
.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3vw, 44px);
  border-radius: 4px;
}
.contact-form .btn { justify-self: start; margin-top: 6px; }
.contact-form small { color: #8e9cb2; font-size: 13.5px; line-height: 1.55; }
.contact-form small a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-a4); text-underline-offset: 3px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- footer = ritningsstämpel */
.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  grid-template-areas:
    "brand addr contact nav"
    "copy copy copy nav";
  max-width: 1440px;
  margin: 0 auto clamp(16px, 3vw, 40px);
  border: 1px solid var(--line-a3);
  width: calc(100% - 2 * var(--gutter));
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  background: rgba(8, 13, 25, 0.8);
}
.site-footer > * { padding: 26px 24px; border-right: 1px solid var(--line-a2); }
.site-footer .brand-logo-footer { grid-area: brand; width: auto; }
.site-footer .brand-logo-footer img { width: 180px; }
.site-footer > p { grid-area: addr; }
.site-footer > div { grid-area: contact; }
.site-footer > div a, .footer-nav a { transition: color 0.3s; }
.site-footer > div a:hover, .footer-nav a:hover { color: var(--line); }
.footer-nav { grid-area: nav; border-right: 0; font-size: 14.5px; }
.footer-nav a.acc { color: var(--line); }
.site-footer small {
  grid-area: copy;
  border-top: 1px solid var(--line-a2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8e9cb2;
}

/* ---------------------------------------------------------------- reveals */
.js.motion .rv { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js.motion .rv.is-in { opacity: 1; transform: none; }

/* rubriken syns från start; introt tonar in raderna (reserv: synlig efter 2,5 s om skripten uteblir) */
.js.motion .hero-copy .h1-line,
.js.motion .hero-copy .lead { opacity: 0; animation: rit-show 0.6s 2.5s forwards; }
@keyframes rit-show { to { opacity: 1; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .site-header .small { display: none; }

}

@media (max-width: 850px) {
  :root { --header-h: 104px; }
  .site-header {
    flex-wrap: wrap;
    align-content: center;
    gap: 0;
    padding-top: 6px;
  }
  .brand-logo { width: 116px; }
  .site-header nav {
    order: 3;
    width: 100%;
    margin: 0 -8px;
    gap: 0;
    font-size: 11.5px;
    letter-spacing: 0.03em;
    justify-content: space-between;
  }
  .site-header nav a { padding: 0 8px; }
  .site-header.is-solid { background: rgba(7, 11, 20, 0.9); }
  .site-header nav a::after { left: 8px; right: 8px; bottom: 11px; }

  .hero-copy { padding-bottom: 72px; }
  .hero-copy .tag { left: calc(var(--gutter) + 30px); top: calc(var(--header-h) + 22px); }
  .stage-scrim {
    background: linear-gradient(0deg, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.86) 36%, rgba(7, 11, 20, 0) 62%);
  }
  .ruler { height: 30vh; top: 38%; }

  .koll-entry { grid-template-columns: 1fr; }
  .koll-entry-divider { width: auto; height: 1px; margin: 30px 0; background: linear-gradient(90deg, transparent, var(--line-a3) 20%, var(--line-a3) 80%, 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; }

  .home-chapter-summary { grid-template-columns: minmax(0, 1fr) 44px; gap: 14px; padding: 26px 0; align-items: start; }
  .num-draw { display: none; }
  .home-chapter-arrow { width: 44px; height: 44px; margin-top: 2px; }
  .home-chapter-body { padding-left: 0; }
  .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";
  }
  .site-footer > * { border-right: 0; border-bottom: 1px solid var(--line-a2); }
  .site-footer > p { border-right: 1px solid var(--line-a2); }
  .footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; align-items: start; }
  .footer-nav br { display: none; }
  .footer-nav a { display: flex; align-items: center; min-height: 40px; line-height: 1.3; }
  .site-footer small { border-top: 0; border-bottom: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .hero-copy h1 { font-size: 45px; letter-spacing: -0.04em; }
  .hero-copy .lead { font-size: 16.5px; margin-top: 20px; }
  .hero-koll { padding: 26px 20px; }
  .anders-trust { grid-template-columns: 76px minmax(0, 1fr); padding: 20px; gap: 16px; }
  .anders-trust picture { width: 76px; }
  .home-chapter-kicker { font-size: 23px; }
  .scope li { grid-template-columns: 1fr; gap: 6px; }
  .scope li > div { padding-left: 30px; }
  .scope ol::before { left: 18px; }
  .site-footer { grid-template-columns: 1fr; grid-template-areas: "brand" "addr" "contact" "nav" "copy"; }
  .site-footer > p { border-right: 0; }
  .contact h2 { font-size: 42px; }
}

@media (hover: none) {
  .crosshair .ch-o { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .scroll-cue { display: none; }
  .stage-scrim { opacity: 1; }
  .ritning { opacity: 1; }
}

.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);
}
