:root {
  color-scheme: light;
  --paper: #f5f6f8;
  --ink: #17263d;
  --muted: #5d687b;
  --line: #d6dde7;
  --accent: #c2d9f3;
  --dark: #142b49;
  --surface: #eaf0f7;
  --focus: #3972b4;
  --radius: 3px;
  --max: 1320px;
  --space: clamp(24px, 5vw, 80px);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
.wrap {
  width: calc(100% - 2 * var(--space));
  max-width: var(--max);
  margin-inline: auto;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-weight: 450;
  letter-spacing: -0.055em;
  line-height: 1.06;
}
h1 {
  font-size: clamp(56px, 6.8vw, 106px);
  margin-bottom: 28px;
}
h2 {
  font-size: clamp(38px, 4.4vw, 65px);
  margin-bottom: 26px;
}
h3 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.025em;
}
p {
  color: var(--muted);
}
.notice {
  background: var(--dark);
  color: #edf3fa;
  text-align: center;
  padding: 8px 20px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  gap: 20px;
}
.brand {
  font-size: 22px;
  letter-spacing: 0.03em;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.07em;
  font-weight: 400;
}
.brand-logo {
  width: 240px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;

}
.header nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 13px;
}
.nav-contact {
  border: 1px solid var(--ink);
  padding: 10px 22px;
}
.menu-toggle {
  display: none;
}
.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  column-gap: 60px;
  padding-top: 26px;
}
.hero-copy {
  padding: 55px 0 65px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.dot {
  width: 7px;
  height: 7px;
  background: #5789bb;
  border-radius: 50%;
}
.lead {
  max-width: 400px;
  font-size: 16px;
  line-height: 1.8;
}
.actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 22px;
  margin-top: 35px;
}
.button {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 23px;
  display: inline-flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  font-size: 13px;
  min-height: 52px;
  border-radius: var(--radius);
}
.button:hover {
  background: #29496d;
}
.text-link {
  font-size: 13px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
}
.hero-visual {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  background: #aec6e0;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.no-image {
  display: flex;
  align-items: center;
  padding: 42px;
  background: #d0ddec;
}
.visual-word {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.13;
  max-width: 300px;
  color: var(--ink);
}
.visual-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--dark);
  color: var(--paper);
  padding: 22px 28px;
  font-size: 12px;
}
.hero-bottom {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 27px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.hero-bottom span span {
  padding-left: 25px;
}
.section {
  padding-block: 105px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 50px;
  margin-bottom: 48px;
}
.section-heading p {
  max-width: 365px;
  font-size: 14px;
}
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 42px;
}
.service {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 26px 25px 25px 0;
}
.service-number {
  font-size: 11px;
  color: #738399;
}
.service h3 {
  margin-top: 28px;
  margin-bottom: 14px;
}
.service p {
  font-size: 14px;
  max-width: 300px;
}
.service a {
  position: absolute;
  right: 0;
  top: 22px;
  font-size: 24px;
  width: 44px;
  height: 44px;
  text-align: center;
}
.about {
  background: var(--surface);
  padding: 90px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}
.about-grid > div:last-child > p:not(.eyebrow) {
  font-size: 15px;
}
.about-statement {
  padding: 42px;
  background: var(--dark);
  color: var(--paper);
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.about-statement p {
  color: inherit;
}
.about-statement > p:nth-child(2) {
  font-family: Georgia, serif;
  font-size: 45px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.about-statement > span {
  font-size: 50px;
  color: var(--accent);
  line-height: 1;
}
.gallery {
  columns: 3;
  column-gap: 22px;
}
.gallery-item {
  border: 0;
  background: none;
  padding: 0;
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 22px;
  text-align: left;
  color: var(--ink);
}
.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.gallery-item > span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 9px 0;
}
.gallery-item img {
  transition: filter 0.2s;
}
.gallery-item:hover img {
  filter: brightness(0.9);
}
.gallery-empty {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 50px 0;
}
.gallery-empty > span {
  float: right;
  font-size: 45px;
}
.gallery-empty p {
  margin-bottom: 0;
  font-size: 14px;
}
.contact {
  background: var(--dark);
  color: var(--paper);
  padding: 95px 0;
}
.contact p,
.contact small {
  color: #c4d0e0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 110px;
}
.contact-grid > div > p {
  max-width: 380px;
}
.contact-details {
  margin-top: 35px;
}
.contact-details > a,
.contact-details > p {
  display: block;
  margin-bottom: 20px;
  font-size: 19px;
  overflow-wrap: anywhere;
}
.contact-details small {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
}
.contact-form {
  padding: 35px;
  border: 1px solid #667b96;
  border-radius: var(--radius);
}
.contact-form h3 {
  font-size: 25px;
}
.contact-form label {
  font-size: 12px;
  display: block;
  margin-bottom: 20px;
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #8a9db7;
  background: transparent;
  color: white;
  padding: 10px 0;
  border-radius: 0;
  resize: vertical;
}
.contact-form .button {
  background: var(--accent);
  color: var(--ink);
  width: 100%;
  margin: 5px 0 20px;
}
.contact-form small {
  font-size: 11px;
  display: block;
}
.contact-form fieldset {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.contact-form fieldset:disabled {
  opacity: 0.45;
}
.contact-form button:disabled,
fieldset:disabled button {
  cursor: not-allowed;
}
.form-note {
  font-size: 13px;
}
.honeypot {
  position: absolute;
  left: -9999px;
}
.footer-top {
  padding: 45px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.footer-top p {
  font-size: 13px;
  margin: 0;
}
.footer-top > a:last-child {
  font-size: 12px;
}
.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
}
.footer-bottom nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  background: white;
  padding: 15px;
  z-index: 30;
}
.skip:focus {
  top: 10px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
.lightbox {
  border: 0;
  background: #142033;
  color: white;
  max-width: 96vw;
  width: 1200px;
  padding: 60px 60px 25px;
  max-height: 95dvh;
}
.lightbox::backdrop {
  background: #101b2be8;
}
.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox img {
  max-height: 75dvh;
  object-fit: contain;
}
.lightbox figcaption {
  font-size: 12px;
  padding-top: 10px;
}
.lightbox button {
  position: absolute;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 28px;
}
.lightbox-close {
  top: 8px;
  right: 10px;
}
.lightbox-prev {
  left: 5px;
  top: 45%;
}
.lightbox-next {
  right: 5px;
  top: 45%;
}
body.modal-open {
  overflow: hidden;
}
.admin {
  max-width: 1050px;
  margin: 45px auto;
  padding: 0 24px;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
}
.admin h1 {
  font-size: 44px;
}
.admin form label {
  display: block;
  margin: 18px 0;
}
.admin input:not([type="hidden"]) {
  display: block;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: white;
}
.admin .panel {
  border: 1px solid var(--line);
  padding: 25px;
  margin: 25px 0;
}
.admin .login {
  max-width: 460px;
  margin: 10vh auto;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.admin-card {
  border: 1px solid var(--line);
  padding: 12px;
}
.admin-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.admin-card button {
  margin-top: 12px;
}
.admin button {
  min-height: 44px;
}
.admin-alert {
  background: var(--surface);
  padding: 16px;
}
.previews {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.previews img {
  width: 90px;
  height: 90px;
  object-fit: cover;
}
@media (min-width: 1700px) {
  .hero-visual {
    min-height: 610px;
  }
}
@media (max-width: 1050px) {
  .hero {
    gap: 30px;
  }
  .hero-copy {
    padding-top: 35px;
  }
  .hero-visual {
    min-height: 480px;
  }
  .header nav {
    gap: 20px;
  }
  .about-grid,
  .contact-grid {
    gap: 45px;
  }
  .services {
    gap: 0 25px;
  }
  .section-heading {
    gap: 25px;
  }
  .about-statement {
    padding: 30px;
  }
  .about-statement > p:nth-child(2) {
    font-size: 36px;
  }
}
@media (max-width: 760px) {
  .header {
    min-height: 90px;
    position: relative;
  }
  .brand {
    font-size: 18px;
  }
  .menu-toggle {
    display: block;
    background: transparent;
    border: 1px solid var(--line);
    padding: 10px;
    font-size: 12px;
    min-height: 44px;
  }
  .header nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--paper);
    z-index: 10;
    border: 1px solid var(--line);
  }
  .header nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header nav a {
    padding: 12px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 10px;
    gap: 0;
  }
  .hero-copy {
    padding: 25px 0 38px;
  }
  h1 {
    font-size: clamp(56px, 11vw, 78px);
  }
  .hero .eyebrow {
    margin-bottom: 25px;
  }
  .hero-visual {
    min-height: 350px;
  }
  .visual-word {
    font-size: 48px;
  }
  .hero-bottom {
    gap: 20px;
    font-size: 9px;
  }
  .hero-bottom span span {
    padding-left: 5px;
  }
  .section {
    padding-block: 65px;
  }
  .section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .section-heading p {
    max-width: 500px;
  }
  .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 22px;
  }
  .service h3 {
    font-size: 21px;
  }
  .about {
    padding: 60px 0;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-statement {
    min-height: 300px;
  }
  .gallery {
    columns: 2;
    column-gap: 15px;
  }
  .gallery-item {
    margin-bottom: 15px;
  }
  .contact {
    padding: 60px 0;
  }
  .contact-form {
    padding: 24px;
  }
  .footer-top {
    flex-wrap: wrap;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .lightbox {
    padding: 55px 35px 20px;
  }
  .lightbox img {
    max-height: 70dvh;
  }
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 390px) {
  .services {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .hero-bottom {
    flex-direction: column;
    gap: 5px;
  }
  .gallery {
    columns: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-bottom: 20px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.gallery:has(.gallery-item:only-child) { columns: 1; max-width: 800px; }
.gallery:has(.gallery-item:nth-child(2):last-child) { columns: 2; }
@media (max-width: 390px) {
  .gallery:has(.gallery-item:nth-child(2):last-child) { columns: 1; }
}

@media (max-width: 760px) {
  .brand-logo { width: 188px; height: 94px; }
  .header .brand { gap: 9px; font-size: 16px; }
}

.header { min-height: 132px; }
@media (max-width: 760px) {
  .header { min-height: 108px; }
  .header nav { top: 100px; }
}

/* Tre prosjektbilder: ett stort motiv og to tettere utsnitt.
   Lightbox viser alltid hele originalbildet. */
@media (min-width: 761px) {
  .gallery:has(> .gallery-item:nth-child(3):last-child) {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 28px;
    align-items: start;
  }
  .gallery:has(> .gallery-item:nth-child(3):last-child) .gallery-item {
    margin-bottom: 0;
  }
  .gallery:has(> .gallery-item:nth-child(3):last-child) .gallery-item:first-child {
    grid-row: span 2;
  }
  .gallery:has(> .gallery-item:nth-child(3):last-child) .gallery-item:nth-child(n+2) img {
    aspect-ratio: 1.24;
    object-fit: cover;
    object-position: center 35%;
  }
}
.hero-visual img { object-position: center 40%; }

/* Prosjektbeskrivelsen følger overskriften og bildene i samme leseretning. */
#prosjekter .section-heading {
  display: block;
}
#prosjekter .section-heading h2 {
  margin-bottom: 20px;
}
#prosjekter .section-heading p {
  max-width: 660px;
  margin-bottom: 0;
}
.contact-form .button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.login-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 42px 32px 32px;
  background: var(--paper);
  color: var(--ink);
}
.login-dialog::backdrop { background: #142033b8; }
.login-dialog h2 { font-size: 38px; margin-bottom: 12px; }
.login-dialog p { font-size: 14px; }
.login-close {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
}
.login-dialog label { display: block; font-size: 13px; margin: 18px 0 7px; }
.login-dialog input:not([type="hidden"]) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #96a9bf;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}
.login-dialog .button { width: 100%; margin-top: 24px; }
.login-error { color: #8b2922; }

.about-links { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-start; }

/* Kompakte kontaktvalg med et diskret felt som foldes ut. */
.contact-choices { border: 0; padding: 12px 0 12px 35px; }
.contact-choices > p { margin-bottom: 22px; }
.contact-choice { margin: 10px 0; }
.contact-choice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  gap: 24px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid #8a9db7;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  transition: background .18s, color .18s, border-color .18s;
}
.contact-choice summary::-webkit-details-marker { display: none; }
.contact-choice summary span { font-size: 16px; color: var(--accent); }
.contact-choice summary:hover, .contact-choice[open] summary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.contact-choice summary:hover span, .contact-choice[open] summary span { color: inherit; }
.contact-choice form { margin: 14px 0 20px; padding: 18px; background: rgba(255,255,255,.045); border-radius: 8px; }
.contact-choice form label { margin-bottom: 5px; }
.contact-choice small { display: block; margin: 8px 0 16px; }
.contact-choice .button { width: auto; min-height: 44px; padding: 10px 16px; margin: 0; border-radius: 24px; gap: 18px; }
.contact-choice input { width: 100%; }
.contact-choices > small { margin-top: 24px; color: #c6d4e5; }
@media (max-width: 767px) { .contact-choices { padding: 0; } }

.gallery-caption { display: flex; gap: 12px; min-width: 0; }
.gallery-caption > span:last-child { overflow-wrap: anywhere; }
.gallery-item > span { gap: 12px; }
.caption-form { padding: 14px 0; }
.caption-form label { display: block; margin-bottom: 6px; }
.caption-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); background: white; color: var(--ink); resize: vertical; }
.caption-form .button { margin-top: 8px; }
.lightbox figcaption { overflow-wrap: anywhere; }

#tjenestetekster { margin-bottom: 32px; }
#tjenestetekster label { display: block; margin: 18px 0 6px; font-weight: 600; }
#tjenestetekster textarea { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); background: white; color: var(--ink); resize: vertical; }
#tjenestetekster .button { margin-top: 20px; }

.partners { padding: 48px 0 54px; background: #10213a; color: #fff; }
.partners h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .16em; font-weight: 500; color: #c6d4e5; margin-bottom: 32px; }
.partner-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 36px; }
.partner { display: flex; justify-content: center; align-items: center; min-height: 72px; }
.partner img { width: 240px; max-height: 68px; object-fit: contain; }
.partner span { font-size: clamp(17px, 2vw, 24px); font-weight: 600; letter-spacing: -.025em; }
.admin-shortcuts { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.admin-shortcuts a { padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
#bildetekster { margin-top: 40px; }
.caption-form { padding: 18px; background: var(--surface); }
.caption-form label { font-weight: 600; }
.cookie-notice { position: fixed; z-index: 30; right: 20px; bottom: 20px; max-width: 390px; padding: 20px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 35px #142b4920; font-size: 13px; }
.cookie-notice p { margin: 8px 0 14px; }
.cookie-notice div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-notice a { text-decoration: underline; }
.cookie-notice button { padding: 9px 12px; background: var(--dark); color: #fff; border: 0; border-radius: 20px; min-height: 44px; }
.privacy-page { max-width: 800px; padding: 55px 0 90px; }
.privacy-page h1 { font-size: clamp(40px, 7vw, 72px); margin: 35px 0 20px; }
.privacy-page h2 { font-size: 25px; margin: 32px 0 12px; }
.privacy-page a { text-decoration: underline; }
@media(max-width: 600px) { .partner-list { grid-template-columns: 1fr; gap: 25px; } .partner img { max-width: 220px; } .cookie-notice { right: 12px; bottom: 12px; left: 12px; max-width: none; } }

@media (min-width: 601px) and (max-width: 1050px) { .partner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

#epost { margin-bottom: 32px; }
#epost label { display: block; margin-bottom: 8px; }
#epost input { width: 100%; max-width: 420px; min-height: 48px; padding: 10px; border: 1px solid var(--line); background: white; color: var(--ink); }
#epost form p { font-size: 13px; }
