:root {
  --ink: #090909;
  --blue: #2b7d97;
  --cream: #fbf8ef;
  --content: 1200px;
  --gap: 18px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep the desktop content width constant when a page needs a scrollbar. */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "adriane", Georgia, serif;
  font-size: 16px;
  line-height: 1.48;
}

body.menu-open,
body.lightbox-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 1000;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  overflow: visible;
  clip: auto;
  background: #fff;
  font-family: "effra", Arial, sans-serif;
}

.site-header {
  position: sticky;
  z-index: 70;
  top: 0;
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 38px 0 34px;
  font-family: "effra", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: rgba(255, 255, 255, .98);
  transition: padding .3s ease, box-shadow .3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.brand {
  width: min(305px, 28vw);
  line-height: 0;
  transition: width .3s ease;
}

.brand img { width: 100%; height: auto; }

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.3vw, 54px);
  font-size: .98rem;
  font-weight: 500;
}

.top-nav a {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:not(.instagram-link)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .22s ease;
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after,
.top-nav a.is-active::after { transform: scaleX(1); }

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .04em;
}

.language-switch button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-family: "effra", Arial, sans-serif;
  font-weight: 400;
}

.language-switch button[aria-pressed="true"] { font-weight: 700; color: var(--blue); }

.instagram-link { width: 22px; height: 22px; }
.instagram-link svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }

.category-nav {
  display: flex;
  align-items: center;
  gap: clamp(30px, 4.5vw, 72px);
  margin-top: 54px;
  font-size: .94rem;
  font-weight: 400;
  transition: margin .3s ease;
}

@media (min-width: 851px) {
  .category-nav { margin-top: 64px; }

  body:not([data-page="about"]):not([data-page="legal"]) .site-header {
    padding-bottom: 68px;
  }
}

.category-nav a,
.category-nav button {
  text-decoration: none;
  white-space: nowrap;
}

.category-nav button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.category-nav a:hover,
.category-nav a:focus-visible,
.category-nav a.is-active,
.category-nav button:hover,
.category-nav button:focus-visible,
.category-nav button.is-active {
  color: var(--blue);
  /* No bold here: changing the font weight shifts neighboring menu items. */
}

.site-header.is-compact {
  padding-top: 16px;
  padding-bottom: 18px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .045);
}

.site-header.is-compact .brand { width: min(230px, 24vw); }
.site-header.is-compact .category-nav { margin-top: 20px; }

.menu-toggle,
.mobile-menu { display: none; }

.site-main {
  width: 100%;
  max-width: var(--content);
  min-height: 56vh;
  margin: 0 auto;
  padding-bottom: 76px;
}

.project-overview,
.storyboard-overview,
.editorial-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.portfolio-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.portfolio-filter-item {
  min-width: 0;
  transition: opacity .15s ease, transform .15s ease;
}

.portfolio-filter-item.is-filtering-out {
  opacity: 0;
  transform: scale(.97);
}

.portfolio-filter-grid .home-portrait-card {
  width: 100%;
  aspect-ratio: 710 / 538;
}

.portfolio-filter-grid .home-portrait-card img { object-fit: cover; }

.home-section + .home-section {
  margin-top: clamp(54px, 6vw, 76px);
}

.home-section {
  scroll-margin-top: 28px;
}

.home-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.home-section__header h1,
.home-section__header h2 {
  margin: 0;
  font-family: "effra", Arial, sans-serif;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 500;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-section__link {
  flex: 0 0 auto;
  font-family: "effra", Arial, sans-serif;
  font-size: .82rem;
  letter-spacing: .06em;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.project-card {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
}

.project-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 710 / 538;
  background: #f4f4f4;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .48s cubic-bezier(.2, .68, .2, 1);
}

.project-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,.96) 0%, rgba(255,255,255,.8) 17%, rgba(255,255,255,.24) 47%, rgba(255,255,255,0) 70%);
  transform: translateY(101%);
  transition: transform .48s cubic-bezier(.2, .68, .2, 1);
}

.project-card__title {
  position: absolute;
  right: 8%;
  bottom: 7%;
  left: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #050505;
  font-family: "effra", Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .32s ease .08s, transform .42s ease .08s;
}

.project-card__title strong {
  font-size: clamp(1.15rem, 1.55vw, 1.6rem);
  letter-spacing: .1em;
  line-height: 1.1;
}

.project-card__title small {
  margin-top: 4px;
  font-size: clamp(.7rem, .95vw, .9rem);
  letter-spacing: .12em;
}

.project-card:hover img,
.project-card:focus-visible img { transform: scale(.955); }
.project-card:hover .project-card__veil,
.project-card:focus-visible .project-card__veil { transform: translateY(0); }
.project-card:hover .project-card__title,
.project-card:focus-visible .project-card__title { opacity: 1; transform: translateY(0); }

.project-intro {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
  gap: 64px;
  margin: 0 0 48px;
}

.eyebrow,
.project-heading h1,
.about-page h1 {
  font-family: "effra", Arial, sans-serif;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .09em;
}

.project-heading h1,
.about-page h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.13;
  letter-spacing: .08em;
}

.project-description {
  max-width: 650px;
  font-size: 1.02rem;
  line-height: 1.45;
}

.project-description p { margin: 0; }
.project-description .credit { margin-top: .35rem; font-size: inherit; }
.project-description .credit strong { font-weight: 700; }

.project-gallery {
  display: grid;
  gap: var(--gap);
}

.storyboard-gallery {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.storyboard-gallery.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.storyboard-gallery.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.storyboard-gallery .gallery-item {
  align-self: start;
}

.storyboard-gallery .gallery-item img {
  height: auto;
  object-fit: contain;
}

.portrait-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.portrait-item { aspect-ratio: 470 / 537; }
.portrait-item img { object-fit: cover; }
.portrait-gallery .portrait-item .project-card__media {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.editorial-gallery {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.editorial-gallery .gallery-item img {
  height: auto;
  object-fit: contain;
}

.editorial-gallery.layout-full { grid-template-columns: 1fr; }
.editorial-gallery.layout-two,
.editorial-gallery.layout-conversation,
.editorial-gallery.layout-flammkraft,
.editorial-gallery.layout-ampere { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.editorial-gallery.layout-conversation .gallery-item--1,
.editorial-gallery.layout-flammkraft .gallery-item--1,
.editorial-gallery.layout-ampere .gallery-item--1,
.editorial-gallery.layout-ampere .gallery-item--4,
.editorial-gallery.layout-ampere .gallery-item--5,
.editorial-gallery.layout-ampere .gallery-item--8 { grid-column: 1 / -1; }

.storyboard-separator {
  grid-column: 1 / -1;
  height: 1px;
  margin: 24px 0;
  background: #9b9b9b;
}

.gallery-item {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .22s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img { opacity: 1; }

.layout-hide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-hide .gallery-item--3,
.layout-hide .gallery-item--4,
.layout-hide .gallery-item--5 { grid-column: 1 / -1; }

.layout-ben {
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
}
.layout-ben .gallery-item--1 { grid-row: span 2; }
.layout-ben .gallery-item--2,
.layout-ben .gallery-item--3 { min-height: 260px; }
.layout-ben .gallery-item--4,
.layout-ben .gallery-item--5 { grid-column: 1 / -1; }

.layout-emma {
  grid-template-columns: 1.15fr .85fr;
  align-items: stretch;
}
.layout-emma .gallery-item--1,
.layout-emma .gallery-item--5 { grid-column: 1 / -1; }
.layout-emma .gallery-item--2 { grid-row: span 2; }
.layout-emma .gallery-item--3,
.layout-emma .gallery-item--4 { min-height: 250px; }

.project-next {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(42px, 6vw, 76px);
}

.project-next a {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-family: "effra", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-next a:hover,
.project-next a:focus-visible { color: var(--blue); }

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 34px 72px 28px;
  border: 0;
  background: rgba(255, 255, 255, .985);
  color: #000;
}

.lightbox::backdrop { background: rgba(255, 255, 255, .985); }
.lightbox[open] { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; }

.lightbox__figure {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: center;
  height: calc(100vh - 62px);
  margin: 0;
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 95px);
  align-self: start;
  object-fit: contain;
}

.lightbox__count {
  padding-top: 8px;
  font-family: "effra", Arial, sans-serif;
  font-size: .78rem;
  letter-spacing: .12em;
}

.lightbox__close,
.lightbox__arrow {
  border: 0;
  color: #111;
  background: transparent;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 300;
}

.lightbox__close {
  position: fixed;
  z-index: 2;
  top: 18px;
  right: 25px;
  width: 46px;
  height: 46px;
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox__arrow { font-size: 3.4rem; line-height: 1; }

.about-page { padding-top: 56px; }
.about-copy {
  display: grid;
  grid-template-columns: minmax(250px, 350px) minmax(0, 1fr);
  gap: clamp(56px, 8vw, 112px);
  align-items: start;
}

.about-portrait { width: 100%; height: auto; }
.about-meta { margin-top: 25px; }
.about-meta h2,
.about-clients h2 {
  margin: 0 0 5px;
  font-family: "effra", Arial, sans-serif;
  font-size: 1.04rem;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.about-meta p { margin: 0 0 28px; line-height: 1.55; }
.about-meta a { text-underline-offset: 3px; }
.about-meta ul { margin: 0; padding: 0; list-style: none; }
.about-meta li { margin: 0 0 3px; }
.about-meta li::before { content: "– "; }

.about-main h1 { margin: 0 0 30px; font-size: 2rem; }
.about-text { max-width: 720px; }
.about-text p { margin: 0 0 1.35em; font-size: 1.06rem; line-height: 1.62; }
.about-experience { margin: 28px 0 34px; }
.about-experience div { display: flex; gap: .4em; line-height: 1.55; }
.about-experience dt { font-family: "adriane", Georgia, serif; font-weight: 700; }
.about-experience dd { margin: 0; }
.about-clients p { max-width: 760px; margin: 0; font-size: 1.02rem; line-height: 1.6; }

.legal-page { max-width: 800px; padding-top: 42px; }
.legal-page h1 { font-family: "effra", Arial, sans-serif; font-size: 1.7rem; text-transform: uppercase; letter-spacing: .08em; }
.legal-page section { margin-top: 34px; }
.legal-page h2 { margin: 0 0 8px; font-family: "effra", Arial, sans-serif; font-size: 1rem; letter-spacing: .04em; }
.legal-page p { margin: 0; line-height: 1.7; }
.legal-copyright { margin-top: 44px !important; }

.site-footer {
  margin-top: auto;
  background: var(--cream);
  font-family: "effra", Arial, sans-serif;
  font-size: .96rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--content);
  min-height: 130px;
  margin: 0 auto;
  gap: 30px;
}

.footer-inner a { text-decoration: none; }
.footer-inner a:hover,
.footer-inner a:focus-visible { text-decoration: underline; }

.back-to-top {
  position: fixed;
  z-index: 60;
  right: clamp(20px, 3vw, 46px);
  bottom: 30px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid #000;
  border-radius: 50%;
  color: #fff;
  background: #000;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .24);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, background-color .2s ease, box-shadow .2s ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #fff;
  border-color: #000;
  background: #252525;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .32);
  transform: translateY(-2px);
}

@media (max-width: 1280px) {
  .site-header,
  .site-main,
  .footer-inner {
    width: 90vw;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 850px) {
  .site-header { padding-top: 26px; padding-bottom: 28px; }
  .brand { width: min(265px, 62vw); }
  .top-nav,
  .category-nav { display: none; }

  .menu-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 9px 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span:not(.sr-only) {
    display: block;
    width: 100%;
    height: 2px;
    align-self: center;
    background: #111;
    transition: transform .2s ease, opacity .2s ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .mobile-menu {
    position: fixed;
    z-index: 100;
    inset: 92px 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 48px 7vw;
    background: rgba(255,255,255,.99);
    font-size: 1.1rem;
    letter-spacing: .08em;
  }

  .mobile-menu[hidden] { display: none; }
  .mobile-menu a { text-decoration: none; }
  .mobile-menu button[data-portfolio-filter] {
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: uppercase;
  }
  .mobile-menu a.is-active,
  .mobile-menu button.is-active { color: var(--blue); }

  .project-overview,
  .storyboard-overview,
  .editorial-overview,
  .portfolio-filter-grid { grid-template-columns: 1fr; gap: 28px; }

  .site-header.is-compact { padding-top: 12px; padding-bottom: 14px !important; }
  .site-header.is-compact .brand { width: min(225px, 58vw); }

  .home-section + .home-section { margin-top: 58px; }
  .home-section__header { align-items: flex-end; margin-bottom: 20px; }
  .home-section__header h1,
  .home-section__header h2 { font-size: 1.05rem; }
  .home-section__link { font-size: .7rem; }

  .project-card__title {
    position: static;
    align-items: flex-start;
    padding-top: 9px;
    opacity: 1;
    transform: none;
    text-align: left;
  }

  .project-card__media {
    overflow: visible;
    aspect-ratio: auto;
  }

  .project-card img {
    height: auto;
    aspect-ratio: 710 / 538;
  }


  .project-card__title strong { font-size: 1rem; }
  .project-card__title small { font-size: .72rem; }
  .project-card__veil { display: none; }
  .project-card:hover img,
  .project-card:focus-visible img { transform: none; }

  .portrait-gallery .portrait-item { aspect-ratio: auto; }
  .portrait-gallery .portrait-item .project-card__media { height: auto; }
  .portrait-gallery .portrait-item img { aspect-ratio: 470 / 537; }

  .project-intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 34px; }
  .project-description { font-size: 1rem; }

  .layout-hide,
  .layout-ben,
  .layout-emma,
  .storyboard-gallery.columns-2,
  .storyboard-gallery.columns-3,
  .portrait-gallery,
  .editorial-gallery.layout-two,
  .editorial-gallery.layout-conversation,
  .editorial-gallery.layout-flammkraft,
  .editorial-gallery.layout-ampere { grid-template-columns: 1fr; }
  .layout-hide .gallery-item,
  .layout-ben .gallery-item,
  .layout-emma .gallery-item,
  .editorial-gallery .gallery-item { grid-column: auto; grid-row: auto; min-height: 0; }

  .storyboard-separator { margin: 16px 0; }

  .about-page { padding-top: 10px; }
  .about-copy { grid-template-columns: 1fr; gap: 42px; }
  .about-sidebar { max-width: 430px; }
  .about-main h1 { margin-bottom: 24px; }
  .about-experience div { display: block; margin-bottom: 8px; }

  .lightbox { padding: 70px 18px 22px; }
  .lightbox[open] { grid-template-columns: 38px 1fr 38px; }
  .lightbox__figure { height: calc(100vh - 98px); }
  .lightbox__image { max-height: calc(100vh - 130px); }
  .lightbox__arrow { font-size: 2.7rem; }

  .footer-inner { min-height: 115px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }

  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
