@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  font-weight: 400 700;
  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: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  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-20C4, U+2113, U+A720-A7FF;
}

:root {
  --slate: #14232E;
  --slate-raised: #1B2D3A;
  --slate-line: #2C3E4B;
  --mist: #F3F5F6;
  --mist-line: #D6DCE0;
  --white: #FFFFFF;
  --text-on-slate: #ECF0F2;
  --muted-on-slate: #A7B5BF;
  --text-on-mist: #14232E;
  --muted-on-mist: #4C5C68;
  --gold: #D9B26A;
  --gold-deep: #7A5A1E;
  --gold-wash: #F1E6CF;
  --ok: #1E6B4F;
  --err: #A33A2B;

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Scale: 18px base, ratio 1.25 */
  --step--1: 0.889rem;
  --step-0: 1.125rem;
  --step-1: 1.406rem;
  --step-2: 1.758rem;
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.4rem);
  --step-hero: clamp(2.6rem, 1.6rem + 4.4vw, 4.6rem);

  --gutter: clamp(1rem, 0.4rem + 3vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --measure: 34rem;
  --radius: 3px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--text-on-mist);
  background: var(--slate);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

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

.wrap { width: min(72rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip { position: absolute; left: 1rem; top: -3rem; z-index: 20; background: var(--gold); color: var(--slate); padding: 0.5rem 1rem; font-weight: 600; }
.skip:focus { top: 1rem; }

/* ---------- Surfaces ---------- */
.dark { position: relative; overflow: hidden; isolation: isolate; background: var(--slate); color: var(--text-on-slate); }

/* Stroke field drawn by js/motion.js behind each dark section; edges fade so sections meet cleanly. */
.stroke-field {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.hero > .stroke-field {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.light { background: var(--mist); color: var(--text-on-mist); }
.dark + .dark { border-top: 1px solid var(--slate-line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  font: 600 var(--step--1)/1.2 var(--font); letter-spacing: 0.01em;
  border: 1px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--gold { background: var(--gold); color: var(--slate); }
.btn--gold:hover { background: #E4C285; }
.btn--ghost { border-color: #4A5D6A; color: var(--text-on-slate); }
.btn--ghost:hover { border-color: var(--text-on-slate); }
.btn--ink { background: var(--slate); color: var(--white); }
.btn--ink:hover { background: #22394A; }
.btn[aria-busy='true'] { opacity: 0.7; cursor: progress; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 35, 46, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  color: var(--text-on-slate);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.masthead.is-scrolled { border-bottom-color: var(--slate-line); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: 1.75rem; width: auto; }
@media (max-width: 29.99em) { .wordmark img { height: 1.35rem; } }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--muted-on-slate); }
.nav a:hover { color: var(--text-on-slate); }
.nav .nav__cta { color: var(--gold); font-weight: 600; }

/* Section links give way first; Blog and the call to action stay longest. */
@media (max-width: 71.99em) { .nav .nav__minor { display: none; } }
@media (max-width: 29.99em) { .nav li:not(:last-child) { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 6vw, 6.5rem) clamp(4rem, 3rem + 5vw, 7rem); }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: end; }
@media (min-width: 56em) { .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); } }

.hero__title {
  font-size: var(--step-hero); font-weight: 500; line-height: 1.02; letter-spacing: -0.03em;
  color: var(--white); margin-bottom: 1.75rem;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line__inner { display: block; }
.hero__lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem); color: var(--muted-on-slate); max-width: var(--measure); margin-bottom: 2.25rem; }
.hero__lead a { color: var(--text-on-slate); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.portrait figcaption { margin-top: 1rem; font-size: var(--step--1); line-height: 1.4; color: var(--text-on-slate); font-weight: 600; }
.portrait figcaption span { font-weight: 400; color: var(--muted-on-slate); }
.portrait__frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(160deg, #2A3F4E 0%, #1A2C38 100%);
}
/* Offset gold frame sits behind the photo; drawn as an outline so the hero field shows through it. */
.portrait__media { position: relative; isolation: isolate; }
.portrait__media::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--gold); border-radius: var(--radius);
  transform: translate(14px, 14px);
}
.portrait__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait__monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 500; letter-spacing: -0.04em; color: #3E5565;
}
@media (max-width: 55.99em) { .portrait { max-width: 20rem; } }

/* One orchestrated entrance on load, timed against the hero field settling (js/motion.js):
   headline rises out of its mask, copy follows, then the photo settles and its frame slides out. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line__inner { transform: translateY(108%); }
  .js .reveal { opacity: 0; transform: translateY(14px); }
  .js .portrait__frame img { transform: scale(1.08); }
  .js .portrait__media::before { transform: translate(0, 0); opacity: 0; }

  .js.is-ready .hero__title .line__inner { transform: none; transition: transform 1s cubic-bezier(0.19, 0.8, 0.22, 1) 0.25s; }
  .js.is-ready .hero__title .line + .line .line__inner { transition-delay: 0.4s; }
  .js.is-ready .reveal { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js.is-ready .hero__lead { transition-delay: 0.7s; }
  .js.is-ready .actions { transition-delay: 0.85s; }
  .js.is-ready .portrait { transition-delay: 0.5s; }
  .js.is-ready .portrait__frame img { transform: none; transition: transform 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s; }
  .js.is-ready .portrait__media::before {
    transform: translate(14px, 14px); opacity: 1;
    transition: transform 1.1s cubic-bezier(0.19, 0.8, 0.22, 1) 1.2s, opacity 0.3s ease 1.2s;
  }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section__head { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head h2 { font-size: var(--step-3); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.light .section__head p { color: var(--muted-on-mist); }
.dark .section__head p { color: var(--muted-on-slate); }
.dark .section__head h2 { color: var(--white); }

.split { display: grid; gap: 0 clamp(2rem, 6vw, 6rem); }
@media (min-width: 56em) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ---------- Products ---------- */
.products { display: grid; gap: 1px; background: var(--mist-line); border: 1px solid var(--mist-line); }
@media (min-width: 56em) { .products { grid-template-columns: repeat(3, 1fr); } }
.product { display: flex; flex-direction: column; background: var(--white); padding: clamp(1.5rem, 3vw, 2.25rem); }
.product h3 { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; margin: 1.25rem 0 0.75rem; }
.product p { color: var(--muted-on-mist); font-size: 1rem; }
.product h3:has(+ .product__sub) { margin-bottom: 0.15rem; }
.product .product__sub { color: var(--text-on-mist); font-weight: 500; margin-bottom: 0.75rem; }
.product__meta { margin-top: 1rem; font-size: var(--step--1) !important; }
.product__link { margin-top: auto; padding-top: 1.75rem; font-weight: 600; font-size: var(--step--1); color: var(--text-on-mist); }
.product__link:hover { color: var(--gold-deep); }
.status {
  align-self: flex-start; font-size: 0.8rem; font-weight: 600; color: var(--gold-deep);
  background: var(--gold-wash); padding: 0.2rem 0.6rem; border-radius: 2px;
}

/* ---------- Principles / partners ---------- */
.principles > div { padding-block: 1.4rem; border-top: 1px solid var(--slate-line); }
.principles > div:last-child { border-bottom: 1px solid var(--slate-line); }
.principles dt { font-size: var(--step-1); font-weight: 500; color: var(--white); letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.principles dd { color: var(--muted-on-slate); max-width: 36rem; }
.consulting__cta { margin-top: 2rem; }

/* "How we work" runs like a pipeline: as the scroll-driven sweep passes each principle,
   a gold rule draws across its top and it lights up (js/motion.js adds .has-sequence / .is-active). */
.has-sequence .principles > div { position: relative; }
.has-sequence .principles > div::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(0.19, 0.8, 0.22, 1);
}
.has-sequence .principles dt, .has-sequence .principles dd { transition: color 0.6s ease, opacity 0.6s ease; }
.has-sequence .principles > div:not(.is-active) dt { color: var(--muted-on-slate); }
.has-sequence .principles > div:not(.is-active) dd { opacity: 0.55; }
.has-sequence .principles > div.is-active::before { transform: scaleX(1); }

/* ---------- Track record ---------- */
.record { width: 100%; border-collapse: collapse; }
.record tr { border-top: 1px solid var(--mist-line); }
.record tr:last-child { border-bottom: 1px solid var(--mist-line); }
.record th, .record td { padding-block: 1.35rem; vertical-align: baseline; }
.record th { text-align: left; font-weight: 500; font-size: var(--step-0); padding-right: 2rem; }
.record th span { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted-on-mist); margin-top: 0.2rem; }
.record td {
  text-align: right; white-space: nowrap; font-size: var(--step-2); font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: lining-nums;
}
@media (max-width: 39.99em) {
  .record tr { display: block; padding-block: 1.25rem; }
  .record th, .record td { display: block; padding: 0; text-align: left; }
  .record td { margin-top: 0.5rem; white-space: normal; }
}
/* ---------- Press ---------- */
.press { border-top: 1px solid var(--mist-line); }
.press li { border-bottom: 1px solid var(--mist-line); }
.press a { display: grid; gap: 0.35rem; padding-block: 1.5rem; text-decoration: none; }
@media (min-width: 56em) { .press a { grid-template-columns: 16rem minmax(0, 1fr); gap: 2rem; align-items: baseline; } }
.press__source { font-size: var(--step--1); color: var(--muted-on-mist); }
.press__title {
  font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; max-width: 40rem;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.press a:hover .press__title { text-decoration-color: currentColor; color: var(--gold-deep); }

.names { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin-top: 2.5rem; font-size: var(--step-1); font-weight: 500; color: #8695A0; letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
.forms { display: grid; gap: clamp(3.5rem, 6vw, 6rem); }
@media (min-width: 56em) { .forms { grid-template-columns: 1fr 1fr; } }
.form h2 { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 0.75rem; }
.form__intro { color: var(--muted-on-mist); margin-bottom: 2rem; max-width: 28rem; }
.form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.form legend, .field label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.6rem; }
.check { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--slate); margin: 0; }
.field { margin-bottom: 1.25rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text-on-mist);
  background: var(--white); border: 1px solid #BCC6CD; border-radius: var(--radius);
  padding: 0.8rem 0.9rem; transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover, .field textarea:hover { border-color: #8C9AA4; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--slate); outline-offset: 0; border-color: var(--slate); }
[aria-invalid='true'] { border-color: var(--err) !important; }
.field__error { color: var(--err); font-size: var(--step--1); margin-top: 0.4rem; }
.field__error:empty { display: none; }
.form__fine { margin-top: 1rem; font-size: var(--step--1); color: var(--muted-on-mist); }

.notice { display: none; margin-top: 1.25rem; padding: 0.9rem 1rem; border-left: 3px solid; font-size: 1rem; }
.notice--ok { border-color: var(--ok); background: #E3EFEA; color: #154A37; }
.notice--err { border-color: var(--err); background: #F6E5E2; color: #7C2A1F; }
.notice:target, .notice.is-shown { display: block; }

/* ---------- Footer ---------- */
.footer { padding-block: 2.5rem; border-top: 1px solid var(--slate-line); font-size: var(--step--1); color: var(--muted-on-slate); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: flex-end; }
.footer__name { color: var(--white); font-weight: 600; font-size: var(--step-0); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a { color: var(--text-on-slate); }

/* ---------- Plain document pages (privacy) ---------- */
.doc { padding-block: var(--section-y); }
.doc h1 { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.doc h2 { font-size: var(--step-1); font-weight: 600; margin: 2.25rem 0 0.5rem; }
.doc p, .doc li { max-width: 40rem; color: var(--muted-on-mist); }
.doc p + p { margin-top: 0.9rem; }
.doc ul { list-style: disc; padding-left: 1.25rem; }

/* ---------- Blog ---------- */
.page__title { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 0.75rem; }
.posts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--mist-line); }
.posts li { border-bottom: 1px solid var(--mist-line); }
.posts a { display: grid; gap: 0.35rem; padding-block: 1.5rem; text-decoration: none; }
@media (min-width: 56em) { .posts a { grid-template-columns: 12rem minmax(0, 1fr); column-gap: 2rem; } .posts__summary { grid-column: 2; } }
.posts__date { font-size: var(--step--1); color: var(--muted-on-mist); padding-top: 0.3rem; }
.posts__title { font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.posts a:hover .posts__title { color: var(--gold-deep); text-decoration: underline; }
.posts__summary { color: var(--muted-on-mist); max-width: 42rem; }
.posts__empty { color: var(--muted-on-mist); }

.post__wrap { max-width: 44rem; }
.post__back { font-size: var(--step--1); margin-bottom: 1.5rem; }
.post__back a { color: var(--muted-on-mist); }
.post__meta { color: var(--muted-on-mist); font-size: var(--step--1); margin-bottom: 1.75rem; }
.post__intro { font-size: var(--step-1); line-height: 1.5; margin-bottom: 1.5rem; }
.post__disclosure { font-size: var(--step--1); color: var(--gold-deep); background: var(--gold-wash); padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 2.5rem; }
.story { padding-block: 2rem; border-top: 1px solid var(--mist-line); }
.story h2 { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 0.9rem; }
.story p { color: var(--muted-on-mist); }
.story p + p { margin-top: 0.8rem; }
.story__why { margin-top: 1rem; color: var(--text-on-mist) !important; }
.story__sources { list-style: none; padding: 0; margin-top: 1.1rem; font-size: var(--step--1); color: var(--muted-on-mist); }
.story__sources li + li { margin-top: 0.3rem; }
.story__sources a { color: var(--text-on-mist); }
