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

:root {
  --bg: #ffffff;
  --ink: #0e0f11;
  --muted: #595d63;      /* 6.6:1 on white */
  --muted-inverse: #b4b7bb; /* the same grey's role on the ink footer, 9.4:1 */
  --rule: #e3e3df;
  --rule-strong: #0e0f11;
  --plate: #f3f3f0;      /* image placeholder while loading */

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(20px, 4.4vw, 64px);
  --max: 1440px;
  --col-gap: clamp(16px, 2.2vw, 32px);

  --step--1: 0.9375rem;                         /* 15 */
  --step-0: 1.125rem;                           /* 18 */
  --step-1: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  --step-3: clamp(1.875rem, 1.3rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 1.4rem + 4.4vw, 5.5rem);

  --space-s: clamp(12px, 1.4vw, 20px);
  --space-m: clamp(24px, 3vw, 40px);
  --space-l: clamp(48px, 6vw, 96px);
  --space-xl: clamp(72px, 10vw, 160px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--ink); color: var(--bg); }
html { scrollbar-color: var(--muted) var(--bg); scrollbar-width: thin; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

.vh {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }

.icon { width: 1.05em; height: 1.05em; flex: none; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 48px; padding: 0 22px;
  font: 500 var(--step--1)/1 var(--font);
  color: var(--bg); background: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn:hover { background: #2b2d31; border-color: #2b2d31; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 16px; }
.btn .icon { transition: transform 0.25s var(--ease-out); }
.btn:hover .icon[aria-hidden] { transform: translate(1px, 1px); }
.btn--ghost:hover .icon { transform: translate(1px, -1px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
}
.link-arrow .icon { transition: transform 0.25s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow--back:hover .icon { transform: translateX(-3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s linear;
}
.site-header.is-stuck { border-bottom-color: var(--rule); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px;
}
.wordmark {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
  font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font-size: var(--step--1); }
.site-nav > a:not(.btn) {
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.3em;
  min-height: 44px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.site-nav > a:not(.btn):hover,
.site-nav > a[aria-current] { background-size: 100% 1px; }

@media (max-width: 640px) {
  .site-nav > a.site-nav__cv { display: none; }
  .site-header__inner { min-height: 64px; }
  .site-nav { gap: 18px; }
}
@media (max-width: 480px) {
  .site-nav > a[href="/#work"] { display: none; }
  .site-nav .btn { padding: 0 14px; }
  .site-nav .btn__long { display: none; }
}
@media (max-width: 360px) {
  .site-nav { gap: 12px; }
  .site-nav .btn { padding: 0 10px; }
  .site-nav__ext .icon { display: none; }
}
.site-header__case {
  flex: 1; min-width: 0;
  font-size: var(--step--1); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.site-header.is-past-title .site-header__case { opacity: 1; transform: none; }
@media (max-width: 960px) {
  .site-header__case { position: absolute; left: var(--gutter); right: 50%; pointer-events: none; color: var(--ink); font-weight: 600; }
  .site-header__inner { position: relative; }
  .wordmark { transition: opacity 0.25s var(--ease-out); }
  .site-header.is-past-title .wordmark,
  .site-header.is-past-title .site-nav > a:not(.btn) { opacity: 0; pointer-events: none; }
  .site-header.is-past-title .site-header__case { right: 168px; }
}

/* ---------- Home: intro ---------- */

.intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--space-m);
  align-items: end;
  padding-top: clamp(48px, 9vw, 136px);
  padding-bottom: var(--space-l);
}
.intro__title {
  grid-column: 1 / span 8;
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 13ch;
}
.intro__side { grid-column: 9 / -1; display: grid; gap: var(--space-s); padding-bottom: 0.4em; }
.intro__lede { font-size: var(--step-0); line-height: 1.55; text-wrap: pretty; }
.intro__recognition {
  display: grid; gap: 2px;
  padding-top: var(--space-s); border-top: 1px solid var(--rule);
  font-size: var(--step--1); color: var(--muted);
}
@media (max-width: 960px) {
  .intro__title, .intro__side { grid-column: 1 / -1; }
  .intro__title { max-width: 13ch; }
  .intro__side { max-width: 38rem; }
}

/* ---------- Section titles ---------- */

.section-title {
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.3;
  padding-top: 14px;
  border-top: 1px solid var(--rule-strong);
  margin-bottom: var(--space-m);
}

/* ---------- Home: work ---------- */

.work { padding-bottom: var(--space-xl); }
.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--space-l);
}
.work-item--full { grid-column: 1 / -1; }
.work-item__link { display: grid; gap: 20px; text-decoration: none; }
.work-item__media {
  background: var(--plate);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.work-item--full .work-item__media { aspect-ratio: 21 / 10; }
.work-item--full:not(.work-item--lead) .work-item__media img { object-position: 50% 0; }
.work-item__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.work-item__link:hover .work-item__media img { transform: scale(1.025); }
.work-item__text { display: grid; gap: 8px; max-width: 40rem; }
.work-item--full .work-item__text {
  max-width: none;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.work-item--full .work-item__title { grid-column: 1 / span 6; grid-row: 1 / span 2; font-size: var(--step-3); }
.work-item--full .work-item__summary { grid-column: 7 / -1; grid-row: 1; }
.work-item--full .work-item__awards { grid-column: 7 / -1; grid-row: 2; }
.work-item__title {
  font-size: var(--step-2); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em;
  text-wrap: balance;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 0.16em;
  transition: text-decoration-color 0.25s var(--ease-out);
}
.work-item__link:hover .work-item__title { text-decoration-color: currentColor; }
.work-item__summary { color: var(--ink); text-wrap: pretty; max-width: 36rem; }
.work-item__awards { font-size: var(--step--1); color: var(--muted); }

@media (max-width: 860px) {
  .work-list { grid-template-columns: 1fr; }
  .work-item--full .work-item__media { aspect-ratio: 16 / 10; }
  .work-item--full .work-item__text { display: grid; grid-template-columns: 1fr; }
  .work-item--full .work-item__text > * { grid-column: 1; grid-row: auto; }
  .work-item--full .work-item__title { font-size: var(--step-2); }
}
@media (max-width: 640px) {
  .work-item__media--crop { aspect-ratio: 1000 / 676 !important; }
}

/* ---------- Home: practice ---------- */

.practice { padding-bottom: var(--space-xl); }
.practice__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap); row-gap: var(--space-m);
}
.practice__lede {
  grid-column: 1 / span 6;
  font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500;
  text-wrap: pretty;
}
.practice__list { grid-column: 8 / -1; display: grid; }
.practice__list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.practice__list li:first-child { padding-top: 0; }
.practice__more { margin-top: var(--space-m); }
@media (max-width: 960px) {
  .practice__lede, .practice__list { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--bg); padding-top: var(--space-l); }
.site-footer ::selection { background: var(--bg); color: var(--ink); }
.site-footer :focus-visible { outline-color: var(--bg); }
.contact { display: grid; gap: var(--space-s); max-width: 52rem; padding-bottom: var(--space-l); }
.contact__title {
  font-size: var(--step-4); font-weight: 600; line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance;
}
.contact__text { color: var(--muted-inverse); max-width: 34rem; }
.contact .actions { margin-top: 8px; }
.site-footer .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.site-footer .btn:hover { background: #dcdcd8; border-color: #dcdcd8; }
.site-footer .btn--ghost { background: transparent; color: var(--bg); border-color: #6c7076; }
.site-footer .btn--ghost:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.site-footer__base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid #2c2e33;
  font-size: var(--step--1); color: var(--muted-inverse);
}

/* ---------- Case study ---------- */

.case-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: var(--space-l);
}
.case-head > .link-arrow { grid-column: 1 / -1; justify-self: start; font-size: var(--step--1); margin-bottom: var(--space-l); }
.case-head__title {
  grid-column: 1 / span 10;
  font-size: var(--step-4); font-weight: 600; line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 17ch;
  margin-bottom: var(--space-m);
}
.case-head__body { grid-column: 1 / span 7; display: grid; gap: 1em; }
.case-head__lede { font-size: var(--step-1); line-height: 1.5; text-wrap: pretty; }
.case-facts {
  grid-column: 9 / -1; grid-row: 3;
  display: grid; gap: 18px; align-content: start;
  font-size: var(--step--1);
}
.case-facts > div { padding-top: 12px; border-top: 1px solid var(--rule); }
.case-facts dt { color: var(--muted); margin-bottom: 2px; }
@media (max-width: 960px) {
  .case-head__title, .case-head__body, .case-facts { grid-column: 1 / -1; }
  .case-facts { grid-row: auto; margin-top: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); column-gap: var(--col-gap); }
}

.case-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-bottom: var(--space-l);
}
.case-body > * { grid-column: 1 / -1; }
.block + .block, .portrait-grid, .block + .portrait-grid { margin-top: var(--space-m); }
.block--feature + .block--prose { margin-top: var(--space-s); }
.block--feature, .block--points, .block--intro { margin-top: var(--space-xl) !important; }
.block--image + .block--image { margin-top: var(--col-gap); }

.video { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; left: var(--space-s); bottom: var(--space-s);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px 0 18px;
  background: var(--bg); color: var(--ink);
  font-weight: 500; font-size: var(--step--1);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.video:hover img { transform: scale(1.02); }
.video:hover .video__play { background: var(--ink); color: var(--bg); }
.video.is-playing .video__play { display: none; }

.block--feature {
  display: grid; grid-template-columns: subgrid; grid-column: 1 / -1;
  padding-top: 14px; border-top: 1px solid var(--rule-strong);
}
.feature__label:empty { visibility: hidden; }
.feature__label { grid-column: 1 / span 3; font-size: var(--step--1); color: var(--muted); padding-top: 0.45em; }
.feature__heading {
  grid-column: 4 / span 8;
  font-size: var(--step-3); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em;
  text-wrap: balance;
}
.block--prose { grid-column: 4 / span 6 !important; display: grid; gap: 1em; text-wrap: pretty; }
.block--prose p { max-width: 66ch; }

.block--image { background: var(--plate); }
.block--image img { width: 100%; }
.portrait-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.portrait-grid .block { margin-top: 0 !important; }

.block--points {
  display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; row-gap: var(--space-m);
  padding-top: 14px; border-top: 1px solid var(--rule-strong);
}
.block--points > div { grid-column: span 6; display: grid; gap: 8px; align-content: start; }
.block--points > div:nth-child(odd) { grid-column: 4 / span 4; }
.block--points > div:nth-child(even) { grid-column: 9 / span 4; }
.block--points dt { font-size: var(--step-1); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.block--points dd { color: var(--ink); text-wrap: pretty; }

.pull p {
  font-size: var(--step-3); font-weight: 500; line-height: 1.12; letter-spacing: -0.025em;
  text-wrap: balance;
}
.pull footer { margin-top: 14px; font-size: var(--step--1); color: var(--muted); }
.block--quote { grid-column: 4 / span 8 !important; margin-top: var(--space-xl) !important; }

.block--intro { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; row-gap: var(--space-m); }
.block--intro .pull { grid-column: 1 / span 7; }
.block--intro .block--prose { grid-column: 4 / span 6 !important; }

@media (max-width: 960px) {
  .feature__label, .feature__heading,
  .block--prose, .block--quote,
  .block--intro .pull, .block--intro .block--prose,
  .block--points > div:nth-child(n) { grid-column: 1 / -1 !important; }
  .feature__label { display: none; }
}
@media (max-width: 560px) {
  .portrait-grid { grid-template-columns: 1fr; }
}

/* Next case */
.next-case { padding-bottom: var(--space-xl); }
.next-case__link {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap); row-gap: var(--space-s);
  padding-top: 14px; border-top: 1px solid var(--rule-strong);
  text-decoration: none; align-items: start;
}
.next-case__label { grid-column: 1 / span 3; display: inline-flex; gap: 0.4em; align-items: center; font-size: var(--step--1); color: var(--muted); padding-top: 0.5em; }
.next-case__title {
  grid-column: 4 / span 4;
  font-size: var(--step-3); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance;
}
.next-case__media { grid-column: 8 / -1; aspect-ratio: 16 / 10; overflow: hidden; background: var(--plate); }
.next-case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.next-case__link:hover .next-case__media img { transform: scale(1.03); }
.next-case__link:hover .next-case__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.next-case__link:hover .next-case__label .icon { transform: translateX(3px); }
.next-case__label .icon { transition: transform 0.25s var(--ease-out); }
@media (max-width: 860px) {
  .next-case__label, .next-case__title, .next-case__media { grid-column: 1 / -1; }
  .next-case__label { order: 2; padding-top: 0; }
  .next-case__media { order: 3; }
}

/* ---------- CV ---------- */

.cv { padding-top: clamp(40px, 7vw, 112px); padding-bottom: var(--space-xl); }
.cv-head { display: grid; gap: var(--space-s); max-width: 50rem; margin-bottom: var(--space-l); }
.cv-head__title { font-size: var(--step-4); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.cv-head__role { font-size: var(--step-1); color: var(--muted); }
.cv-head__intro { font-size: var(--step-1); line-height: 1.5; text-wrap: pretty; }
.cv-head .actions { margin-top: 8px; }

.cv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: var(--space-l); }
.cv-experience { grid-column: 1 / span 8; }
.cv-aside { grid-column: 10 / -1; display: grid; gap: var(--space-l); align-content: start; }
.timeline__item {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); column-gap: var(--col-gap);
  padding: 20px 0 28px; border-bottom: 1px solid var(--rule);
}
.timeline__item:first-child { padding-top: 0; }
.timeline__dates { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.3em; }
.timeline__body { display: grid; gap: 10px; max-width: 64ch; }
.timeline__role { font-size: var(--step-1); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.timeline__org { color: var(--muted); margin-top: -8px; }
.timeline__body ul { display: grid; gap: 6px; }
.timeline__body li { position: relative; padding-left: 18px; }
.timeline__body li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 8px; height: 1px; background: currentColor; }
.plain { display: grid; gap: 4px; }
@media (max-width: 960px) {
  .cv-experience, .cv-aside { grid-column: 1 / -1; }
  .cv-aside { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: var(--col-gap); }
}
@media (max-width: 560px) {
  .timeline__item { grid-template-columns: 1fr; row-gap: 4px; }
}

/* ---------- 404 ---------- */
.intro--404 { min-height: 60vh; }

/* ---------- Motion: image reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ease-out); }
  .js .reveal > img { transition: transform 1.4s var(--ease-out); }
  .js .reveal.is-pending { clip-path: inset(14% 0 0 0); }
  .js .reveal.is-pending > img { transform: translateY(4%) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
