/* Kodelig — Lumen 2 (scroll-world)
   Front page: the scroll-scrubbed flight (scrub-engine.js builds the DOM).
   Subpages: .lp-* — the same world, held still and dimmed behind the text. */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk.woff2') format('woff2');
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/karla.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
}

/* The engine declares its own defaults directly on .sw-root (inside @layer sw),
   so the tokens are repeated on .sw-root here, not only on :root. */
:root, .kdlg-world, .sw-root {
  --sw-bg: #0B1A28;
  --sw-bg-2: #13293E;
  --sw-ink: #F4F6F5;
  --sw-ink-2: #D6DEE5;
  --sw-ink-soft: #92A5B8;
  --sw-accent: #E8A855;
  --sw-line: rgba(244, 246, 245, 0.12);
  --sw-font-display: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
  --sw-font-body: 'Karla', 'Segoe UI', system-ui, sans-serif;
  --sw-font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sw-gutter: clamp(18px, 5vw, 64px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: #0B1A28;
  color: #F4F6F5;
  font-family: var(--sw-font-body);
  overflow-x: hidden;
}
body { -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in srgb, #E8A855 60%, transparent); color: #0B1A28; }

.kdlg-skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 2147483001;
  background: #E8A855; color: #0B1A28; padding: .6rem 1rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: top .2s ease;
}
.kdlg-skip:focus { top: 1rem; }

/* ---------- preloader (desktop only; see functions.php) ---------- */
#kdlg-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 50% at 50% 46%, rgba(232, 168, 85, 0.08), transparent 70%),
    var(--sw-bg);
  opacity: 1;
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}
html:not(.js) #kdlg-preloader { display: none; }
#kdlg-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.kdlg-preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.kdlg-preloader-mark {
  width: 2.5rem;
  height: 2.5rem;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTIgMjQgTDkgMTMgTDEzIDE5IEwxOCA4IEwyNCAxOSBMMzAgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0U4QTg1NSIgc3Ryb2tlLXdpZHRoPSIyLjI1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=') center / contain no-repeat;
  animation: kdlg-breathe 3.2s ease-in-out infinite;
}
@keyframes kdlg-breathe { 0%, 100% { opacity: .55; transform: translateY(2px); } 50% { opacity: 1; transform: none; } }
.kdlg-preloader-track { width: 10rem; height: 2px; border-radius: 999px; background: rgba(244, 246, 245, 0.12); overflow: hidden; }
.kdlg-preloader-bar { height: 100%; width: 0%; background: var(--sw-accent); border-radius: 999px; transition: width 380ms ease; }
.kdlg-preloader-label {
  margin: 0;
  font-family: var(--sw-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sw-ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  #kdlg-preloader { transition: none; }
  .kdlg-preloader-mark { animation: none; }
}

.kdlg-world { width: 100%; min-height: 100vh; }

/* ---------- static fallback (no JS / engine failed) ---------- */
.sw-static { display: none; }
html:not(.js) .sw-static, html.sw-failed .sw-static { display: block; }
html:not(.js) .kdlg-world, html.sw-failed .kdlg-world { min-height: 0; }
.sw-static { max-width: 72rem; margin: 0 auto; padding: 7rem var(--sw-gutter) 6rem; }
.sw-static__item { display: grid; gap: 1.5rem 3rem; align-items: center; margin: 0 0 5rem; }
@media (min-width: 900px) { .sw-static__item { grid-template-columns: 1.15fr 1fr; } }
.sw-static__item img { display: block; width: 100%; height: auto; aspect-ratio: 1800 / 1196; object-fit: cover; border-radius: 18px; }
.sw-static__num { font-family: var(--sw-font-mono); font-size: .74rem; letter-spacing: .14em; color: var(--sw-ink-soft); }
.sw-static__eyebrow { display: block; margin-top: 1rem; font-family: var(--sw-font-display); font-weight: 700; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: #F0C383; }
.sw-static h2 { font-family: var(--sw-font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -.02em; margin: .6rem 0 0; }
.sw-static p { font-size: 1.1rem; line-height: 1.6; color: var(--sw-ink-2); max-width: 42ch; }
.sw-static ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1.25rem 0 0; }
.sw-static li { font-size: .82rem; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--sw-line); }

/* ---------- the flight: chrome ---------- */
.sw-brand { color: var(--sw-ink); }
.sw-brand__mark {
  background-color: rgba(11, 26, 40, 0.55) !important;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTIgMjQgTDkgMTMgTDEzIDE5IEwxOCA4IEwyNCAxOSBMMzAgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0U4QTg1NSIgc3Ryb2tlLXdpZHRoPSIyLjI1IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=') !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 62% !important;
  border: 1px solid color-mix(in srgb, var(--sw-accent) 45%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .6s ease;
}
.sw-brand__name { letter-spacing: -0.01em; }

/* Room for the page menu (.kdlg-menu) at the right end of the bar. */
.sw-topbar { padding-right: calc(var(--sw-gutter) + 96px); }
.sw-nav {
  background: rgba(11, 26, 40, 0.42);
  border: 1px solid var(--sw-line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.sw-nav__item { color: #C9D3DC; }
.sw-nav__item:hover, .sw-nav__item:focus-visible { color: #fff; outline: none; }
.sw-nav__item.is-active { color: #0B1A28; background: color-mix(in srgb, var(--sw-accent) 72%, #fff); }
.sw-nav__item:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }

.sw-route { position: fixed; right: clamp(14px, 2.4vw, 30px); top: 50%; z-index: 40; transform: translateY(-50%); display: flex; flex-direction: column; gap: 22px; padding: 18px 10px; }
.sw-route::before { content: ""; position: absolute; left: 50%; top: 22px; bottom: 22px; width: 1px; transform: translateX(-50%); background: linear-gradient(transparent, rgba(244, 246, 245, .28), transparent); }
.sw-route__dot { position: relative; border: 0; background: transparent; cursor: pointer; width: 14px; height: 14px; display: grid; place-items: center; padding: 0; }
.sw-route__dot i { width: 7px; height: 7px; border-radius: 50%; background: rgba(244, 246, 245, .38); transition: transform .5s ease, background-color .5s ease, box-shadow .5s ease; }
.sw-route__dot:hover i { transform: scale(1.3); background: var(--sw-accent); }
.sw-route__dot.is-active i { background: var(--sw-accent); transform: scale(1.5); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sw-accent) 22%, transparent), 0 0 18px color-mix(in srgb, var(--sw-accent) 60%, transparent); }
.sw-route__dot:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 4px; border-radius: 50%; }
.sw-route__label {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%) translateX(6px);
  white-space: nowrap; font-size: .76rem; font-weight: 600; letter-spacing: .02em;
  color: var(--sw-ink) !important;
  background: rgba(11, 26, 40, 0.55); border: 1px solid var(--sw-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 5px 11px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .5s ease;
}
.sw-route__dot:hover .sw-route__label, .sw-route__dot.is-active .sw-route__label { opacity: 1; transform: translateY(-50%) translateX(0); }

.sw-scrollbar { background: rgba(244, 246, 245, 0.06); }

/* ---------- the flight: copy ---------- */
/* A deep, soft scrim on the copy side so text contrast never depends on the
   frame behind it (no text-shadow tricks). */
.sw-copylayer::before {
  content: ""; position: absolute; inset: 0; width: min(68vw, 980px);
  background: linear-gradient(90deg,
    rgba(11, 26, 40, 0.94) 0%, rgba(11, 26, 40, 0.88) 36%,
    rgba(11, 26, 40, 0.52) 64%, rgba(11, 26, 40, 0.16) 86%, rgba(11, 26, 40, 0) 100%);
  opacity: calc(0.25 + 0.75 * var(--sw-copy, 1));
}
.sw-copy {
  left: calc(var(--sw-gutter) + 4px);
  top: 50%;
  transform: translateY(-50%);
  width: min(40vw, 520px);
  --wspan: 5;
}
.sw-copy__num {
  display: inline-flex; align-items: center; gap: .7em;
  font-family: var(--sw-font-mono); font-size: .72rem; letter-spacing: .16em; color: var(--sw-ink-soft);
}
.sw-copy__num::after { content: ""; width: 2.5rem; height: 1px; background: color-mix(in srgb, var(--sw-accent) 70%, transparent); }
.sw-copy__eyebrow {
  display: block; margin-top: 20px;
  font-family: var(--sw-font-display); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: color-mix(in srgb, var(--sw-accent) 72%, #fff);
  transform: translate3d(0, calc(var(--d, 0) * 2.2vh), 0);
}
.sw-copy__title {
  font-family: var(--sw-font-display); font-weight: 700; color: var(--sw-ink);
  font-size: clamp(2.3rem, 4.5vw, 4.1rem); line-height: 1.02; letter-spacing: -0.025em;
  margin: 14px 0 0; text-wrap: balance;
  transform: translate3d(0, calc(var(--d, 0) * 3.6vh), 0);
}
.sw-copy__body {
  margin: 22px 0 0; font-size: clamp(1.02rem, 1.2vw, 1.16rem); line-height: 1.62; color: var(--sw-ink-2);
  max-width: 40ch; text-wrap: pretty;
  transform: translate3d(0, calc(var(--d, 0) * 5.2vh), 0);
}
.sw-copy__tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0;
  transform: translate3d(0, calc(var(--d, 0) * 6.4vh), 0);
}
.sw-copy__tags li {
  font-size: .82rem; font-weight: 600; color: var(--sw-ink);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(244, 246, 245, 0.06);
  border: 1px solid color-mix(in srgb, var(--sw-accent) 48%, transparent);
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease;
}
.sw-copy__tags li:hover, .sw-copy__tags li:focus-visible {
  background: color-mix(in srgb, var(--sw-accent) 22%, transparent);
  border-color: var(--sw-accent);
  outline: none;
}
.sw-copy__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; pointer-events: inherit !important; }
.sw-btn { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 14px 26px; border-radius: 999px; transition: filter .3s ease, box-shadow .3s ease; }
.sw-btn--primary { background: color-mix(in srgb, var(--sw-accent) 72%, #fff); color: #0B1A28; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--sw-accent) 70%, transparent); }
.sw-btn--primary:hover { filter: brightness(1.08); box-shadow: 0 14px 36px -10px color-mix(in srgb, var(--sw-accent) 85%, transparent); }
.sw-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Word-by-word reveal. --p (0..1) is the section's visibility, set by the engine
   from the camera position; each word/unit (--i of --n) eases in over a
   five-unit window. Hidden from the very first paint (the article itself starts
   at opacity 0), so nothing can show finished and then re-animate. */
.sw-w, .sw-u {
  display: inline-block;
  --wp: clamp(0, (var(--p, 0) * (var(--n, 1) + var(--wspan)) - var(--i, 0)) / var(--wspan), 1);
  opacity: var(--wp);
  transform: translate3d(0, calc((1 - var(--wp)) * 0.42em), 0);
  filter: blur(calc((1 - var(--wp)) * 6px));
}
.sw-copy__cta.sw-u { display: flex; }
.sw-copy__eyebrow .sw-u { display: inline; }
.sw-copy.is-live .sw-w, .sw-copy.is-live .sw-u { will-change: auto; }

.sw-hint { color: var(--sw-ink-soft); font-family: var(--sw-font-mono); }

@media (max-width: 860px) {
  .sw-nav { display: none; }
  .sw-topbar { padding-right: calc(var(--sw-gutter) + 90px); }
  .sw-copylayer::before {
    width: 100%; height: 78%; top: auto; bottom: 0;
    background: linear-gradient(0deg, rgba(11, 26, 40, 0.96) 0%, rgba(11, 26, 40, 0.9) 42%, rgba(11, 26, 40, 0.55) 68%, rgba(11, 26, 40, 0) 100%);
  }
  .sw-copy {
    left: var(--sw-gutter); right: calc(var(--sw-gutter) + 18px); top: auto; width: auto; max-width: 560px;
    bottom: calc(clamp(72px, 13dvh, 120px) + env(safe-area-inset-bottom));
    transform: none;
  }
  .sw-copy__title { font-size: clamp(2rem, 8.4vw, 2.8rem); }
  .sw-copy__body { max-width: none; font-size: clamp(1rem, 4vw, 1.1rem); margin-top: 16px; }
  .sw-copy__tags { margin-top: 20px; }
  .sw-copy__eyebrow, .sw-copy__title, .sw-copy__body, .sw-copy__tags { transform: none; }
  /* Lighter on phones: no per-word blur (opacity + lift only). */
  .sw-w, .sw-u { filter: none; }
  .sw-scene__video, .sw-scene__still { object-position: center 44%; }
  .sw-hint { bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sw-route { gap: 16px; right: 4px; padding: 14px 6px; }
  .sw-route__label { display: none; }
}
@media (hover: none) and (pointer: coarse) {
  .sw-route__dot { width: 26px; height: 26px; }
  .sw-btn { padding: 15px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-w, .sw-u { opacity: 1 !important; transform: none !important; filter: none !important; }
  .sw-copy__eyebrow, .sw-copy__title, .sw-copy__body, .sw-copy__tags { transform: none !important; }
}

/* ---------- page menu (front + subpages; works without JS via <details>) ---------- */
.kdlg-menu {
  position: fixed;
  top: clamp(14px, 2.4vw, 26px);
  right: var(--sw-gutter);
  z-index: 70;
  font-family: var(--sw-font-body);
}
.kdlg-menu > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 38px; padding: 0 16px 0 14px;
  border-radius: 999px;
  background: rgba(11, 26, 40, 0.5);
  border: 1px solid var(--sw-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--sw-ink); font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease;
}
.kdlg-menu > summary::-webkit-details-marker { display: none; }
.kdlg-menu[open] { z-index: 2147483001; }
.kdlg-menu > summary:hover, .kdlg-menu[open] > summary { border-color: color-mix(in srgb, #E8A855 60%, transparent); }
.kdlg-menu > summary:focus-visible { outline: 2px solid #E8A855; outline-offset: 3px; }
.kdlg-menu__icon { position: relative; width: 14px; height: 10px; }
.kdlg-menu__icon::before, .kdlg-menu__icon::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .35s ease, top .35s ease; }
.kdlg-menu__icon::before { top: 1px; }
.kdlg-menu__icon::after { top: 7px; }
.kdlg-menu[open] .kdlg-menu__icon::before { top: 4px; transform: rotate(45deg); }
.kdlg-menu[open] .kdlg-menu__icon::after { top: 4px; transform: rotate(-45deg); }
.kdlg-menu__panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 15.5rem; margin: 0; padding: .5rem; list-style: none;
  border-radius: 18px;
  background: rgba(15, 33, 50, 0.88);
  border: 1px solid var(--sw-line);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  transform-origin: top right;
  animation: kdlg-menu-in .35s cubic-bezier(.2, .7, .2, 1);
}
@keyframes kdlg-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.kdlg-menu__panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem .9rem; border-radius: 12px;
  color: var(--sw-ink-2); text-decoration: none; font-size: .95rem;
  transition: background-color .25s ease, color .25s ease;
}
.kdlg-menu__panel a::after { content: "→"; opacity: .4; transition: opacity .25s ease, transform .25s ease; }
.kdlg-menu__panel a:hover, .kdlg-menu__panel a:focus-visible { background: rgba(244, 246, 245, 0.07); color: #fff; outline: none; }
.kdlg-menu__panel a:hover::after { opacity: 1; transform: translateX(2px); }
.kdlg-menu__panel a[aria-current="page"] { color: #F0C383; }
@media (prefers-reduced-motion: reduce) { .kdlg-menu__panel { animation: none; } }

/* ---------- tag popover + modals (front page) ---------- */
/* Topic-tag info popover */
.kdlg-tagpop {
  position: fixed;
  z-index: 2147483000;
  max-width: 15.5rem;
  background: #13293E;
  color: #F4F6F5;
  font-family: var(--sw-font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(11, 26, 40, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.kdlg-tagpop::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #13293E;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
.kdlg-tagpop--below::after { bottom: auto; top: -6px; }

/* Portfolio project popup */
.portfolio-modal { overflow: hidden; }
.portfolio-modal .contact-window { width: min(30rem, calc(100vw - 2.5rem)); }
.portfolio-modal-media {
  margin: -1.5rem -1.5rem 0;
}
.portfolio-modal-media img { display: block; width: 100%; height: auto; }
.portfolio-modal-tag {
  margin: 1.25rem 1.5rem 0;
  font-family: var(--sw-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E8A855;
}
.portfolio-modal-heading {
  margin: 0.4rem 1.5rem 0;
  font-family: var(--sw-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #F4F6F5;
}
.portfolio-modal-desc {
  margin: 0.75rem 1.5rem 1.5rem;
  color: #92A5B8;
  font-size: 0.95rem;
  line-height: 1.55;
}
.portfolio-modal-desc p { margin: 0 0 0.75rem; }
.portfolio-modal .btn--accent { margin: 0 1.5rem 1.5rem; }

/* ---------- contact modal (Lumen) ---------- */

.contact-modal {
  border: none;
  padding: 0;
  border-radius: 16px;
  background: #13293E;
  color: #F4F6F5;
  width: min(34rem, calc(100vw - 2.5rem));
  max-height: min(46rem, calc(100vh - 4rem));
  box-shadow: 0 30px 60px -15px rgba(11, 26, 40, 0.6);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.28s ease, transform 0.28s ease;
  font-family: var(--sw-font-body);
}
.contact-modal.is-open { opacity: 1; transform: none; }
.contact-modal::backdrop {
  background: rgba(11, 26, 40, 0.7);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.contact-modal.is-open::backdrop { opacity: 1; }

.contact-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #1C384F;
}
.contact-window-title {
  margin: 0;
  font-family: var(--sw-font-display);
  font-weight: 700;
  color: #F4F6F5;
}
.contact-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: #92A5B8;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
}
.contact-close:hover, .contact-close:focus-visible { color: #E8A855; }

.contact-body { padding: 1.5rem; overflow-y: auto; }

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-family: var(--sw-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92A5B8;
  margin-bottom: 0.5rem;
}
.field-optional { text-transform: none; letter-spacing: normal; }
.field input, .field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid #1C384F;
  background: transparent;
  padding: 0.5rem 0;
  font-family: var(--sw-font-body);
  font-size: 1rem;
  color: #F4F6F5;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: #E8A855;
}

.contact-form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn--accent {
  font-family: var(--sw-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #E8A855;
  color: #0B1A28;
  transition: transform 0.2s, filter 0.2s;
}
.btn--accent:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn--accent:disabled { opacity: 0.6; cursor: default; transform: none; }
.contact-status {
  margin: 0;
  font-size: 0.875rem;
  color: #92A5B8;
}
.contact-status[data-state="error"] { color: #E2604F; }

.contact-success-heading {
  font-family: var(--sw-font-display);
  font-weight: 700;
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
  color: #F4F6F5;
}
.contact-success p:last-child { color: #92A5B8; margin: 0; }


/* ==========================================================================
   Subpages (.lp-*) — the world held still behind glass.
   A dimmed scene from the flight sits fixed behind the page; it dollies in very
   slowly as you scroll (scroll-driven, compositor only) and a warm light drifts
   across it. Text sits on frosted night-blue panels for steady contrast.
   ========================================================================== */
.lp { position: relative; min-height: 100vh; isolation: isolate; }
.lp-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0B1A28; pointer-events: none; }
.lp-bg__img {
  position: absolute; inset: -4%; width: 108%; height: 108%;
  object-fit: cover; object-position: center 42%;
  opacity: .6; filter: saturate(1.08) blur(1.5px);
  transform: scale(1.02);
  transform-origin: 50% 46%;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .lp-bg__img { animation: lp-dolly linear both; animation-timeline: scroll(root); }
    @keyframes lp-dolly { from { transform: scale(1.02); opacity: .62; } to { transform: scale(1.14) translateY(-1.5%); opacity: .36; } }
  }
}
.lp-bg::before {
  /* tilt-shift: the top and bottom of the diorama fall out of focus */
  content: ""; position: absolute; inset: 0; z-index: 1;
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 34%, transparent 62%, #000 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 34%, transparent 62%, #000 100%);
}
.lp-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(11, 26, 40, 0.35) 0%, rgba(11, 26, 40, 0.82) 70%, #0B1A28 100%),
    linear-gradient(180deg, rgba(11, 26, 40, 0.55), rgba(11, 26, 40, 0.75));
}
.lp-bg__light {
  position: absolute; z-index: 3; width: 70vmax; height: 70vmax; left: -20vmax; top: -38vmax; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lp-accent, #E8A855) 30%, transparent), transparent);
  mix-blend-mode: screen; opacity: .7;
  animation: lp-light 46s ease-in-out infinite alternate;
}
@keyframes lp-light { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(70vw, 6vh, 0); } }
@media (prefers-reduced-motion: reduce) { .lp-bg__light { animation: none; } }

.lp-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 1.5rem;
  padding: clamp(14px, 2.4vw, 26px) calc(var(--sw-gutter) + 96px) clamp(14px, 2.4vw, 26px) var(--sw-gutter);
  background: linear-gradient(180deg, rgba(11, 26, 40, 0.95) 0%, rgba(11, 26, 40, 0.82) 62%, rgba(11, 26, 40, 0) 100%);
}
.lp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sw-ink); text-decoration: none; font-family: var(--sw-font-display); font-weight: 700; font-size: 1.1rem; }
.lp-brand .sw-brand__mark { display: inline-block; width: 28px; height: 28px; border-radius: 8px; }
.lp-links { display: flex; gap: 2px; margin-left: auto; padding: 4px; border-radius: 999px; background: rgba(11, 26, 40, 0.42); border: 1px solid var(--sw-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.lp-links a { color: #C9D3DC; text-decoration: none; font-size: .84rem; padding: 7px 14px; border-radius: 999px; transition: color .3s ease, background-color .3s ease; }
.lp-links a:hover, .lp-links a:focus-visible { color: #fff; outline: none; }
.lp-links a[aria-current="page"] { color: #0B1A28; background: var(--lp-accent, #E8A855); }
@media (max-width: 980px) { .lp-links { display: none; } }

.lp-main { position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: clamp(7.5rem, 16vh, 10rem) var(--sw-gutter) 8rem; }
.lp-hero { max-width: 46rem; margin: 0 0 clamp(3rem, 8vh, 5rem); }
.lp-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin: 0 0 1.4rem; font-family: var(--sw-font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sw-ink-soft);
}
.lp-crumb a { color: var(--sw-ink-soft); text-decoration: none; }
.lp-crumb a:hover { color: #fff; }
.lp-crumb::after { content: ""; width: 2.5rem; height: 1px; background: color-mix(in srgb, var(--lp-accent, #E8A855) 70%, transparent); order: 9; }
.lp-title {
  margin: 0; font-family: var(--sw-font-display); font-weight: 700; color: var(--sw-ink);
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance;
}
.lp-lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.65; color: var(--sw-ink-2); }
.lp-lede p { margin: 0 0 1rem; }
.lp-lede a, .lp-prose a { color: #F0C383; text-underline-offset: .18em; }

.lp-glass {
  position: relative;
  background: rgba(13, 30, 46, 0.72);
  border: 1px solid var(--sw-line);
  border-radius: 22px;
  backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.7);
}
.lp-section { margin: 0 0 clamp(4rem, 10vh, 6.5rem); }
.lp-label { margin: 0 0 1rem; font-family: var(--sw-font-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: #F0C383; }
.lp-h2 { margin: 0 0 2rem; font-family: var(--sw-font-display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }

/* Generic content pages (Personvern …) */
.lp-prose { max-width: 46rem; padding: clamp(1.5rem, 4vw, 3rem); font-size: 1.05rem; line-height: 1.75; color: var(--sw-ink-2); }
.lp-prose > :first-child { margin-top: 0; }
.lp-prose h2, .lp-prose h3 { font-family: var(--sw-font-display); color: var(--sw-ink); line-height: 1.25; letter-spacing: -0.01em; }
.lp-prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 2.4rem 0 .9rem; }
.lp-prose h3 { font-size: 1.12rem; margin: 2rem 0 .7rem; }
.lp-prose p, .lp-prose ul, .lp-prose ol { margin: 0 0 1.15rem; }
.lp-prose ul, .lp-prose ol { padding-left: 1.3rem; }
.lp-prose li { margin-bottom: .45rem; }
.lp-prose strong { color: var(--sw-ink); }
.lp-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.lp-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lp-prose th, .lp-prose td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--sw-line); vertical-align: top; }

/* Tjenester */
.lp-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.lp-offer { display: flex; flex-direction: column; height: 100%; padding: 1.6rem 1.5rem 1.4rem; transition: border-color .4s ease, transform .4s ease; }
.lp-offer:hover { border-color: color-mix(in srgb, var(--lp-accent, #E8A855) 50%, transparent); }
.lp-offer svg { width: 28px; height: 28px; color: #F0C383; margin-bottom: 1.2rem; }
.lp-offer h3 { margin: 0 0 .7rem; font-family: var(--sw-font-display); font-size: 1.18rem; line-height: 1.25; letter-spacing: -0.01em; color: var(--sw-ink); }
.lp-offer p { margin: 0 0 1.4rem; color: var(--sw-ink-2); line-height: 1.6; font-size: .98rem; }
.lp-offer a { margin-top: auto; color: #F0C383; text-decoration: none; font-weight: 600; font-size: .92rem; }
.lp-offer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.lp-steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); counter-reset: none; }
.lp-step { padding: 1.6rem 1.6rem 1.3rem; }
.lp-step__num { display: block; font-family: var(--sw-font-mono); font-size: .8rem; letter-spacing: .1em; color: #F0C383; margin-bottom: .9rem; }
.lp-step h3 { margin: 0 0 .6rem; font-family: var(--sw-font-display); font-size: 1.22rem; color: var(--sw-ink); }
.lp-step__copy { color: var(--sw-ink-2); line-height: 1.62; }
.lp-step__copy p { margin: 0 0 .8rem; }

/* Priser */
.lp-prices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); align-items: stretch; }
.lp-price { padding: 1.8rem 1.6rem 1.5rem; display: flex; flex-direction: column; }
.lp-price h2 { margin: 0 0 1rem; font-family: var(--sw-font-display); font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--sw-ink); }
.lp-price__amount { margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.lp-price__amount strong { font-family: var(--sw-font-display); font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; color: #F0C383; letter-spacing: -0.01em; }
.lp-price__amount span { font-size: .88rem; color: var(--sw-ink-soft); }
.lp-price__desc { color: var(--sw-ink-2); line-height: 1.62; font-size: .98rem; }
.lp-price__desc p { margin: 0 0 .8rem; }
.lp-price__desc ul { padding-left: 1.1rem; margin: 0 0 .8rem; }
.lp-price__desc li { margin-bottom: .35rem; }

/* Prosjekter (overrides the shared mu-plugin's neutral grid) */
.lp .kdlg-project-grid { gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); margin: 1.5rem 0 3rem; }
.lp .kdlg-project-card {
  opacity: 1; border-radius: 20px; background: rgba(13, 30, 46, 0.72); border: 1px solid var(--sw-line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .4s ease, box-shadow .4s ease;
}
.lp .kdlg-project-card:hover, .lp .kdlg-project-card:focus-visible { border-color: color-mix(in srgb, var(--lp-accent, #E8A855) 55%, transparent); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .8); outline: none; }
.lp .kdlg-project-media { aspect-ratio: 16 / 10; overflow: hidden; }
.lp .kdlg-project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.lp .kdlg-project-card:hover .kdlg-project-media img { transform: scale(1.04); }
.lp .kdlg-project-body { padding: 1.2rem 1.3rem 1.4rem; }
.lp .kdlg-project-tag { font-family: var(--sw-font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: 1; color: #F0C383; }
.lp .kdlg-project-card h3 { font-family: var(--sw-font-display); font-size: 1.15rem; color: var(--sw-ink); }
.lp .kdlg-project-card p { opacity: 1; color: var(--sw-ink-2); line-height: 1.55; }
.lp-projects h2 { font-family: var(--sw-font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .6rem; letter-spacing: -0.02em; }
.lp-projects > p { color: var(--sw-ink-2); }

/* Holder det ikke med Facebook? */
.lp-compare { padding: clamp(1rem, 3vw, 2rem); overflow: hidden; }
.lp-compare table { width: 100%; border-collapse: collapse; }
.lp-compare caption { text-align: left; padding: 0 .4rem 1.2rem; font-family: var(--sw-font-display); font-weight: 700; font-size: 1.15rem; color: var(--sw-ink); }
.lp-compare th, .lp-compare td { text-align: left; vertical-align: top; padding: 1rem .8rem; border-top: 1px solid var(--sw-line); line-height: 1.55; }
.lp-compare thead th { border-top: 0; font-family: var(--sw-font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sw-ink-soft); font-weight: 500; }
.lp-compare thead th:last-child { color: #F0C383; }
.lp-compare thead td { border-top: 0; }
.lp-compare tbody th { font-family: var(--sw-font-display); font-weight: 700; color: var(--sw-ink); width: 22%; }
.lp-compare tbody td { color: var(--sw-ink-soft); }
.lp-compare tbody td:last-child { color: var(--sw-ink); }
.lp-compare .digital-home-plus { color: #F0C383; font-weight: 700; }
.lp-compare .digital-home-mobile-label { display: none; }
@media (max-width: 760px) {
  .lp-compare thead { display: none; }
  .lp-compare tr { display: block; padding: 1rem .2rem; border-top: 1px solid var(--sw-line); }
  .lp-compare tbody th, .lp-compare tbody td { display: block; width: auto; border: 0; padding: .3rem .4rem; }
  .lp-compare .digital-home-mobile-label { display: block; font-family: var(--sw-font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sw-ink-soft); margin: .4rem 0 .15rem; }
  .lp-compare tbody td:last-child .digital-home-mobile-label { color: #F0C383; }
}
.lp-details { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.lp-details > div { padding: 1.8rem 1.7rem 1.2rem; color: var(--sw-ink-2); line-height: 1.65; }
.lp-details h2 { margin: 0 0 1rem; font-family: var(--sw-font-display); font-size: 1.3rem; line-height: 1.25; color: var(--sw-ink); }
.lp-details p { margin: 0 0 1rem; }
.lp-takeaway { margin: clamp(3rem, 8vh, 5rem) 0 0; font-family: var(--sw-font-display); font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.lp-takeaway strong { font-weight: 700; color: var(--sw-ink); }

/* Reveal: hidden from the first paint only when JS is present (html.js), shown
   by pages.js as it scrolls into view; a CSS failsafe shows everything after
   3 s no matter what. */
html.js .lp-reveal { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); animation: lp-failsafe 0s linear 3s forwards; }
html.js .lp-reveal.is-in { opacity: 1; transform: none; filter: none; animation: none; transition: opacity 1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1), filter 1s ease; transition-delay: var(--lp-delay, 0s); }
@keyframes lp-failsafe { to { opacity: 1; transform: none; filter: none; } }
html.js .lp-title .lp-tw { display: inline-block; opacity: 0; transform: translate3d(0, .35em, 0); filter: blur(8px); animation: lp-word 1.1s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes lp-word { to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .lp-reveal, html.js .lp-reveal.is-in { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  html.js .lp-title .lp-tw { opacity: 1; transform: none; filter: none; animation: none; }
  .lp-bg__img { transform: scale(1.02); }
}
@media (max-width: 640px) {
  .lp-bg__img { filter: saturate(1.05); }
  .lp-bg::before { display: none; }
  .lp-glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(13, 30, 46, 0.9); }
  .lp .kdlg-project-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(13, 30, 46, 0.9); }
}

/* ---------- floating corner links (demo builder + privacy) ---------- */
.kdlg-float {
  position: fixed; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 2147483000;
  font-family: var(--sw-font-body); text-decoration: none; border-radius: 999px;
  transition: filter .3s ease, background-color .3s ease, color .3s ease;
}
.kdlg-float--demo {
  right: 1rem; font-size: .82rem; font-weight: 700; color: #0B1A28; background: #E8A855;
  padding: .55rem 1rem; box-shadow: 0 8px 24px -8px rgba(232, 168, 85, .6), 0 4px 18px rgba(0, 0, 0, .3);
}
.kdlg-float--demo:hover { filter: brightness(1.08); }
.kdlg-float--privacy {
  left: 1rem; font-size: .76rem; color: #D6DEE5; text-decoration: underline; text-underline-offset: .18em;
  background: rgba(11, 26, 40, .62); border: 1px solid rgba(244, 246, 245, .1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: .38rem .7rem;
}
.kdlg-float--privacy:hover { color: #fff; }
.kdlg-float:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sw-static__brand { position: absolute; top: clamp(14px, 2.4vw, 26px); left: var(--sw-gutter); }

/* Demo + Nettsidesjekk as one stacked pair in the corner: the gold demo
   pill stays the primary action, the check is a quieter outline pill just
   above it, so the two read as "the free tools" rather than two strays. */
.kdlg-float-group {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 2147483000;
  display: flex; flex-direction: column; align-items: flex-end; gap: .45rem;
}
.kdlg-float-group .kdlg-float { position: static; }
.kdlg-float--nettsjekk {
  font-size: .76rem; font-weight: 600; color: #F6D9A8;
  background: rgba(11, 26, 40, .62); border: 1px solid rgba(232, 168, 85, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: .4rem .85rem;
}
.kdlg-float--nettsjekk:hover,
.kdlg-float--nettsjekk[aria-current="page"] { background: rgba(232, 168, 85, .18); color: #fff; }
.kdlg-float__short { display: none; }
/* Phones: stacked, the pair rose into the "scroll for å fly inn" hint -
   side by side in one row instead, with the short label. */
@media (max-width: 640px) {
  .kdlg-float-group { flex-direction: row; align-items: center; gap: .4rem; right: .75rem; }
  .kdlg-float__long { display: none; }
  .kdlg-float__short { display: inline; }
  .kdlg-float-group .kdlg-float--demo { padding-inline: .85rem; }
}
@media (max-width: 380px) {
  .kdlg-float--privacy { left: .75rem; }
}
@media (max-width: 345px) {
  .kdlg-float__arrow { display: none; }
}
