@font-face {
  font-family: "YDS Projects Qalories";
  src: url("qalories-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.yds-projects {
  --yds-project-ink: #3e130f;
  --yds-project-ivory: #f0e9e0;
  --yds-project-orange: #fa5d21;
  --yds-project-seam: clamp(8px, 1.2vw, 18px);
  background: var(--yds-project-ink);
}

.yds-project-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--yds-project-ivory);
  background: var(--yds-project-ink);
}

.yds-project-panel + .yds-project-panel {
  margin-block-start: var(--yds-project-seam);
}

.yds-project-panel + .yds-project-panel::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--yds-project-seam)) 0 auto;
  height: calc(var(--yds-project-seam) + clamp(18px, 3vw, 44px));
  background: linear-gradient(180deg, #221613, var(--yds-project-ink) var(--yds-project-seam), transparent);
  pointer-events: none;
}

.yds-project-photo,
.yds-project-panel::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.yds-project-photo {
  overflow: hidden;
  z-index: -2;
}

.yds-project-panel::after {
  content: "";
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent 55%, rgba(0, 0, 0, .28));
}

.yds-project-photo .yds-project-image {
  position: absolute;
  inset: -10% 0 auto;
  width: 100%;
  max-width: none;
  height: 120%;
  object-fit: cover;
  object-position: 50% 47%;
}

@media (prefers-reduced-motion: no-preference) {
  .yds-project-photo .yds-project-image {
    inset-block-start: -31%;
    height: 162%;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .yds-project-panel { view-timeline-name: --yds-project-photo; }
    .yds-project-photo .yds-project-image {
      animation: yds-project-parallax linear both;
      animation-timeline: --yds-project-photo;
      animation-range: cover 0% cover 100%;
    }
  }
}

@keyframes yds-project-parallax {
  from { transform: translateY(-18%); }
  to { transform: translateY(18%); }
}

.yds-project-copy {
  display: grid;
  grid-template: "title cta" auto "facts cta" auto / minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 14px;
  width: calc(100% - 10vw);
  max-width: min(calc(100% - 40px), 90rem);
  margin-inline: auto;
  padding-block-end: clamp(24px, 6vw, 85px);
  font-family: Nexa, sans-serif;
}

.yds-project-copy .yds-project-title {
  grid-area: title;
  margin: 0;
  padding: 0;
  color: inherit;
  font: 400 clamp(1.75rem, 3.2vw, 3rem)/.98 "YDS Projects Qalories", Nexa, sans-serif;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.yds-project-copy .yds-project-facts {
  grid-area: facts;
  display: flex;
  flex-wrap: wrap;
  gap: 6px clamp(10px, 2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  line-height: 1.55;
  letter-spacing: .075em;
}

.yds-project-facts span { text-transform: uppercase; }

.yds-project-copy .yds-project-link {
  grid-area: cta;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 20px;
  color: inherit;
  border: 1px solid currentColor;
  font: 700 .875rem/1.55 Nexa, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}

.yds-project-copy .yds-project-link:hover {
  color: var(--yds-project-ink);
  background: var(--yds-project-ivory);
  border-color: var(--yds-project-ivory);
}

.yds-project-copy .yds-project-link:focus-visible {
  outline: 2px solid var(--yds-project-orange);
  outline-offset: 4px;
}

@media (max-width: 47.5rem) {
  .yds-project-copy .yds-project-facts { grid-column: 1 / -1; }
  .yds-project-copy .yds-project-link { grid-row: 1; }
}

@media (max-width: 380px) {
  .yds-project-copy { grid-template: "title" auto "facts" auto "cta" auto / 1fr; }
  .yds-project-copy .yds-project-link { grid-row: auto; justify-self: start; }
}
