@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* the studio grey of the product photos, so they have no visible edges */
  --page: #f2f2f2;
  --ink: #1d1d1b;
  --pink: #f3c6bd;
  --orange: #f0864a;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --space: clamp(5rem, 11vw, 10rem);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.125rem/1.55 "Jost", "Century Gothic", sans-serif;
  overflow-x: clip;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--space);
}
.section--pink {
  background: var(--pink);
}
.text > * + * {
  margin-top: 1em;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: absolute;
  z-index: 30;
  inset: 1rem auto auto 1rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: 2em;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.button:hover,
.button--ghost {
  background: transparent;
  color: var(--ink);
}
.button--ghost:hover {
  background: var(--ink);
  color: #fff;
}
.swatch {
  appearance: none;
  flex: none;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--colour) content-box;
  box-shadow: inset 0 0 0 2px transparent;
  cursor: pointer;
  transition: border-color 0.25s, padding 0.25s;
}
.swatch:checked,
.swatch[aria-current] {
  padding: 3px;
  border-color: var(--ink);
}

/* Header */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.75rem;
}
.is-home .site-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
}
.site-header__logo {
  position: relative;
  z-index: 21;
}
.menu {
  display: flex;
  gap: 2.25rem;
}
.menu a {
  text-decoration: none;
  background: linear-gradient(currentcolor, currentcolor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.menu a:hover,
.menu a[aria-current] {
  background-size: 100% 2px;
}
.menu-button {
  display: none;
}

/* Hero: one sofa in front of its own name */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100svh;
  min-height: 36rem;
  overflow: hidden;
  background: var(--field);
  transition: background-color 1.1s var(--ease);
}
.hero__swiper {
  width: 100%;
  min-height: 0;
}
.hero__slide {
  position: relative;
  display: grid;
  grid-template-columns: 100%;
  justify-items: center;
  align-content: end;
  padding: 5rem var(--gutter) 1rem;
}
.hero__name {
  color: #fff;
  font-size: min(33vw, 62svh - 6rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.hero__sofa {
  position: relative;
  width: min(82vw, 112svh, 78rem);
  height: auto;
  margin-top: max(-9vw, -14svh);
}
.hero__bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem 3rem;
  padding-block: 1.5rem 2.25rem;
}
.hero h1 {
  max-width: 14em;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero__caption {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.hero__caption p {
  width: 14rem;
  line-height: 1.35;
}
.hero__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.hero__controls .swatch {
  border-color: #fff;
  padding: 0;
}
.hero__controls .swatch[aria-current] {
  padding: 4px;
  border-color: var(--ink);
}
.hero__pause {
  width: 4.5em;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media (prefers-reduced-motion: no-preference) {
  /* "translate" leaves "transform" to Swiper */
  .hero__name {
    animation: rise 1.1s var(--ease) both;
  }
  .hero__sofa {
    animation: arrive 1.3s 0.15s var(--ease) both;
  }
}
@keyframes rise {
  from {
    translate: 0 60%;
    opacity: 0;
  }
}
@keyframes arrive {
  from {
    translate: 60vw 0;
  }
}

/* Line-up: everything on one floor, true to scale */
.lineup {
  overflow: hidden;
}
.lineup__floor {
  display: flex;
  align-items: flex-end;
  margin-top: clamp(3rem, 6vw, 6rem);
  padding-inline: var(--gutter);
  position: relative;
}
.piece {
  flex: var(--share) 1 0;
  min-width: 0;
  text-decoration: none;
}
.piece img {
  width: 100%;
  padding-inline: 0.6rem;
  mix-blend-mode: darken;
}
.piece__text {
  display: block;
  padding: 1rem 0.6rem 0;
  border-top: 2px solid var(--ink);
  line-height: 1.35;
  white-space: nowrap;
}
.piece__text strong {
  display: block;
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  font-weight: 500;
}
a.piece strong {
  width: fit-content;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
@media (prefers-reduced-motion: no-preference) {
  .piece img {
    transition: translate 0.9s cubic-bezier(0.3, 1.35, 0.5, 1) calc(var(--n) * 110ms), opacity 0.3s calc(var(--n) * 110ms);
  }
  .js .lineup__floor:not(.is-visible) img {
    translate: 0 -7rem;
    opacity: 0;
  }
  a.piece:hover img {
    translate: 0 -0.75rem;
    transition-delay: 0s;
    transition-duration: 0.4s;
  }
}

/* Fabric */
.fabric {
  background: color-mix(in srgb, var(--fabric) 38%, #fff);
  transition: background-color 0.7s var(--ease);
}
.fabric__inner {
  display: grid;
  justify-items: center;
  gap: 2rem;
  text-align: center;
}
.fabric__inner > div:first-child p {
  max-width: 28em;
  margin: 1.25rem auto 0;
}
.fabric__sofa {
  position: relative;
  isolation: isolate;
  width: min(100%, 72rem);
}
.fabric__sofa img {
  width: 100%;
}
.fabric__sofa::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fabric);
  mix-blend-mode: multiply;
  -webkit-mask: var(--photo) center / 100% 100% no-repeat;
  mask: var(--photo) center / 100% 100% no-repeat;
  transition: background-color 0.7s var(--ease);
}
.fabric__colours {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.75rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.fabric__colours legend {
  position: absolute;
  clip-path: inset(50%);
}
.fabric__colours label {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.fabric__colours .swatch {
  width: 3.5rem;
  height: 3.5rem;
}
.fabric__colours .swatch:checked {
  padding: 5px;
}

/* Rooms */
.rooms {
  overflow: hidden;
}
.rooms__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.rooms__buttons {
  display: flex;
  gap: 0.75rem;
}
.room {
  width: min(78vw, 80rem);
  margin: 0;
  padding-inline: 0.75rem;
}
.room__photo {
  overflow: hidden;
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
}
.room__photo img {
  width: 118%;
  max-width: none;
  margin-left: -9%;
}
.room figcaption {
  padding: 1rem 0 0 0.25rem;
  font-size: 1.25rem;
}

/* About */
.rooms + .section {
  padding-top: 0;
}
.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: end;
  gap: 2.5rem clamp(2rem, 7vw, 8rem);
}
.about img {
  grid-column: 1 / -1;
  width: 100%;
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem clamp(2rem, 7vw, 8rem);
}
.contact__text {
  max-width: 32em;
  margin-top: 1.75rem;
}
.contact__details {
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
}
.contact__details dt {
  font-size: 1rem;
}
.contact__details dd {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.contact__card {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
  background: #fff;
}
.form label {
  display: block;
  margin-bottom: 0.25rem;
}
.form input,
.form textarea {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0 0.6rem;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: none;
}
.form textarea {
  resize: vertical;
}
.form input:focus-visible,
.form textarea:focus-visible {
  outline: 0;
  box-shadow: 0 3px 0 var(--orange);
}
.form__error {
  margin: -1rem 0 1.5rem;
  color: #a3271a;
}
.form__trap {
  position: absolute;
  left: -100vw;
}
.form__note {
  font-size: 1rem;
}
.form__note > * {
  margin-top: 1rem;
}
.notice {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: #d9ead3;
}
.notice--error {
  background: #f8d9d3;
}
.map {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  min-height: 26rem;
  padding: 2rem var(--gutter);
  background: #e3e3e1;
  text-align: center;
}
.map:has(iframe) {
  display: block;
  padding: 0;
}
.map iframe {
  display: block;
  width: 100%;
  height: 30rem;
  border: 0;
}

/* Footer */
.site-footer {
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
  background: var(--orange);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
}
.site-footer__text {
  max-width: 12em;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.site-footer address {
  font-style: normal;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  font-size: 1rem;
}
.site-footer button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Collection */
.page {
  padding-block: var(--space);
}
.page .container > * + * {
  margin-top: 2rem;
}
.page h1 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
}
.collection {
  padding-bottom: var(--space);
}
.collection__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 4rem;
  padding-block: clamp(1rem, 3vw, 3rem) clamp(2rem, 4vw, 3.5rem);
}
.collection__head h1 {
  margin-left: -0.05em;
  font-size: clamp(5.5rem, 19vw, 18rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.045em;
}
.collection__head p {
  max-width: 24em;
}
.filter {
  position: sticky;
  z-index: 5;
  top: 0;
  background: var(--page);
}
.filter__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 3rem;
  padding-block: 1rem;
}
.filter fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.filter fieldset input {
  position: absolute;
  opacity: 0;
}
.filter fieldset span {
  display: block;
  padding: 0.45rem 1.15rem;
  border-radius: 2em;
  cursor: pointer;
  transition: background-color 0.25s;
}
.filter fieldset span:hover {
  background: #e0e0de;
}
.filter fieldset :checked + span {
  background: var(--ink);
  color: #fff;
}
.filter fieldset :focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.filter__wall {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.filter__wall input {
  width: clamp(8rem, 16vw, 15rem);
  accent-color: var(--ink);
}
.filter__wall output {
  width: 3em;
  font-weight: 500;
  text-align: right;
}
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem) clamp(1rem, 2.5vw, 2.5rem);
  margin-block: 1rem 0;
  list-style: none;
}
.product a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0 1rem;
  text-decoration: none;
}
.product__photo {
  position: relative;
  grid-column: 1 / -1;
  isolation: isolate;
  background: var(--page);
}
.product__photo img,
.detail__photos img {
  width: 100%;
  aspect-ratio: 1600 / 1083;
  object-fit: cover;
  mix-blend-mode: darken;
}
.product__photo img {
  transition: opacity 0.45s;
}
.product__photo img + img {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.product a:is(:hover, :focus-visible) img + img {
  opacity: 1;
}
.product a:is(:hover, :focus-visible) img:has(+ img) {
  opacity: 0;
}
.product__name {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.collection__empty {
  padding-block: 4rem;
  font-size: 1.5rem;
}

/* Product details */
.detail {
  width: min(96vw, 96rem);
  max-width: none;
  height: min(92svh, 62rem);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--page);
  color: inherit;
}
.detail[open] {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  overflow: hidden;
}
.detail::backdrop {
  background: rgb(240 134 74 / 0.9);
}
.detail__photos,
.detail__text {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail__photos {
  display: grid;
  align-content: safe center;
  isolation: isolate;
  background: var(--page);
}
.detail__photos img {
  background-position: center;
  background-size: cover;
}
.detail__text {
  padding: clamp(1.5rem, 3vw, 3.5rem);
  background: #fff;
}
.detail__text h2 {
  font-size: clamp(3.5rem, 6vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
}
.detail__profile {
  margin-block: 1.25rem 2rem;
  font-size: 1.25rem;
}
.detail__text h3 {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.detail__text .button {
  margin-top: 2rem;
}
.sizes {
  width: 100%;
  border-collapse: collapse;
}
.sizes caption {
  margin-bottom: 0.25rem;
  text-align: left;
}
.sizes tr {
  /* the bar shows how wide each size is next to the largest one */
  background: linear-gradient(var(--pink), var(--pink)) 0 100% / calc(var(--width) * 100%) 4px no-repeat;
}
.sizes th,
.sizes td {
  padding: 0.5rem 0 0.6rem;
  font-weight: 400;
  text-align: left;
}
.sizes td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.detail__close {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  padding: 0.6rem 1.3rem;
  border: 0;
  border-radius: 2em;
  background: var(--ink);
  color: #fff;
}
/* without JavaScript the details open below the list */
html:not(.js) .detail:target {
  position: static;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  height: auto;
}
html:not(.js) .detail__close {
  display: none;
}
::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (orientation: portrait) {
  .hero__slide {
    align-content: center;
  }
  .hero__name {
    font-size: min(39vw, 40svh);
  }
  .hero__sofa {
    width: min(96vw, 80svh);
    max-width: none;
    margin-top: -5vw;
  }
}

@media (max-width: 60rem) {
  .hero__bar {
    grid-template-columns: 1fr auto;
  }
  .hero h1 {
    grid-column: 1 / -1;
    max-width: none;
  }
  .lineup__floor {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .piece {
    flex: none;
    width: calc(var(--share) * 78rem);
  }
  .about,
  .contact {
    grid-template-columns: 1fr;
  }
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail[open],
  html:not(.js) .detail:target {
    display: block;
    overflow-y: auto;
  }
  .detail__photos,
  .detail__text {
    overflow: visible;
  }
  .detail__close {
    position: fixed;
    inset: auto auto calc(4svh + 1rem) 50%;
    translate: -50% 0;
  }
  .detail__text {
    padding-bottom: 6rem;
  }
}

@media (max-width: 48rem) {
  .menu-button {
    position: relative;
    z-index: 21;
    display: block;
    padding: 0.4rem 0;
    border: 0;
    background: none;
  }
  .menu {
    position: fixed;
    z-index: 20;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: var(--gutter);
    background: var(--orange);
    font-size: 2.75rem;
    font-weight: 500;
    line-height: 1.2;
    clip-path: inset(0 0 100%);
    visibility: hidden;
    transition: clip-path 0.5s var(--ease), visibility 0.5s;
  }
  .menu a {
    width: fit-content;
  }
  .menu.is-open {
    clip-path: inset(0);
    visibility: visible;
  }
  .has-menu {
    overflow: hidden;
  }
  .site-header__logo img {
    width: 12.5rem;
  }
  .hero__bar {
    grid-template-columns: 1fr;
    padding-block: 0 1.75rem;
  }
  .hero__caption {
    justify-content: space-between;
  }
  .hero__caption p {
    width: auto;
  }
  .hero__caption .button {
    flex: none;
  }
  .hero__controls {
    justify-content: flex-start;
  }
  .hero__pause {
    margin-left: auto;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .filter__wall {
    width: 100%;
    flex-wrap: wrap;
    gap: 0 1rem;
  }
  .filter__wall span {
    width: 100%;
  }
  .filter__wall input {
    flex: 1;
  }
  .filter__inner {
    padding-block: 0.75rem;
  }
  .filter fieldset {
    flex-wrap: nowrap;
    gap: 0;
    margin-left: -0.75rem;
  }
  .filter fieldset span {
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
  }
}

@media (max-width: 40rem) {
  .products {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}
