/* ============================================================
   Zas Solutions — Premium utilitarian minimalism
   Warm monochrome paper + editorial serif + single cobalt spot accent
   Display: Newsreader (serif)  ·  Body/UI: Archivo  ·  Meta: Space Mono
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-latin.woff2') format('woff2');
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-latin-ext.woff2') format('woff2');
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader-latin-ext.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader-italic-latin.woff2') format('woff2');
  font-weight: 400 500; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/Newsreader-italic-latin-ext.woff2') format('woff2');
  font-weight: 400 500; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/SpaceMono-400-latin.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/SpaceMono-700-latin.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #f7f6f3;
  --paper-2: #fbfbfa;
  --card: #ffffff;
  --ink: #1a1a17;
  --ink-soft: #3a3a35;
  --muted: #6b6a66;
  --line: #e7e6e2;
  --line-2: #dededa;

  --modal-scrim: rgba(26, 26, 23, 0.4);
  --modal-shadow: 0 24px 60px -18px rgba(26, 26, 23, 0.28);

  --skeleton-base: #eceae6;
  --skeleton-sheen: rgba(255, 255, 255, 0.55);

  --accent: #2b4bf2;          /* electric cobalt — used sparingly */
  --accent-tint: #e7ecfd;     /* washed pale blue for label pills */
  --accent-ink: #1f39c4;      /* text on the tint */
  --accent-line: #d5ddfb;     /* border on tinted cells */
  --danger: #b3261e;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', monospace;

  --wrap: 1180px;
  --wrap-text: 940px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Dark theme ----------
   The page boots dark (html.theme-dark, set by an inline script + index.html).
   main.js drops the class once the hero has mostly scrolled past, and the
   token swap cross-fades the whole site to the light theme below. */
.theme-dark {
  color-scheme: dark;

  --paper: #121210;
  --paper-2: #1a1a17;
  --card: #1c1c19;
  --ink: #f2f1ec;
  --ink-soft: #c9c7c0;
  --muted: #928f87;
  --line: #2c2b27;
  --line-2: #3a3934;

  --modal-scrim: rgba(6, 6, 4, 0.62);
  --modal-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.6);

  --skeleton-base: #212120;
  --skeleton-sheen: rgba(255, 255, 255, 0.07);

  --accent: #4f6bff;
  --accent-tint: #1f2748;
  --accent-ink: #c2ccff;
  --accent-line: #33407a;
  --danger: #ff6b5e;
}

/* Elements near the fold cross-fade their colours on the theme swap; the rest
   flip instantly while off-screen (they carry their own component transitions).
   Gated on html.theme-ready — main.js adds that only AFTER the load-time theme
   is locked in, so a refresh partway down the page snaps straight to light with
   no fade. */
.theme-ready body,
.theme-ready .section,
.theme-ready .section + .section,
.theme-ready .manifest__statement,
.theme-ready .manifest__points,
.theme-ready .manifest__points li,
.theme-ready .site-footer,
.theme-ready .footer__fine {
  transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease),
    color 0.6s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Ambient warm depth so sections never read as flat */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 78% -8%, rgba(43, 75, 242, 0.05), transparent 70%),
    radial-gradient(50vw 40vh at 10% 8%, rgba(120, 110, 90, 0.04), transparent 70%);
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3.5rem); }

/* ---------- Typography primitives ---------- */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-tint);
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  margin-bottom: 1.25rem;
}

.section { padding-block: clamp(2.5rem, 6vw, 4.25rem); }
.section + .section { border-top: 1px solid var(--line); }

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 1.3rem + 3.1vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.section__title em { font-style: italic; }

.lead {
  margin-top: 1.5rem;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 5px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.12s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--ink-soft); }
.btn:active { transform: scale(0.98); }

.btn--secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--secondary:hover { background: var(--paper-2); border-color: var(--ink); }
.btn--sm { padding: 0.6rem 1rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

.btn__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid color-mix(in srgb, var(--paper) 35%, transparent);
  border-top-color: var(--paper);
  border-radius: 50%;
}
.btn.is-loading { cursor: default; }
.btn.is-loading .btn__spinner { display: inline-block; animation: btn-spin 0.7s linear infinite; }
.btn.is-loading .btn__label { opacity: 0.85; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-loading .btn__spinner { animation: none; opacity: 0.6; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: inline-flex; align-items: baseline; }
.brand__word { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav > a:not(.btn), .nav__link { font-size: 0.9375rem; color: var(--muted); transition: color 0.15s var(--ease); }
.nav > a:not(.btn):hover, .nav__link:hover { color: var(--ink); }
.nav__link { font-family: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* burger toggle — hidden until the mobile breakpoint */
.nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -11px;            /* optical align the bars to the container edge */
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), background-color 0.2s var(--ease);
}
.nav__toggle-bars { top: 50%; margin-top: -1px; }
.nav__toggle-bars::before { content: ""; top: -7px; }
.nav__toggle-bars::after { content: ""; top: 7px; }
.site-header.is-nav-open .nav__toggle-bars { background: transparent; }
.site-header.is-nav-open .nav__toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-nav-open .nav__toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Header: dark overlay on the hero, cross-fades to light on scroll ----------
   Base .site-header stays light (safe default + /om-os). main.js adds [data-overlay]
   on the front page and toggles .is-scrolled once the hero has mostly scrolled past. */
.theme-ready .site-header {
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
    color 0.45s var(--ease), -webkit-backdrop-filter 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease);
}
.site-header[data-overlay]:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
}
.site-header[data-overlay]:not(.is-scrolled) .brand__word { color: #faf9f6; }
.site-header[data-overlay]:not(.is-scrolled) .nav > a:not(.btn),
.site-header[data-overlay]:not(.is-scrolled) .nav__link { color: rgba(250, 249, 246, 0.82); }
.site-header[data-overlay]:not(.is-scrolled) .nav > a:not(.btn):hover,
.site-header[data-overlay]:not(.is-scrolled) .nav__link:hover { color: #fff; }
.site-header[data-overlay]:not(.is-scrolled) .btn--sm {
  background: #faf9f6;
  color: #1a1a17;
  border-color: #faf9f6;
}
.site-header[data-overlay]:not(.is-scrolled) .btn--sm:hover { background: #fff; border-color: #fff; }
.site-header[data-overlay].is-scrolled {
  background: rgba(247, 246, 243, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  background: #100f0d;            /* dark base: no white flash before the video paints */
  /* break out of .wrap so the video reaches the viewport edges */
  width: auto;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  padding-inline: 0;
  /* full-bleed 16:9 box so the video shows its whole frame, no crop */
  aspect-ratio: 16 / 9;
  min-height: 0;
  /* slide up under the sticky header so the transparent nav floats over the
     video — otherwise the 69px header strip shows the light page background */
  margin-top: -69px;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* extra top pad clears the overlaid nav (hero is pulled up 69px) */
  padding-block: calc(69px + clamp(2rem, 6vw, 4rem)) clamp(2rem, 6vw, 4rem);
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.75rem, 1.6rem + 6vw, 6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #faf9f6;
  text-shadow: 0 1px 18px rgba(10, 10, 8, 0.35);
}
/* label pill restyled for the dark hero wash */
.hero .tag {
  color: #e4e9ff;
  background: rgba(43, 75, 242, 0.30);
  border: 1px solid rgba(140, 162, 255, 0.42);
}
.hero__title em {
  font-style: italic;
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0.02em; right: 0.06em;
  bottom: -0.04em;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.hero__lead { margin-top: 1.75rem; max-width: 44ch; color: rgba(250, 249, 246, 0.88); font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); text-shadow: 0 1px 14px rgba(10, 10, 8, 0.3); }
.hero__cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* CTAs on the dark hero: solid light primary, stroked ghost secondary.
   Fixed light values — the hero stays on the dark video in every theme. */
.hero__cta .btn {
  background: #faf9f6;
  color: #1a1a17;
  border-color: #faf9f6;
}
.hero__cta .btn:hover { background: #fff; border-color: #fff; }
.hero__cta .btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #faf9f6;
  border-color: rgba(255, 255, 255, 0.42);
}
.hero__cta .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #14140f;
}
/* single flat dark wash so the light hero text stays legible over the video */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #101010d9;            /* #101010 at 85% */
}
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;              /* fill every edge of the hero */
  object-position: center;
  filter: saturate(0.95) contrast(1.03);
}

@media (max-width: 900px) {
  /* stack: text block on paper, then the video in a rounded panel below */
  .hero {
    display: block;
    aspect-ratio: auto;
    min-height: 0;
    margin-top: 0;
    background: var(--paper);
  }
  .hero__inner { padding-block: clamp(2rem, 8vw, 3.25rem) 0; }
  .hero__media {
    position: relative;
    inset: auto;
    aspect-ratio: 16 / 9;
    margin-top: clamp(1.75rem, 6vw, 2.5rem);
    margin-inline: clamp(1.25rem, 5vw, 3.5rem);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
  }
  .hero__media::after { display: none; }
  .hero__media video { border-radius: inherit; }

  /* hero text sits on paper here, so the header is light regardless of scroll */
  .site-header[data-overlay]:not(.is-scrolled) {
    background: var(--paper);
    border-bottom-color: var(--line);
  }
  .site-header[data-overlay]:not(.is-scrolled) .brand__word { color: var(--ink); }
  .site-header[data-overlay]:not(.is-scrolled) .nav > a:not(.btn),
  .site-header[data-overlay]:not(.is-scrolled) .nav__link { color: var(--muted); }
  .site-header[data-overlay]:not(.is-scrolled) .btn--sm {
    background: var(--ink);
    color: var(--paper);
    border-color: transparent;
  }
  /* text is back on paper here, so restore the themed ink */
  .hero__title { color: var(--ink); text-shadow: none; }
  .hero__lead { color: var(--ink-soft); text-shadow: none; }
  .hero .tag {
    color: var(--accent-ink);
    background: var(--accent-tint);
    border: 0;
  }
  .hero__cta .btn {
    background: var(--ink);
    color: var(--paper);
    border-color: transparent;
  }
  .hero__cta .btn:hover { background: var(--ink-soft); }
  .hero__cta .btn--secondary {
    background: var(--card);
    color: var(--ink);
    border-color: var(--line-2);
  }
  .hero__cta .btn--secondary:hover { background: var(--paper-2); border-color: var(--ink); }
}

/* entrance — text only; the dark media layer is painted from the first frame
   (animating it left the light hero copy sitting on bare paper for a beat) */
.hero__inner > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.6s var(--ease) forwards;
}
.hero__inner > :nth-child(1) { animation-delay: 0.04s; }
.hero__inner > :nth-child(2) { animation-delay: 0.1s; }
.hero__inner > :nth-child(3) { animation-delay: 0.16s; }
.hero__inner > :nth-child(4) { animation-delay: 0.22s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Manifest ---------- */
.manifest__statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 1rem + 2.6vw, 2.75rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 26ch;
}
.manifest__statement em { font-style: italic; }
.manifest__points {
  list-style: none; padding: 0;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  max-width: var(--wrap-text);
}
.manifest__points li {
  display: flex; gap: 1.25rem; align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.manifest__points span { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }

/* ---------- Billedbånd (marquee) ---------- */
/* ingen skillelinje over eller under båndet */
.section.galleri,
.galleri + .section { border-top: 0; }
.section.galleri { padding-block: 50px; }

.marquee {
  --gap: clamp(0.25rem, 0.7vw, 0.5rem);
  --card-h: clamp(14rem, 34vw, 22rem);
  position: relative;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  /* soft eased edge fade — sits close to the sides so it covers little of the
     band, and the multi-stop curve keeps it from reading as a hard cut */
  --mask-fade: linear-gradient(90deg,
    transparent 0,
    rgba(0, 0, 0, 0.06) 0.6%,
    rgba(0, 0, 0, 0.28) 1.6%,
    rgba(0, 0, 0, 0.65) 2.8%,
    #000 4.5%,
    #000 95.5%,
    rgba(0, 0, 0, 0.65) 97.2%,
    rgba(0, 0, 0, 0.28) 98.4%,
    rgba(0, 0, 0, 0.06) 99.4%,
    transparent 100%);
  -webkit-mask-image: var(--mask-fade);
          mask-image: var(--mask-fade);
}
.marquee:active { cursor: grabbing; }
.marquee:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.marquee__track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
  touch-action: pan-y;
}
.marquee__item {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--card-h) * 2 / 3);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
}
.marquee__item img {
  display: block;
  width: 100%;
  height: var(--card-h);
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .marquee { cursor: default; }
}

/* ---------- Bento shared ---------- */
.bento { display: grid; gap: 1rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cell--tint { background: var(--accent-tint); border-color: var(--accent-line); }
.cell h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.cell p { margin-top: 0.65rem; color: var(--muted); font-size: 0.975rem; max-width: 44ch; }
.cell__no { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); display: block; margin-bottom: 1rem; }

/* Ydelser: two items, asymmetric */
.ydelser .bento { grid-template-columns: 1.15fr 0.85fr; }

/* Kontorer: three */
.kontorer .bento { grid-template-columns: repeat(3, 1fr); }
.office { display: flex; flex-direction: column; align-items: flex-start; }
.office address { font-style: normal; margin-top: 0.75rem; color: var(--muted); font-family: var(--mono); font-size: 0.8125rem; line-height: 1.4; }
.cell--tint.office address { color: var(--accent-ink); }
.office__map {
  margin-top: auto;
  padding-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.18s var(--ease);
}
.office__map span { display: inline-block; transition: transform 0.18s var(--ease); }
.cell--tint.office .office__map { color: var(--accent-ink); }
a.office:hover { border-color: var(--ink); box-shadow: 0 2px 12px rgba(26, 26, 23, 0.06); }
a.cell--tint.office:hover { border-color: var(--accent); }
a.office:hover .office__map { color: var(--accent); }
a.office:hover .office__map span { transform: translateX(4px); }
/* keep hover transitions smooth even with the reveal transition on the same node */
.reveal.cell {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
    box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

/* ---------- Job ---------- */
.job__grid {
  display: grid;
  grid-template-columns: 1fr minmax(380px, 500px);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: stretch;
}
.job__lead { margin-top: 1.5rem; }
.job__grid .form { width: 100%; max-width: none; align-self: start; }
.job__grid .form,
.job__grid .job__intro { min-width: 0; }
/* Intro column stretches to the form's height so the photo reaches its bottom */
.job__intro { display: flex; flex-direction: column; }
.job__media {
  position: relative;
  margin-top: clamp(1.5rem, 4vw, 2rem);
  flex: 1 1 auto;
  min-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f1a3a;
}
/* the whole photo box glides in on scroll (same feel as the om-os hero box);
   the photo itself then cross-fades out of the skeleton shimmer. */
.job__media.reveal { transform: translateY(20px); }
.job__media.reveal.is-visible { transform: none; }
/* absolute so the image never inflates the column — it just fills whatever
   height the intro column stretches to (which matches the form) */
.job__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 68%;
}

/* ---------- Forms ---------- */
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 640px;
}
.form__title { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.015em; margin-bottom: 1.75rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; min-width: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field__opt { text-transform: none; letter-spacing: 0; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
/* File field: no box around the control, just the button — filename shows below */
.field input[type="file"] {
  font-size: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 0;
  width: auto;
  max-width: 100%;
}
.field input[type="file"]:focus { background: none; box-shadow: none; }
.field input[type="file"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.field input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.field input[type="file"]::file-selector-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.field__file:empty { display: none; }
.field__filelist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.field__filelist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.field__filelist-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field__filelist-remove {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s var(--ease);
}
.field__filelist-remove:hover { color: var(--danger); }
.field__file-msg { margin: 0.35rem 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--danger); }
.field__filelist + .field__file-msg { margin-top: 0.45rem; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.8125rem; }
.field__error:empty { display: none; }
.field__hint { color: var(--muted); font-size: 0.8125rem; }
.form__note { margin-top: 1rem; font-size: 0.9rem; color: var(--accent-ink); }
.form__note:empty { display: none; }
.form__note--error { color: var(--danger); }

.form.is-sent { display: flex; flex-direction: column; }
.form__success { text-align: center; padding: 0.5rem 0; }
.form.is-sent .form__success {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.form__success-icon { width: 3rem; height: 3rem; margin: 0 auto 1.25rem; color: var(--accent); }
.form__eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1rem;
}
.form__success-text { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; max-width: 42ch; margin: 0 auto 1.75rem; }
.form__success-text a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.form__success-text a:hover { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 3.5rem); }
.site-footer__inner { text-align: center; }

/* ---------- Contact modal ---------- */
.modal {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 420px);
  width: 100%;
  overflow: visible;
}
.modal::backdrop {
  background: var(--modal-scrim);
  backdrop-filter: blur(3px);
}
.modal[open] { animation: modal-in 0.28s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal__card {
  position: relative;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  box-shadow: var(--modal-shadow);
}
.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.modal__close:hover { color: var(--ink); background: var(--line); }
.modal__eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.modal__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  margin-top: 0.4rem;
}
.modal__list { list-style: none; padding: 0; margin-top: 1.5rem; display: grid; gap: 0.9rem; }
.modal__list a {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.modal__list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .modal[open] { animation: none; }
}
.footer__fine { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Skeleton loaders (media) ----------
   main.js adds .media-skeleton to a media box (hero video, gallery frames, the
   job/team photos), then .is-loaded once the <img>/<video> inside has decoded.
   A shimmering fill sits over the box until then. No JS: the media just shows.
   Every target box already establishes a positioning context (.hero__media,
   .job__media, .about-hero__media) except .marquee__item, handled below. */
.media-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--skeleton-base);
  background-image: linear-gradient(100deg,
    transparent 25%,
    var(--skeleton-sheen) 45%,
    var(--skeleton-sheen) 55%,
    transparent 75%);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  background-position: 160% 0;
  animation: skeleton-sweep 1.6s linear infinite;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.media-skeleton.is-loaded::before { opacity: 0; }
.media-skeleton > img,
.media-skeleton > video {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.media-skeleton.is-loaded > img,
.media-skeleton.is-loaded > video { opacity: 1; }
@keyframes skeleton-sweep { to { background-position: -60% 0; } }

@media (prefers-reduced-motion: reduce) {
  .media-skeleton::before { animation: none; background-image: none; }
  .media-skeleton > img,
  .media-skeleton > video { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ydelser .bento, .kontorer .bento, .job__grid { grid-template-columns: 1fr; }
  .job__grid .form { max-width: 640px; }
  .job__intro { display: block; }
  .job__media { min-height: 0; }
  .job__media img { position: static; inset: auto; height: auto; max-height: 340px; }
}
@media (max-width: 600px) {
  .nav__toggle { display: block; }

  /* the whole nav becomes a dropdown panel under the header */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem clamp(1.25rem, 5vw, 1.5rem) 1.1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -26px rgba(26, 26, 23, 0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  }
  .site-header.is-nav-open .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav > a:not(.btn),
  .nav__link {
    display: block;
    width: 100%;
    padding: 0.95rem 0;
    font-size: 1rem;
    text-align: left;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
  }
  .nav > a:not(.btn):hover,
  .nav__link:hover { color: var(--ink); }

  .nav .btn--sm {
    width: 100%;
    margin-top: 0.9rem;
    padding-block: 0.85rem;
    font-size: 0.95rem;
  }

  .field-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .hero__inner > * { opacity: 1; transform: none; }
}
