@font-face {
  font-family: "Neue Haas Unica Pro";
  src: url("./assets/fonts/neue-haas.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Variable";
  src: url("./assets/fonts/helvetica-now.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-main: #111111;
  --color-bg: #f8f6f2;
  --selection-color: #111111;
  --selection-bg: rgba(68, 48, 0, 0.2);
  --focus-bg: var(--color-main);
  --focus-color: var(--color-bg);
  --header-height: 8.4rem;
  --page-padding: 1.6rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-reveal: cubic-bezier(0.87, 0, 0.13, 1);
  --bg-brightness: 1;
  color-scheme: light;
  font-size: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scrollbar-width: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100%;
  color: var(--color-main);
  background: var(--color-bg);
  font: 400 1.6rem/1.3 "Neue Haas Unica Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: color 0.8s ease, background-color 0.8s ease;
}

body::-webkit-scrollbar {
  display: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: url("./assets/paper.jpg") top left repeat;
  background-size: 286px;
  filter: brightness(var(--bg-brightness));
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  background: none;
  font: inherit;
}

a {
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-bg);
  outline-offset: -2px;
}

::selection {
  color: var(--selection-color);
  background: var(--selection-bg);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  overflow: clip;
  background-color: var(--color-bg);
  transition: background-color 0.8s ease;
}

.container {
  width: calc(100% - 3.2rem);
  max-width: 114.05vw;
  margin: 0 auto;
}

.uppercase {
  text-transform: uppercase;
}

.font-small {
  font: 400 1.2rem/1 "Helvetica Now Variable", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

.font-headline-1 {
  font: 400 5.4rem/1.24 "Neue Haas Unica Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.04em;
}

.font-headline-2-large {
  font: 400 5.5rem/1.24 "Neue Haas Unica Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

/* Header */
.header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--header-height);
  padding: 0 var(--page-padding);
  text-transform: uppercase;
}

.header-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: start;
  gap: 0.8rem;
  width: 100%;
}

.brand-wrapper {
  grid-column: span 3;
}

.brand {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.roll-line {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1;
}

.roll-line > span {
  display: block;
  transition: transform 0.4s var(--ease-out);
}

.roll-line > span:nth-child(2) {
  position: absolute;
  top: 100%;
  left: 0;
}

.brand:hover .roll-line > span,
.brand:focus-visible .roll-line > span,
.text-link:hover .roll-line > span,
.text-link:focus-visible .roll-line > span {
  transform: translateY(-100%);
}

.signature {
  display: block;
  grid-column: 5 / span 3;
  width: 10.1rem;
  height: 5.1rem;
}

.signature svg {
  display: block;
  width: 100%;
  height: 100%;
}

.main-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  grid-column: 9 / span 2;
  margin-top: -1rem;
  margin-left: -1rem;
  user-select: none;
}

.text-link {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-transform: uppercase;
}

.main-nav .text-link {
  padding: 1rem 1rem 0;
}

.main-nav .contact-link {
  padding: 0 1rem 1rem;
}

.local-time {
  display: flex;
  justify-content: space-between;
  gap: 1.1rem;
  grid-column: 13 / span 2;
  white-space: nowrap;
}

.local-time time {
  display: inline-block;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

/* Case hero */
.hero {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: -2.4rem;
  padding: 0;
}

.hero > * {
  grid-column: span 14;
}

.left {
  position: sticky;
  top: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  grid-column: 1 / span 8;
  height: calc(100vh - 10rem);
}

.title {
  padding-top: 0;
  text-transform: lowercase;
}

.left > .title {
  max-width: 64.4rem;
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding-top: 3.6rem;
  padding-bottom: 1.6rem;
}

.content span {
  display: block;
}

.meta {
  flex-shrink: 0;
}

.meta-item {
  line-height: 1.14;
}

.cat {
  overflow: hidden;
}

.cats-tags {
  min-width: 0;
}

.right {
  grid-column: 9 / span 6;
  padding-bottom: 1rem;
}

.image-wrapper {
  display: flex;
  align-items: flex-end;
  height: calc(100vh - 6rem);
  padding-bottom: 1.6rem;
}

.image {
  width: 100%;
  height: 100%;
}

.image img,
.image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mob-content {
  display: none;
}

.desc {
  padding-top: 5.6rem;
}

.desc-text {
  font: 400 4rem/1.22 "Neue Haas Unica Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.04em;
}

.desc-text + .desc-text {
  margin-top: 1em;
}

/* Intro */
.js .hero .left > .title,
.js .hero .content,
.js .hero .mob-content > .title,
.js .desc-text {
  opacity: 0;
  transform: translateY(2.4rem);
}

.js .hero .right {
  opacity: 0;
  transform: translateY(11rem);
}

.js .case-page.is-ready .hero .left > .title,
.js .case-page.is-ready .hero .mob-content > .title,
.js .case-page.is-ready .desc-text {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s ease, transform 1.15s var(--ease-reveal);
}

.js .case-page.is-ready .hero .content {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s ease 0.55s, transform 0.9s var(--ease-reveal) 0.55s;
}

.js .case-page.is-ready .hero .right {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s ease 0.1s, transform 1.4s var(--ease-reveal) 0.1s;
}

/* Project gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.8rem;
  padding-top: 23rem;
}

.project-gallery > * {
  grid-column: span 14;
}

.gallery-item {
  margin-bottom: 23.2rem;
}

.gallery-item .img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-name {
  display: flex;
  align-items: center;
  margin-top: 1.6rem;
  overflow: hidden;
  line-height: 1.1;
}

.gallery-item-name span {
  margin-right: 2.4rem;
}

.js .gallery-item .img-wrap {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 1.3s var(--ease-reveal);
}

.js .gallery-item--slow .img-wrap {
  transition-duration: 1.95s;
}

.js .gallery-item-name {
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.6s ease 0.7s, transform 0.8s var(--ease-reveal) 0.7s;
}

.js .gallery-item.is-visible .img-wrap {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.js .gallery-item.is-visible .gallery-item-name {
  opacity: 1;
  transform: translateY(0);
}

.page--nine-furniture .gallery-item:nth-child(1) {
  aspect-ratio: 1002 / 564;
  grid-column: span 10;
}

.page--nine-furniture .gallery-item:nth-child(2) {
  aspect-ratio: 1002 / 564;
  grid-column: 5 / span 10;
}

.page--nine-furniture .gallery-item:nth-child(3),
.page--nine-furniture .gallery-item:nth-child(5),
.page--nine-furniture .gallery-item:nth-child(8) {
  aspect-ratio: 1002 / 564;
  grid-column: 3 / span 10;
}

.page--nine-furniture .gallery-item:nth-child(4) {
  aspect-ratio: 1406 / 791;
  grid-column: span 14;
}

.page--nine-furniture .gallery-item:nth-child(6) {
  aspect-ratio: 799 / 500;
  grid-column: span 8;
}

.page--nine-furniture .gallery-item:nth-child(7) {
  aspect-ratio: 799 / 500;
  grid-column: 7 / span 8;
}

.page--nine-furniture .gallery-item:nth-child(9) {
  aspect-ratio: 799 / 500;
  grid-column: 3 / span 8;
}

/* Next case */
.next {
  display: block;
  height: auto;
  padding-top: 5rem;
  padding-bottom: 1.6rem;
  overflow: hidden;
}

.next-link {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: flex-end;
  gap: 0.8rem;
}

.next-link > * {
  grid-column: span 14;
}

.next-left {
  position: relative;
  grid-column: span 8;
  margin-bottom: -2.2rem;
}

.next-title {
  max-width: 64.4rem;
  padding-bottom: 0.5rem;
}

.next-title > div:not(:first-child) {
  margin-top: -3.2rem;
}

.next-title-line {
  position: relative;
  display: block;
  overflow: hidden;
}

.next-title-line > span {
  display: inline-block;
  transition: transform 0.6s var(--ease-out);
}

.next-title-line > span:nth-child(2) {
  position: absolute;
  top: 100%;
  left: 0;
}

.next-title-name {
  display: block;
  overflow: hidden;
}

.next .content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

.tags {
  display: flex;
  margin-top: 0.12rem;
}

.tags-inner {
  display: flex;
  gap: 1.2rem;
  line-height: 1.14;
}

.next-image {
  aspect-ratio: 192 / 221;
  grid-column: 13 / span 2;
  transition: transform 0.6s var(--ease-out);
}

.next-image-img {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.next-image img,
.next-image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.4);
  transform-origin: 50%;
  transition: transform 0.6s var(--ease-out);
}

.next-link:hover .next-image,
.next-link:focus-visible .next-image {
  transform: translateY(-8px);
}

.next-link:hover .next-image video,
.next-link:focus-visible .next-image video {
  transform: translateY(4px) scale(1.4);
}

.next-link:hover .next-title-line > span,
.next-link:focus-visible .next-title-line > span {
  transform: translateY(-100%);
}

.js .next-title,
.js .next .content {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.7s ease, transform 0.9s var(--ease-reveal);
}

.js .next-image-img {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 1.3s var(--ease-reveal);
}

.js .next.is-visible .next-title,
.js .next.is-visible .content {
  opacity: 1;
  transform: translateY(0);
}

.js .next.is-visible .next-image-img {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Menu and contact */
.info-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  color: var(--color-main);
  background: var(--color-bg);
}

.info-dialog::backdrop {
  background: var(--color-bg);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 2.4rem;
  right: 2.4rem;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: 8rem 2.4rem 2.4rem;
}

.dialog-content h2 {
  margin-top: 2rem;
  font-size: clamp(7rem, 15vw, 24rem);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.original-link {
  align-self: flex-start;
  margin-top: 2.4rem;
  border-bottom: 1px solid currentColor;
}

.contact-dialog .dialog-content {
  justify-content: center;
}

.contact-dialog h2 {
  font-size: clamp(5rem, 10vw, 15rem);
  line-height: 0.9;
}

.contact-copy {
  max-width: 46rem;
  margin-top: 3.2rem;
  font-size: 1.8rem;
}

@media only screen and (min-width: 1438px) {
  body {
    font-size: 1.11vw;
  }

  .left {
    top: 6.95vw;
    height: calc(100vh - 6.95vw);
  }

  .left > .title,
  .next-title {
    max-width: 44.78vw;
  }

  .font-headline-1,
  .font-headline-2-large {
    font-size: 6.26vw;
  }

  .content {
    padding-top: 2.5vw;
  }

  .right {
    padding-bottom: 0.7vw;
  }

  .desc {
    padding-top: 3.89vw;
  }

  .desc-text {
    font-size: 2.78vw;
  }

  .project-gallery {
    padding-top: 15.99vw;
  }

  .gallery-item {
    margin-bottom: 16.13vw;
  }

  .next {
    padding-top: 3.48vw;
  }

  .next-left {
    margin-bottom: -1.53vw;
  }

  .next-title {
    padding-bottom: 0.35vw;
  }

  .next-title > div:not(:first-child) {
    margin-top: -2.23vw;
  }
}

@media only screen and (max-width: 1024px) {
  :root {
    --header-height: 5.6rem;
  }

  .header-grid,
  .hero,
  .project-gallery,
  .next-link {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .hero > *,
  .project-gallery > *,
  .next-link > * {
    grid-column: span 6;
  }

  .brand-wrapper {
    grid-column: span 2;
  }

  .brand {
    gap: 0;
  }

  .signature {
    display: none;
  }

  .main-nav {
    grid-column: 4 / span 1;
    margin: 0;
  }

  .main-nav .text-link,
  .main-nav .contact-link {
    padding: 0;
  }

  .local-time {
    grid-column: 5 / span 2;
    padding-left: 24%;
  }

  .local-time time {
    margin-top: 0;
  }

  .hero {
    margin-top: 0;
    padding-top: 6.4rem;
  }

  .left {
    display: none;
  }

  .right {
    grid-column: 4 / span 3;
    padding-bottom: 0;
  }

  .image-wrapper {
    display: block;
    height: auto;
    padding-bottom: 0;
  }

  .image {
    height: auto;
    aspect-ratio: 387 / 482;
  }

  .mob-content {
    display: block;
  }

  .mob-content .content {
    padding-top: 17.8rem;
  }

  .desc {
    padding-top: 4.4rem;
  }

  .desc-text {
    font-size: 2.6rem;
  }

  .project-gallery {
    padding-top: 8rem;
  }

  .gallery-item {
    margin-bottom: 7.2rem;
  }

  .gallery-item-name span {
    margin-right: 1.2rem;
  }

  .page--nine-furniture .gallery-item:nth-child(n) {
    grid-column: span 6;
  }

  .next {
    display: flex;
    align-items: flex-end;
    height: calc(100dvh - 7.2rem);
    padding-top: 0;
    padding-bottom: 0.8rem;
    overflow: visible;
  }

  .next-link {
    align-items: stretch;
    width: 100%;
  }

  .next-left {
    grid-column: span 6;
    margin-bottom: 12.6rem;
  }

  .next-title {
    max-width: none;
    font-size: 5.4rem;
  }

  .next-title > div:not(:first-child) {
    margin-top: -1.6rem;
  }

  .next .content {
    display: none;
  }

  .next-image {
    grid-column: 4 / span 3;
  }

  .next-image img,
  .next-image video {
    transform: scale(1.3);
  }

  .next-link:hover .next-image video,
  .next-link:focus-visible .next-image video {
    transform: translateY(4px) scale(1.3);
  }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .font-headline-1 {
    font-size: 4.8rem;
  }
}

@media only screen and (max-width: 767px) {
  :root {
    --header-height: 4rem;
    --page-padding: 0.8rem;
  }

  .container {
    width: calc(100% - 1.6rem);
  }

  .main-nav {
    grid-column: 3 / span 2;
  }

  .contact-link {
    display: none;
  }

  .local-time {
    justify-content: flex-end;
    grid-column: 5 / span 2;
    padding-left: 0;
  }

  .local-label {
    display: none;
  }

  .right {
    grid-column: 1 / span 6;
  }

  .image {
    overflow: hidden;
  }

  .image img,
  .image video {
    transform: scale(1.05);
  }

  .meta-item {
    line-height: 1.19;
  }

  .next-left {
    margin-bottom: 9.5rem;
  }

  .next-image {
    grid-column: 3 / span 4;
  }

  .dialog-close {
    top: 1.6rem;
    right: 1.6rem;
  }

  .dialog-content {
    padding: 6rem 1.6rem 1.6rem;
  }

  .dialog-content h2 {
    font-size: 24vw;
  }

  .contact-dialog h2 {
    font-size: 13vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero .right,
  .js .hero .left > .title,
  .js .hero .content,
  .js .hero .mob-content > .title,
  .js .desc-text,
  .js .next-title,
  .js .next .content,
  .js .gallery-item-name {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .gallery-item .img-wrap,
  .js .next-image-img {
    clip-path: none;
    transition: none;
  }

  .roll-line > span,
  .next-image,
  .next-image video,
  .next-title-line > span {
    transition-duration: 0.01ms;
  }
}
