:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e3e8;
  --accent: #2f5bc8;
  --accent-soft: #e8eefc;
  --keycap: #f2f2f5;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #2e2e33;
    --accent: #86a8ff;
    --accent-soft: #1b2645;
    --keycap: #2a2a2e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Språk: innholdet finnes på begge språk, og html[lang] avgjør hva som vises. */
html[lang="nb"] [lang="en"], html[lang="en"] [lang="nb"] { display: none !important; }

header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
/* Veksler mellom appene, slik at sidene oppleves som ett nettsted. */
header.top .apps { display: flex; gap: 4px; }
header.top .apps a {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  border-radius: 999px; font-weight: 600; color: var(--muted);
}
header.top .apps a img { width: 26px; height: 26px; }
header.top .apps a:hover { color: var(--text); background: var(--keycap); text-decoration: none; }
header.top .apps a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.lang-toggle {
  font: inherit; font-size: 14px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; cursor: pointer;
}
.lang-toggle:hover { color: var(--text); }

.hero { text-align: center; padding-top: 48px; padding-bottom: 56px; }
.hero img { width: 160px; height: 160px; }
.hero h1 { font-size: clamp(40px, 8vw, 64px); line-height: 1.05; margin: 18px 0 10px; letter-spacing: -0.02em; }
.hero p.lede { font-size: clamp(19px, 3vw, 23px); color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.badge {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 16px;
}
.badge:hover { text-decoration: none; opacity: 0.88; }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--muted); }

section { padding: 48px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 30px; letter-spacing: -0.01em; margin: 0 0 8px; }
section > .wrap > p.intro { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; margin-bottom: 10px;
}
.step h3, .feature h3 { margin: 0 0 6px; font-size: 18px; }
.step p, .feature p { margin: 0; color: var(--muted); font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px 32px; }

/* Scene-illustrasjon: lerret med delt skjerm, kameralag og opptaksprikk, og scenene under. */
.stage {
  position: relative; aspect-ratio: 16 / 9; max-width: 640px; margin: 8px 0 14px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, #5b8cf0, #2a4fb0);
}
.stage .window {
  position: absolute; left: 7%; top: 12%; width: 52%; height: 66%;
  background: rgba(255, 255, 255, 0.94); border-radius: 10px; padding: 4% 4.5%;
}
.stage .window i { display: block; height: 7%; border-radius: 99px; background: rgba(42, 79, 176, 0.22); margin-top: 5.5%; }
.stage .window i:first-child { width: 22%; height: 5%; margin-top: 0; background: none;
  background-image: radial-gradient(circle, #ff5f57 40%, transparent 42%), radial-gradient(circle, #febc2e 40%, transparent 42%), radial-gradient(circle, #28c840 40%, transparent 42%);
  background-size: 33% 100%; background-repeat: no-repeat; background-position: 0 0, 50% 0, 100% 0; }
.stage .window i:nth-child(2) { width: 80%; background: rgba(42, 79, 176, 0.5); }
.stage .window i:nth-child(3) { width: 64%; }
.stage .window i:nth-child(4) { width: 86%; }
.stage .camera {
  position: absolute; right: 5%; bottom: 7%; width: 27%; aspect-ratio: 1;
  border-radius: 22%; border: 3px solid #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.92) 0 19%, transparent 19.5%),
    radial-gradient(ellipse 42% 36% at 50% 100%, rgba(255, 255, 255, 0.92) 0 99%, transparent 100%),
    linear-gradient(#ffb36b, #e2643a);
}
.stage .rec {
  position: absolute; right: 4%; top: 6%; display: flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.45);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
}
.stage .rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; }
.scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; font-size: 14px; }
.scenes > span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.scenes > span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scenes kbd { margin: 0 0 0 6px; font-size: 12px; min-width: 0; padding: 0 5px; }
.scenes > span.on kbd { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.35); color: #fff; }

table.keys { width: 100%; border-collapse: collapse; font-size: 16px; }
table.keys td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.keys td:first-child { width: 170px; white-space: nowrap; padding-right: 16px; }
table.keys tr.group td { border-bottom: none; padding-top: 22px; font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
kbd {
  display: inline-block; min-width: 26px; padding: 1px 7px; margin-right: 3px; text-align: center;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--keycap); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
}

dl.faq dt { font-weight: 600; margin-top: 20px; }
dl.faq dd { margin: 4px 0 0; color: var(--muted); }

.prose { max-width: 680px; }
.prose h1 { font-size: clamp(32px, 6vw, 44px); letter-spacing: -0.02em; margin: 32px 0 4px; line-height: 1.1; }
.prose .updated { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.prose .summary {
  background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; font-size: 18px; margin-bottom: 28px;
}
.prose h2 { font-size: 21px; margin: 32px 0 6px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }

/* Lenke til den andre appen fra samme utvikler. */
.other-app {
  display: flex; align-items: center; gap: 18px; max-width: 640px;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text);
}
.other-app:hover { text-decoration: none; border-color: var(--accent); }
.other-app img { width: 72px; height: 72px; flex: none; }
.other-app h3 { margin: 0 0 4px; font-size: 18px; }
.other-app p { margin: 0; color: var(--muted); font-size: 16px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 28px; padding-bottom: 40px; }
  .hero img { width: 120px; height: 120px; }
  table.keys td:first-child { width: 120px; }
  .other-app img { width: 56px; height: 56px; }
}
