/* This stylesheet is loaded only by the business offer. */
:root {
  --paper: #fff;
  --ink: #1d1d1f;
  --muted: #555558;
}

.company-page {
  --space: clamp(3.5rem, 7vw, 7.5rem);
  max-width: none;
  padding: 0;
}

.company-intro {
  --brand-red: #880621;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1rem var(--gutter);
  padding: clamp(2rem, 4vw, 4rem) var(--content-inset) 0;
}

.company-intro h1 {
  color: var(--brand-red);
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.company-intro .button {
  --ink: var(--brand-red);
}

.company-intro-copy p {
  max-width: 50ch;
  margin: clamp(1.4rem, 3vw, 2.5rem) 0 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.35;
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.brand-window {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.brand-window.is-moving {
  overflow: hidden;
}

.brand-row {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-around;
  min-width: 100%;
  gap: clamp(2rem, 4vw, 4.5rem);
  margin: 0;
  padding: 1rem clamp(1rem, 2vw, 2.25rem);
  list-style: none;
}

.brand-row img {
  display: block;
  width: auto;
  height: auto;
  max-width: 6rem;
  max-height: 2.6rem;
}

@keyframes brand-scroll {
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-window.is-moving .brand-row {
    animation: brand-scroll 36s linear infinite reverse;
  }

}

.company-intro-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.company-intro-end {
  margin: 0;
  font-size: clamp(1.125rem, 1.75vw, 1.5rem);
  letter-spacing: -0.04em;
}

.company-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: var(--space) var(--content-inset);
}

.company-project:nth-of-type(even) {
  --ink: #fff;
  --muted: #ccc;
  color: var(--ink);
  background: #171717;
}

.company-copy {
  max-width: 40ch;
  font-size: clamp(1.125rem, 1.65vw, 1.375rem);
  line-height: 1.55;
}

.company-copy p {
  margin: 0;
}

.company-copy p + p {
  margin-top: 1rem;
}

.company-logo {
  width: auto;
  height: auto;
  max-width: 4.5em;
  max-height: 1.4em;
  vertical-align: baseline;
}

.company-logo--tall {
  max-height: 2.25em;
}

/* Let flourishes, taglines and the bottle extend below the wordmark baseline. */
.project-cinema .company-logo,
.project-still-life .company-logo,
.project-portrait .company-logo {
  vertical-align: -0.32em;
}

.project-workshop .company-logo {
  vertical-align: -0.36em;
}

.company-logo--cudo {
  vertical-align: -0.45em;
}

.company-logo--groove {
  vertical-align: -0.08em;
  filter: drop-shadow(0 0 1px #48302a);
}

.company-media {
  container-type: inline-size;
  min-width: 0;
}

.company-media img {
  display: block;
  width: 100%;
  height: auto;
}

.company-gallery,
.company-videos {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.company-gallery:focus-visible,
.company-videos:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.company-gallery {
  --photo-ratio: 4 / 5;
  grid-auto-flow: column;
  grid-auto-columns: max(8rem, 36%);
  gap: clamp(0.5rem, 1.4vw, 1rem);
  padding-bottom: 0.625rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.company-gallery--wide {
  --photo-ratio: 3 / 2;
  grid-auto-columns: 73%;
}

.company-gallery li {
  scroll-snap-align: start;
}

.company-gallery a {
  display: block;
  cursor: inherit;
}

.company-gallery.is-auto-scrolling,
.company-gallery.is-dragging {
  scroll-snap-type: none;
}

.company-gallery img {
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
}

.company-videos {
  --tile-gap: clamp(0.25rem, 0.9vw, 0.625rem);
  --tile-height: calc((100cqw - 2 * var(--tile-gap)) * 3 / 16);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--tile-height);
  gap: var(--tile-gap);
  max-height: calc(3 * var(--tile-height) + 2 * var(--tile-gap));
  overflow-y: auto;
}

.company-videos a,
.company-play {
  position: relative;
  display: block;
  height: 100%;
}

.company-videos img {
  height: 100%;
  object-fit: contain;
}

.company-videos a:focus-visible,
.company-gallery a:focus-visible,
.company-play:focus-visible {
  outline-offset: -4px;
  outline-color: white;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.company-videos a > span,
.company-play-label {
  position: absolute;
  background: rgb(25 29 25 / 90%);
  color: white;
  text-align: center;
}

.company-videos a > span {
  right: 0.375rem;
  bottom: 0.375rem;
  width: 1.5rem;
  border-radius: 50%;
  font-size: 0.625rem;
  line-height: 1.5rem;
}

.company-play-label {
  inset: 50% auto auto 50%;
  width: max-content;
  max-width: calc(100% - 1rem);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.company-play-label span {
  margin-right: 0.2em;
  font-size: 0.75em;
}

.company-player {
  aspect-ratio: 16 / 9;
  background: #171717;
  border-radius: var(--media-radius);
  overflow: clip;
}

.company-player iframe,
.company-montage {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.company-media-link,
.company-photo figcaption {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.company-photo {
  max-width: 48rem;
  margin: 0;
}

.company-photo > a {
  display: block;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.montage-preview {
  display: block;
  cursor: zoom-in;
}

.company-montage {
  pointer-events: none;
}

.montage-dialog form {
  justify-self: end;
}

.montage-dialog video {
  place-self: center;
  width: 100%;
  max-height: 100%;
  border-radius: var(--media-radius);
}

.company-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.4vw, 1rem);
}

.company-pair img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* The event opens with a photographic spread. The product shoots use the
   proportions of their own frames: portraits for tea, squares for Colon C. */
.project-on,
.project-still-life,
.project-exhibition,
.project-cinema {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.project-on {
  padding-top: clamp(3rem, 4vw, 4rem);
}

.project-on .company-copy {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 2rem;
}

.project-on .company-copy p + p {
  margin: 0;
  font-style: italic;
}

.project-on .company-gallery {
  grid-auto-columns: clamp(10rem, 24%, 22rem);
}

.project-cinema .company-copy {
  justify-self: end;
  max-width: 39ch;
}

.project-cinema .company-media {
  width: min(100%, 63rem);
  justify-self: center;
}

.project-library,
.project-portrait {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.project-library .company-media,
.project-portrait .company-media {
  grid-area: 1 / 1;
}

.project-still-life .company-copy {
  max-width: 38ch;
  margin-inline: auto;
  text-align: center;
}

.project-still-life .company-gallery {
  --photo-ratio: 3 / 4;
  grid-auto-columns: clamp(10.5rem, 22%, 19rem);
}

.project-portrait {
  padding-inline: calc(var(--content-inset) + 3%);
}

.company-photo {
  margin-inline: auto;
}

.company-photo figcaption {
  margin-top: 1.2rem;
}

.project-workshop {
  align-items: end;
  padding-top: 0;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
}

.project-exhibition .company-copy {
  max-width: 48ch;
  justify-self: end;
}

.project-exhibition .company-gallery {
  grid-auto-columns: clamp(9rem, 21%, 18rem);
}

.project-montage {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
}

.project-montage .company-media {
  grid-area: 1 / 1;
}

.project-montage .company-copy {
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.project-montage em {
  display: block;
  margin-bottom: 0.4em;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  line-height: 1.05;
}

.project-products {
  align-items: start;
}

.project-products .company-gallery {
  --photo-ratio: 1;
  grid-auto-columns: max(9rem, 35%);
  gap: 0.5rem;
}

.company-page .enquiry-section {
  max-width: 65rem;
  padding: var(--space) var(--gutter);
}

@media (max-width: 48rem) {
  .company-intro,
  .company-project {
    grid-template-columns: minmax(0, 1fr);
  }

  .company-intro {
    gap: 1.5rem;
  }

  .project-library .company-media,
  .project-portrait .company-media {
    grid-area: auto;
  }

  .project-portrait .company-photo {
    width: 100%;
  }
}
