@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --ink: #15191e;
  --ink-2: #565c63;
  --line: #d3cfc5;
  --brand: #2f639c;
  --accent: #d6317f;
  --band: #1b2b3f;
  --band-ink: #f2f0ea;
  --band-ink-2: #aab6c4;
  --band-line: #38495e;
  --field-dot: 47, 99, 156;
  --input: rgba(255, 255, 255, .6);
  --input-focus: rgba(255, 255, 255, .92);
  --input-line: #85837c;

  --gutter: clamp(20px, 4.5vw, 64px);
  --section: clamp(80px, 11vw, 168px);
  --header: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101418;
    --paper-2: #181d23;
    --ink: #eeece6;
    --ink-2: #a0a7af;
    --line: #2d343c;
    --brand: #7fb0e3;
    --accent: #f170ad;
    --band: #18222e;
    --band-line: #33414f;
    --field-dot: 127, 176, 227;
    --input: rgba(255, 255, 255, .05);
    --input-focus: rgba(255, 255, 255, .09);
    --input-line: #646d78;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #101418;
  --paper-2: #181d23;
  --ink: #eeece6;
  --ink-2: #a0a7af;
  --line: #2d343c;
  --brand: #7fb0e3;
  --accent: #f170ad;
  --band: #18222e;
  --band-line: #33414f;
  --field-dot: 127, 176, 227;
  --input: rgba(255, 255, 255, .05);
  --input-focus: rgba(255, 255, 255, .09);
  --input-line: #646d78;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.125rem)/1.55 "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
address { font-style: normal; }
button, input, textarea { font: inherit; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-weight: 600; text-wrap: balance; }

h2 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -.028em;
}

h2.display { font-size: clamp(2.75rem, 1.6rem + 5.4vw, 6.5rem); line-height: .98; letter-spacing: -.035em; }

h3 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.875rem); line-height: 1.15; letter-spacing: -.018em; }

.wrap { width: 100%; max-width: 1560px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 30;
  padding: 8px 14px; background: var(--ink); color: var(--paper);
}
.skip:focus { top: 12px; }

.eyebrow {
  margin-bottom: 20px;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--brand);
}

.button {
  display: inline-block;
  padding: 15px 26px;
  border: 0;
  border-radius: 4px;
  background: var(--brand);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease;
}
@media (hover: hover) { .button:hover { background: var(--ink); } }
.button:disabled { opacity: .6; cursor: progress; }

/* Header */

.site-header { position: sticky; top: 0; z-index: 20; }

/* Material sits on a pseudo-element: a blurred parent would stop the mobile menu from blurring what is behind it */
.site-header::before {
  content: "";
  position: absolute; inset: 0 0 -18px;
  z-index: -1;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-mask-image: linear-gradient(#000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 18px), transparent);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.site-header.is-stuck::before { opacity: 1; }

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header);
}

.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo__mark { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.logo__word { margin-top: 2px; font-size: .75rem; font-weight: 500; letter-spacing: .015em; color: var(--ink-2); }

.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav a { text-decoration: none; font-weight: 500; }
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
@media (hover: hover) { .nav a:hover { color: var(--brand); } }
.nav__contact { color: var(--brand); }

.controls { display: flex; align-items: center; gap: 6px; }

.lang { position: relative; display: flex; }
.lang__mark { position: absolute; left: 0; bottom: 6px; width: 20px; height: 2px; background: var(--ink); pointer-events: none; }
.lang button, .icon-btn, .menu-btn {
  min-width: 40px; height: 40px; padding: 0 8px;
  border: 0; background: none; cursor: pointer;
  font-size: .9375rem; font-weight: 500; color: var(--ink-2);
}
.lang button[aria-pressed="true"] { color: var(--ink); }
@media (hover: hover) { .lang button:hover, .icon-btn:hover, .menu-btn:hover { color: var(--ink); } }
.lang button:active, .icon-btn:active, .menu-btn:active, .nav a:active, .site-footer a:active { opacity: .55; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.menu-btn { display: none; color: var(--ink); }
.menu-btn svg { display: block; margin: auto; }
#theme-icon { view-transition-name: theme-icon; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Hero */

.hero { position: relative; display: flex; flex-direction: column; min-height: calc(100svh - var(--header)); padding-top: clamp(36px, 6vw, 88px); }

.hero__title {
  max-width: 13em;
  font-size: clamp(3.25rem, min(1.1rem + 9.6vw, 14.5svh), 11.5rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.042em;
}
.hero__title em { font-style: normal; color: var(--brand); }

.hero__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  margin-top: clamp(32px, 4vw, 56px);
}
.hero__claim { font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); color: var(--ink-2); }

.hero__field { display: block; flex: 1 1 auto; width: 100%; height: 0; min-height: 150px; margin-top: 28px; pointer-events: none; }

/* Sections */

.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); }

.section--ink {
  --ink: var(--band-ink);
  --ink-2: var(--band-ink-2);
  --line: var(--band-line);
  background: var(--band);
  color: var(--band-ink);
}
.section--ink .eyebrow { color: var(--band-ink-2); }

.section__head { max-width: 860px; margin-bottom: clamp(48px, 6vw, 96px); }
.section__head--wide { max-width: 1160px; }
.section__lead { max-width: 38em; margin-top: 24px; font-size: clamp(1.125rem, 1.05rem + .4vw, 1.375rem); line-height: 1.45; color: var(--ink-2); }

/* Services */

.services { border-top: 1px solid var(--line); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: 12px clamp(24px, 4vw, 64px);
  align-items: baseline;
  padding-block: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.service h3 { font-size: clamp(1.875rem, 1.4rem + 2.2vw, 3.25rem); line-height: 1.05; letter-spacing: -.03em; }
.service p { color: var(--ink-2); max-width: 36em; }
.service__tag { justify-self: end; font-size: .9375rem; color: var(--ink-2); text-align: right; }

/* Workflow */

.phase {
  display: grid;
  grid-template-columns: 2fr 5fr 6fr;
  gap: 12px clamp(24px, 4vw, 64px);
  padding-block: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.phase { position: relative; }
.phase::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
.phase:last-child { padding-bottom: 0; }
.phase__no { font-size: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.phase__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.phase p { color: var(--ink-2); max-width: 36em; }
.phase__steps { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 16px; font-size: .9375rem; color: var(--ink); }
.phase__steps li:not(:last-child)::after { content: "·"; margin-inline: 8px; color: var(--ink-2); }

/* Team */

.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }

.person:nth-child(2) { margin-top: clamp(0px, 7vw, 112px); }

/* The team shows either the letters or the photos, switched in the admin */
.team--letters .photo, .team:not(.team--letters) .person__mono { display: none; }

.person__mono {
  display: flex; align-items: flex-end;
  aspect-ratio: 5 / 3;
  margin-bottom: 24px;
  padding: 0 clamp(12px, 2vw, 28px);
  overflow: hidden;
  background: var(--brand);
  color: var(--paper);
  font-size: clamp(9rem, 22vw, 22rem);
  font-weight: 800;
  line-height: .78;
  letter-spacing: -.04em;
}
.person__mono--alt { justify-content: flex-end; background: var(--ink); }

.photo { margin: 0 0 24px; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Wireframe placeholder until the real portraits exist */
.photo--empty {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .9375rem;
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    var(--paper-2);
}
.photo__icon, .photo figcaption { position: relative; }
.photo__icon { padding: 18px; width: 108px; height: 108px; border-radius: 50%; background: var(--paper-2); }
.photo figcaption { padding: 0 8px; background: var(--paper-2); }
.person__role { margin: 6px 0 16px; font-weight: 500; color: var(--brand); }
.person > p:not(.person__role) { color: var(--ink-2); max-width: 36em; }
.person__skills { display: flex; flex-wrap: wrap; margin-top: 16px; font-size: .9375rem; }
.person__skills li:not(:last-child)::after { content: "·"; margin-inline: 8px; color: var(--ink-2); }

/* Contact */

.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 120px); align-items: end; }
.contact__facts { display: grid; gap: 4px; margin-top: 32px; font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); }
.contact__facts a { color: var(--brand); text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact__facts span { color: var(--ink-2); }
.contact__intro { margin: 8px 0 28px; color: var(--ink-2); }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field label { display: block; margin-bottom: 8px; font-size: .9375rem; font-weight: 500; }
.field input, .field textarea {
  display: block; width: 100%;
  min-height: 52px;
  -webkit-appearance: none; appearance: none;
  padding: 13px 16px;
  border: 1px solid var(--input-line); border-radius: 6px;
  background: var(--input); outline: 0;
  font-size: 1rem;
  resize: vertical;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) { .field input:hover, .field textarea:hover { border-color: var(--ink-2); } }
.field input:focus, .field textarea:focus { border-color: var(--brand); background: var(--input-focus); box-shadow: 0 0 0 1px var(--brand); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-2); opacity: 1; }
.form .button { justify-self: start; }
.field input[aria-invalid] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field__error { margin-top: 6px; font-size: .9375rem; color: var(--accent); }
.field__error:empty { display: none; }
.form__status:empty { display: none; }
.form__status { font-weight: 500; color: var(--brand); }
.form__status.is-error { color: var(--accent); }

/* Footer */

.site-footer { padding-block: 64px 28px; border-top: 1px solid var(--line); }
.site-footer__grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer__claim { max-width: 26em; margin-top: 16px; color: var(--ink-2); }
.site-footer__title { margin-bottom: 8px; font-size: .9375rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.site-footer nav a { display: block; padding-block: 2px; text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { color: var(--brand); } }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  margin-top: 56px;
  font-size: .875rem; letter-spacing: .012em; color: var(--ink-2);
}
.site-footer__legal { display: flex; gap: 20px; }

/* Legal */

.legal { padding-block: clamp(48px, 7vw, 104px) var(--section); }
.legal h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 5.5rem); line-height: 1.02; letter-spacing: -.035em; }
.legal__body { max-width: 44rem; margin-top: clamp(32px, 4vw, 56px); overflow-wrap: anywhere; }
.legal__body h2 { margin-top: 56px; font-size: clamp(1.5rem, 1.3rem + .9vw, 2rem); line-height: 1.15; letter-spacing: -.02em; }
.legal__body h3 { margin-top: 32px; font-size: 1.125rem; letter-spacing: -.005em; }
.legal__body h2 + h3 { margin-top: 16px; }
.legal__body p, .legal__body ul { margin-top: 10px; color: var(--ink-2); }
.legal__body ul { list-style: disc; padding-left: 1.2em; }
.legal__body strong { color: var(--ink); font-weight: 600; }
.legal__body a { color: var(--brand); }

/* Reveal: only active once JS has confirmed motion is welcome */

.motion .reveal { opacity: 0; transform: translateY(18px); }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .42s; }

/* The toggle stays live above the cross-fade so its turn is visible the whole way */
::view-transition-old(theme-icon) { display: none; }
::view-transition-new(theme-icon) { animation: none; }

@media (max-width: 1040px) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .service__tag { grid-column: 2; justify-self: start; text-align: left; }
  .phase { grid-template-columns: 96px minmax(0, 1fr); }
  .phase > div:last-child { grid-column: 2; }
}

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .controls { gap: 0; }
  .lang button, .icon-btn, .menu-btn { min-width: 44px; height: 44px; }
  .nav {
    position: absolute; top: calc(100% - 4px); left: 12px; right: 12px;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 12px 20px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--paper) 78%, transparent);
    box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .4), 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
    transform-origin: top right;
    visibility: hidden;
    opacity: 0;
  }
  .nav a { width: 100%; padding-block: 10px; font-size: 1.25rem; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .team { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .service { grid-template-columns: minmax(0, 1fr); }
  .service__tag { grid-column: 1; }
  .phase { grid-template-columns: minmax(0, 1fr); }
  .phase > div:last-child { grid-column: 1; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .button { text-align: center; }
  .hero__foot .button, .form .button { width: 100%; justify-self: stretch; }
}

@media (pointer: coarse) {
  .site-footer nav a { padding-block: 9px; }
  .site-footer__legal a { display: inline-block; padding-block: 11px; }
}

/* Still answers the press, only without movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .button:active { opacity: .8; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header::before { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav { background: var(--paper) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

@media (prefers-contrast: more) {
  .site-header::before { background: var(--paper); -webkit-mask-image: none; mask-image: none; box-shadow: 0 1px 0 var(--ink); }
  .nav { background: var(--paper) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 0 0 1px var(--ink) !important; }
}
