:root {
  --color-text: #171717;
  --color-muted: #6f6f6f;
  --color-line: #d8d8d8;
  --color-soft: #f5f5f3;
  --color-white: #fff;
  --max-page: 1280px;
  --page-gutter: clamp(20px, 5vw, 72px);
  --font-main: 'Montserrat', Arial, Helvetica, sans-serif;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

body.has-open-lightbox {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  margin-top: 0;
}

strong {
  font-weight: 700;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 88px);
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 38px var(--page-gutter) 76px;
  animation: tullia-page-intro 700ms var(--motion-ease) both;
}

.site-brand {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}

.site-brand__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
}

.site-brand__name,
.site-footer__name {
  margin: 0;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.08;
  text-transform: uppercase;
}

.site-brand__role {
  color: #4a4a4a;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.site-brand__baseline {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.18;
}

.site-brand__baseline strong {
  font-weight: 700;
}

.site-nav__list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: clamp(22px, 3vw, 48px);
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  white-space: nowrap;
}

.site-nav__list a {
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1;
}

.site-nav__list a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--motion-ease);
}

.site-nav__list a:hover::after,
.site-nav__list a.site-nav__link--active-section::after,
.site-nav__list .current-menu-item > a::after,
.site-nav__list .current_page_item > a::after {
  transform: scaleX(1);
}

.site-main {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.projects-section {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-kicker span,
.about-band__line {
  display: inline-block;
  flex: 0 0 auto;
  width: 38px;
  height: 1px;
  background: var(--color-text);
  transform-origin: left center;
}

.is-revealed .section-kicker span,
.about-band.is-revealed .about-band__line {
  animation: tullia-line-reveal 720ms var(--motion-ease) both;
}

.projects-section.is-revealed .section-kicker span {
  animation-delay: 360ms;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: var(--color-text);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.section-link span {
  font-size: 20px;
  line-height: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 32px;
}

.project-card {
  min-width: 0;
}

.project-card:nth-child(2n) {
  transition-delay: 90ms;
}

.project-card:nth-child(3n) {
  transition-delay: 140ms;
}

.project-card__media {
  position: relative;
  aspect-ratio: 1.25 / 1;
  background: var(--color-soft);
  overflow: hidden;
}

.project-card__lightbox-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  padding: 0;
}

.project-card__media--image::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, #f3f3f1, #e9e8e3);
  content: "";
  opacity: 1;
  pointer-events: none;
  transition: opacity 520ms var(--motion-ease);
}

.project-card__media--image.is-loaded::before {
  opacity: 0;
}

.project-card__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.012) translateX(8px);
  visibility: hidden;
  transition:
    opacity 420ms var(--motion-ease),
    transform 640ms var(--motion-ease),
    visibility 0s linear 420ms;
}

.project-card__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.project-card__slide[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.012) translateX(-8px);
  visibility: hidden;
}

.project-card__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 520ms var(--motion-ease),
    transform 900ms var(--motion-ease);
}

.has-reveal-motion .project-card__slide img[data-image-load] {
  opacity: 0;
}

.has-reveal-motion .project-card__slide img[data-image-load].is-loaded {
  opacity: 1;
}

.project-card__media:hover img {
  transform: scale(1.025);
}

.project-card__slide--text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(28px, 4vw, 54px);
  background: var(--color-soft);
}

.project-card__slide--text p {
  max-width: 36ch;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.25;
}

.project-card__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding-top: 14px;
  transition:
    opacity 260ms var(--motion-ease),
    transform 280ms var(--motion-ease);
}

.project-card:hover .project-card__meta {
  opacity: 0.86;
  transform: translateY(-2px);
}

.project-card__meta h2 {
  margin: 0 0 2px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.project-card__title {
  text-transform: uppercase;
}

.project-card__separator {
  margin: 0 4px;
}

.project-card__subtitle {
  font-weight: 300;
}

.project-card__meta p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.project-card__controls {
  position: relative;
  z-index: 3;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-card__count {
  position: relative;
  z-index: 1;
  min-width: 42px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.project-card__controls::before {
  position: absolute;
  inset: -12px -10px;
  content: "";
}

.project-card__prev,
.project-card__next {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  min-width: 42px;
  min-height: 36px;
  padding: 0 0 8px;
  text-align: center;
}

.project-card__prev {
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition:
    opacity 220ms var(--motion-ease),
    transform 220ms var(--motion-ease);
}

.project-card__prev.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.project-card__prev:hover {
  transform: translateX(-2px);
}

.project-card__next:hover {
  transform: translateX(2px);
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(44px, 8vw) minmax(0, 1fr) minmax(44px, 8vw);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: clamp(20px, 4vw, 54px);
  background: rgba(250, 250, 248, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 260ms var(--motion-ease),
    transform 320ms var(--motion-ease);
}

.project-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.project-lightbox__close,
.project-lightbox__nav {
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  opacity: 0;
  transition:
    opacity 260ms var(--motion-ease),
    transform 260ms var(--motion-ease);
}

.project-lightbox__close {
  grid-column: 3;
  justify-self: end;
  font-size: 28px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  transform: translateY(-4px);
}

.project-lightbox.is-open .project-lightbox__close {
  opacity: 1;
  transform: translate(0, 0);
}

.project-lightbox.is-open .project-lightbox__nav {
  opacity: 1;
}

.project-lightbox.is-open .project-lightbox__nav--prev,
.project-lightbox.is-open .project-lightbox__nav--next {
  transform: translateX(0);
}

.project-lightbox__stage {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.project-lightbox__stage .project-card__slide {
  position: static;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-height: 78vh;
  opacity: 1;
  animation: tullia-lightbox-slide-in 520ms var(--motion-ease) both;
  pointer-events: auto;
  transform: none;
  visibility: visible;
}

.project-lightbox__stage img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.project-lightbox__stage .project-card__slide--text {
  width: min(720px, 100%);
  min-height: min(420px, 60vh);
}

.project-lightbox__nav {
  grid-row: 2;
  align-self: center;
  font-size: 32px;
  line-height: 1;
  min-width: 44px;
  min-height: 72px;
}

.project-lightbox__nav--prev {
  grid-column: 1;
  justify-self: start;
  transform: translateX(6px);
}

.project-lightbox__nav--next {
  grid-column: 3;
  justify-self: end;
  transform: translateX(-6px);
}

.project-lightbox.is-open .project-lightbox__nav--prev:hover {
  transform: translateX(-3px);
}

.project-lightbox.is-open .project-lightbox__nav--next:hover {
  transform: translateX(3px);
}

.project-lightbox__caption {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
}

.project-lightbox.is-open .project-lightbox__caption {
  animation: tullia-lightbox-caption-in 520ms var(--motion-ease) 140ms both;
}

.project-lightbox__caption span:first-child {
  color: var(--color-text);
}

.about-band {
  display: flex;
  align-items: stretch;
  min-height: 220px;
  margin: 70px 0 44px;
  background: var(--color-soft);
}

.about-band__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr;
  align-items: start;
  gap: 24px;
  width: 100%;
  padding: 52px;
}

.about-band__link:hover .about-band__arrow {
  transform: translateX(4px);
}

.about-band__line {
  grid-column: 1 / -1;
}

.about-band__title {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.about-band__arrow {
  align-self: end;
  color: var(--color-text);
  font-size: 28px;
  line-height: 1;
  transition: transform 320ms var(--motion-ease);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(140px, 1fr));
  gap: 42px clamp(32px, 5vw, 72px);
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 34px var(--page-gutter) 26px;
  border-top: 1px solid var(--color-line);
}

.site-footer--no-social {
  grid-template-columns: minmax(260px, 2fr) minmax(140px, 1fr);
}

.site-footer__contact,
.site-footer__nav a,
.site-footer__social a {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.45;
}

.site-footer p {
  margin: 0 0 18px;
}

.site-footer a:hover {
  color: var(--color-text);
}

.site-footer a {
  position: relative;
  display: inline-block;
}

.site-footer a::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.65;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--motion-ease);
}

.site-footer a:hover::after {
  transform: scaleX(1);
}

.site-footer__brand {
  display: grid;
  align-content: start;
  gap: 16px;
}

.site-footer__brand p {
  margin: 0;
}

.site-footer__contact {
  display: grid;
  gap: 5px;
}

.site-footer__contact a:hover {
  color: var(--color-text);
}

.site-footer__heading {
  color: var(--color-text);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-footer__nav {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav li {
  margin: 0;
}

.site-footer__social,
.site-footer__links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.site-footer__links {
  justify-self: start;
}

.site-footer__social a {
  display: block;
}

.site-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.35;
}

.site-footer__legal > * {
  flex: 0 1 auto;
}

.page-content {
  max-width: 920px;
  min-height: 48vh;
  padding-bottom: 80px;
}

.page-content--animated {
  animation: tullia-page-intro 620ms var(--motion-ease) both;
}

.page-content--about {
  max-width: 980px;
}

.page-content--contact {
  max-width: 1080px;
}

.page-content__header {
  margin-bottom: 36px;
}

.page-content__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
}

.page-content__image {
  align-self: end;
  margin: 0;
  justify-self: end;
}

.page-content__image img {
  max-height: 520px;
  width: auto;
  object-fit: contain;
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 620ms var(--motion-ease),
    transform 760ms var(--motion-ease);
}

.has-reveal-motion .page-content__image img[data-image-load] {
  opacity: 0;
  transform: translateX(18px);
}

.has-reveal-motion .page-content__image img[data-image-load].is-loaded {
  opacity: 1;
  transform: translateX(0);
}

.page-content__body {
  color: var(--color-text);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.35;
}

.page-content__body p,
.page-content__body ul,
.page-content__body ol {
  margin-bottom: 1em;
}

.page-content__body a {
  border-bottom: 1px solid currentColor;
}

.page-content__body--narrow {
  max-width: 720px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr);
  gap: 48px;
}

.contact-layout--single {
  grid-template-columns: minmax(0, 720px);
}

.contact-details {
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.45;
}

.contact-details p {
  margin: 0 0 14px;
}

.contact-details a:hover {
  color: var(--color-text);
}

.empty-state {
  margin: 0;
  color: var(--color-muted);
}

.has-reveal-motion [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 640ms var(--motion-ease),
    transform 720ms var(--motion-ease);
}

.has-reveal-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes tullia-page-intro {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tullia-line-reveal {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes tullia-lightbox-slide-in {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes tullia-lightbox-caption-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .has-reveal-motion [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding-bottom: 56px;
  }

  .projects-grid {
    gap: 38px 24px;
  }

  .site-footer {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(120px, 1fr));
    gap: 34px;
  }

  .site-footer--no-social {
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .site-header {
    display: grid;
    gap: 26px;
    padding-top: 26px;
    padding-bottom: 46px;
  }

  .site-brand {
    min-width: 0;
  }

  .site-nav__list {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 18px 26px;
    padding-top: 0;
    white-space: normal;
  }

  .site-main {
    padding-bottom: 0;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .section-link {
    gap: 14px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .project-card__media {
    aspect-ratio: 1.18 / 1;
  }

  .project-card__meta {
    padding-top: 12px;
  }

  .project-card__meta h2 {
    font-size: 15px;
  }

  .project-lightbox {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 12px;
    padding: 18px;
  }

  .project-lightbox__stage,
  .project-lightbox__caption {
    grid-column: 1 / -1;
  }

  .project-lightbox__nav {
    grid-row: 3;
    min-height: 44px;
  }

  .project-lightbox__caption {
    grid-row: 4;
  }

  .about-band {
    min-height: 190px;
    margin: 54px 0 36px;
  }

  .about-band__link {
    padding: 36px 28px;
  }

  .about-band__title {
    font-size: 21px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer__legal {
    justify-content: flex-start;
  }

  .page-content {
    min-height: 42vh;
    padding-bottom: 64px;
  }

  .page-content__header {
    margin-bottom: 30px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-content__layout {
    grid-template-columns: 1fr;
  }

  .page-content__image {
    justify-self: start;
  }

  .page-content__image img {
    max-height: 420px;
  }
}

@media (max-width: 480px) {
  .site-brand__name,
  .site-brand__role,
  .site-footer__name {
    font-size: 17px;
  }

  .site-footer__contact,
  .site-footer__nav a,
  .site-footer__social a {
    font-size: 12px;
  }

  .site-brand__baseline {
    font-size: 14px;
  }

  .section-heading {
    display: grid;
  }

  .project-card__media {
    aspect-ratio: 1 / 0.9;
  }

  .project-card__slide--text {
    padding: 26px;
  }
}
