@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/montserrat-light.woff') format('woff');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/montserrat-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/montserrat-semibold.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/montserrat-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #343434;
  background: white;
  --menu-size: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure, ul { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid #754928; outline-offset: 4px; }
:where(main, section)[tabindex="-1"]:focus { outline: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 5;
  inset: 12px auto auto 12px;
  padding: 12px;
  background: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed;
  z-index: 3;
  inset: 0 0 auto;
  height: var(--menu-size);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.brand {
  display: grid;
  place-items: center;
  height: var(--menu-size);
  padding-inline: clamp(.875rem, 2vw, 1.25rem);
  background: #202020;
  border-radius: 0 0 24px 0;
  pointer-events: auto;
}
.brand img { width: auto; height: 28.5px; }
.brand:focus-visible { outline-color: white; outline-offset: -4px; }
.menu {
  pointer-events: auto;
  position: relative;
  width: max-content;
  min-width: var(--menu-size);
  padding-top: var(--menu-size);
  background: #202020;
  color: #fffdf6;
  clip-path: inset(0 0 calc(100% - var(--menu-size)) calc(100% - var(--menu-size)) round 0 0 0 24px);
  transition: clip-path .22s ease;
}
.menu:has([aria-expanded="true"]) { clip-path: inset(0 round 0 0 0 24px); }
.menu-toggle {
  position: absolute;
  inset: 0 0 auto auto;
  width: var(--menu-size);
  height: var(--menu-size);
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border: 0;
  cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
}
.menu-toggle span { position: relative; }
.menu-toggle span::before, .menu-toggle span::after { position: absolute; content: ""; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu nav { padding: 3px 0 12px; min-width: 140px; }
.menu nav[inert] { pointer-events: none; }
.menu nav a { display: block; padding: 12px 24px; font-size: .9rem; text-decoration: none; }
.menu nav a:hover { background: #303030; }
.menu :focus-visible { outline-color: white; outline-offset: -4px; }

.scene {
  --opening-origin: 1154;
  --opening-shift: 30px;
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 3890 / 4048;
}
.intro {
  position: absolute;
  top: max(8.85cqw, calc(var(--menu-size) + 1rem + 4.1cqw));
  /* Visible left edge of the Corques sofa in the 3890 px composition. */
  left: calc(489 * 100% / 3890);
  z-index: 2;
  width: 36.5%;
  /* Reserve the previous opening height to retain the title’s top alignment. */
  min-height: 6.659cqw;
  transform: translateY(-50%);
  container-type: inline-size;
  font-family: Montserrat, Arial, sans-serif;
  color: #333333;
}
.title, .subtitle { translate: 0 60px; }
.title { width: max-content; white-space: nowrap; font-size: 6.88cqw; font-weight: 300; line-height: .985; }
.title strong { font-weight: 400; color: #76461C; }
.subtitle { margin: 1.95cqw 0 0; font-size: 2.74045cqw; font-weight: 300; color: #808080; line-height: 1.15; }
.placed, .piece {
  position: absolute;
  left: calc(var(--x) * 100% / 3890);
  top: calc((var(--y) - var(--opening-origin)) * 100cqw / 3890);
  width: calc(var(--w) * 100% / 3890);
}
.placed img, .piece img { width: 100%; }
.hero { translate: var(--opening-shift) 0; z-index: 1; display: block; width: calc(var(--w) * 90% / 3890); }
.catalogue {
  --gallery-start: 1946;
  position: absolute;
  inset: calc((var(--gallery-start) - var(--opening-origin)) * 100cqw / 3890) 0 0;
  pointer-events: none;
  scroll-margin-top: 2rem;
}
.pieces { padding: 0; list-style: none; }
.piece { top: calc((var(--y) - var(--gallery-start)) * 100cqw / 3890); }
.piece a { display: block; pointer-events: auto; }
.hero, .piece a { cursor: zoom-in; }

dialog {
  width: min(700px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  color: #343434;
  border: 0;
  border-radius: 24px;
  overflow: auto;
  background: white;
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgb(35 30 27 / 48%); }
html:has(dialog[open]) { overflow: hidden; }
html { scrollbar-gutter: stable; }
.product-panel { position: relative; padding: 46px clamp(20px, 5vw, 48px) 30px; }
.close {
  display: grid;
  place-items: center;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: white;
  color: #383838;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.close:focus-visible { outline-offset: -4px; }
.photo-stage { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: min(52dvh, 430px); }
.photo-stage img { max-width: 100%; max-height: min(52dvh, 430px); object-fit: contain; }
figcaption { margin-top: 22px; }
#product-title { font-size: clamp(1.6rem, 4vw, 2.15rem); letter-spacing: -.035em; line-height: 1.1; }
#product-description { margin-bottom: 5px; font-size: .85rem; color: #745132; }
#product-credit { margin-top: 7px; font-size: .95rem; color: #535353; }

@media (max-width: 899px) {
  .scene {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    aspect-ratio: auto;
    padding: clamp(4.25rem, 13vw, 6.5rem) clamp(1rem, 6vw, 3rem) 2.5rem;
  }
  .placed, .catalogue, .piece { position: static; width: auto; }
  .intro {
    position: static;
    padding-top: 60px;
    width: calc(100% - var(--opening-shift));
    /* In the three-column grid the sofa has a small inset inside its crop. */
    margin-left: .8cqw;
    /* Keep the reader's top aligned with the original title and subtitle slots. */
    min-height: calc(min(100cqw, 40rem) * 357 / 2203 + .5rem + min(91cqw, 30rem) * 63 / 1701);
    transform: none;
  }
  .title, .subtitle { translate: none; }
  /* The complete title spans just under 16.7 em in the project fonts. */
  .title { font-size: min(5.98cqw, 2.752rem); }
  .subtitle { font-size: min(calc((100cqw + var(--opening-shift)) * .0322575), 1.06375rem); margin: .375rem 0 0; }
  .hero {
    width: min(65.7vw, 22.5rem);
    align-self: center;
    margin-top: clamp(1.1rem, 5vw, 2.2rem);
    /* Reserve the removed tenth of the photo below it to keep the gallery in place. */
    margin-bottom: calc(1rem + min(7.3vw, 2.5rem) * 2031 / 1352);
  }
  .catalogue { align-self: stretch; pointer-events: auto; scroll-margin-top: 1rem; }
  .pieces {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.65rem, 3.4vw, 1.5rem) clamp(.65rem, 3vw, 1.5rem);
  }
  .piece a { height: 100%; aspect-ratio: 1; display: grid; place-items: center; }
  .piece img { width: min(100%, calc(var(--w) * 100% / 420)); max-height: 100%; object-fit: contain; }
}
@media (prefers-reduced-motion: reduce) { .menu { transition: none; } }

#product-dialog figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
}
#product-description, #product-credit { grid-column: 1 / -1; }
#product-title { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
.read-more {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .85rem;
  margin: 0;
  min-height: 44px;
  padding: .65rem 1.15rem;
  border-radius: 24px;
  color: #343434;
  background: white;
  border: 1px solid #a59f99;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .88rem;
  text-decoration: none;
}
.read-more:hover { color: white; background: #76461c; border-color: #76461c; }
