/* The same grid, buttons and logo strip are used on Home and References. */
.ed-references {
  container-type: inline-size;
  color: var(--wulf-charcoal);
  background: var(--wulf-white);
}
:is(.homepage, .ed-references) :is(.hp-eyebrow, .ed-eyebrow) {
  margin: 0 0 .35em;
  color: var(--wulf-graphite);
  font-size: clamp(.72rem, .98cqw, 1.05rem);
  font-weight: 500;
  line-height: 1.35;
  text-transform: uppercase;
}
:is(.hp-heading, .hp-services > header, .ed-refs-main > header, .ed-projects) > :is(h1, h2) {
  margin: 0;
  font-size: clamp(1.4rem, 2.08cqw, 2.45rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.035em;
}
.hp-references-content, .ed-refs-main {
  padding: clamp(1rem, 1.6cqw, 1.75rem) var(--pad) clamp(1.6rem, 2.25cqw, 2.5rem);
}
.hp-heading, .ed-refs-main > header {
  margin-bottom: clamp(.7rem, 1.1cqw, 1.2rem);
}

/* Two matching rows create a seamless left-to-right loop. One row is announced. */
.hp-brand-strip {
  position: relative;
  overflow: hidden;
}
.hp-brand-track { display: flex; width: 100%; }
.hp-brand-row {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.45rem, 1.25cqw, 1.3rem);
}
.hp-brand-row[aria-hidden] { display: none; }
.hp-brand {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(3.6rem, 5.95cqw, 6rem);
  padding: .35rem .65rem;
  border-radius: .2rem;
  background: var(--wulf-mist);
}
.hp-brand img {
  display: block;
  width: 100%;
  height: clamp(2.6rem, 4.65cqw, 4.8rem);
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1);
}
.hp-brand img[src$="/mbe.png"] { filter: grayscale(1) invert(1) contrast(1.32); }
.hp-motion {
  position: absolute;
  inset: auto .35rem .25rem auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: .45rem;
  border: 1px solid var(--wulf-silver);
  border-radius: .25rem;
  color: var(--wulf-charcoal);
  background: var(--wulf-white);
}
.hp-motion svg { width: .9rem; height: .9rem; }
.hp-motion .hp-play, .hp-motion[aria-pressed="true"] .hp-pause { display: none; }
.hp-motion[aria-pressed="true"] .hp-play { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hp-brand-strip.is-ready .hp-brand-row[aria-hidden] { display: grid; }
  .hp-brand-strip.is-ready .hp-brand-row {
    /* Leave one gap after the final tile; the copy starts at the next tile. */
    flex-basis: calc(100% + clamp(.45rem, 1.25cqw, 1.3rem));
    padding-inline-end: clamp(.45rem, 1.25cqw, 1.3rem);
    animation: wulf-logo-strip 48s linear infinite;
  }
  .hp-brand-strip.is-ready .hp-motion { display: inline-flex; }
  .hp-brand-strip.paused .hp-brand-row { animation-play-state: paused; }
}
@media (hover: hover) {
  .hp-brand-strip:not(:hover, :focus-within) .hp-motion { opacity: 0; }
}
@keyframes wulf-logo-strip {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.hp-projects, .ed-projects { margin-top: clamp(1.25rem, 2.05cqw, 2.1rem); }
.hp-project-grid, .ed-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(.65rem, 1.8cqw, 1.75rem);
}
.ed-case-grid { margin-top: clamp(.7rem, 1.1cqw, 1.2rem); }
.hp-case, .ed-case {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--wulf-line);
  border-radius: .3rem;
  background: var(--wulf-white);
}
.hp-case > a {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.hp-case > a:focus-visible { outline-offset: -3px; }
.hp-case > a > img, .ed-project-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2.81 / 1;
  object-fit: cover;
  background: var(--wulf-charcoal);
}
.hp-case-body, .ed-case-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(.75rem, 1.32cqw, 1.5rem);
}
:is(.hp-case-body, .ed-case-text) h3 {
  margin: 0;
  font-size: clamp(.95rem, 1.25cqw, 1.4rem);
  letter-spacing: -.02em;
  font-weight: 650;
  line-height: 1.3;
}
:is(.hp-case-body, .ed-case-text) > p {
  margin: .35em 0 .85em;
  color: var(--wulf-graphite);
  font-size: clamp(.86rem, 1.05cqw, 1.2rem);
  line-height: 1.43;
}
.hp-case-link, .ed-case-report summary, .ed-project-link {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  margin-top: auto;
  color: var(--wulf-charcoal);
  font-size: clamp(.8rem, .96cqw, 1.1rem);
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}
.hp-case-link .icon { width: 1.12em; height: 1.12em; }
.hp-case a:hover .hp-case-link, .ed-case-report summary:hover, .ed-project-link:hover {
  text-decoration: underline;
  text-underline-offset: .18em;
}
.ed-case-report { width: 100%; margin-top: auto; }
.ed-case-report summary { list-style: none; }
.ed-case-report summary::-webkit-details-marker { display: none; }
.ed-case-report .ed-when-open, .ed-case-report[open] .ed-when-closed { display: none; }
.ed-case-report[open] .ed-when-open { display: inline; }
.ed-report-body { padding-block: .7rem 0; }
.ed-report-body > div { margin-top: .55rem; padding-top: .65rem; border-top: 1px solid var(--wulf-line); }
.ed-report-body h4 { margin: 0; font-size: 1rem; }
.ed-report-body p { margin: .25rem 0 .45rem; font-size: .94rem; line-height: 1.5; }
.ed-report-panel {
  margin-top: 1rem;
  padding: 0 clamp(1rem, 1.5cqw, 1.6rem) .5rem;
  border: 1px solid var(--wulf-line);
  border-radius: .3rem;
  background: var(--wulf-paper);
}
.ed-report-panel [hidden], .ed-report-panel[hidden] { display: none; }
.ed-report-panel .ed-report-body > div:first-child { margin-top: 0; border-top: 0; }

.hp-contact, .ed-ref-contact {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(.85rem, 5cqw, 5.2rem);
  min-height: 7.2cqw;
  padding: clamp(1.1rem, 1.65cqw, 1.8rem) var(--pad);
  color: var(--wulf-white);
  background: var(--wulf-charcoal);
}
:is(.hp-contact, .ed-ref-contact)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 48%;
  background: var(--wulf-section-image) right center / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, var(--wulf-black) 35%);
}
:is(.hp-contact, .ed-ref-contact) h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.05cqw, 2.4rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.hp-btn, .ed-ref-contact .ed-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.7rem, 1.45cqw, 1.45rem);
  min-height: 2.75rem;
  padding: .65em 1.35em;
  border: 1px solid var(--wulf-white);
  border-radius: .3rem;
  font-size: clamp(.83rem, 1.08cqw, 1.16rem);
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
}
.hp-btn .icon { width: 1.15em; height: 1.15em; }
.hp-btn-light { color: var(--wulf-charcoal); background: var(--wulf-white); }
.hp-btn-light:hover { background: var(--wulf-mist); border-color: var(--wulf-mist); }
.hp-btn-outline, .ed-ref-contact .ed-button { color: var(--wulf-white); background: transparent; }
.hp-btn-outline:hover, .ed-ref-contact .ed-button:hover { color: var(--wulf-charcoal); background: var(--wulf-white); }

@container (max-width: 670px) {
  .hp-project-grid, .ed-case-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hp-case-body, .ed-case-text { padding: 1rem; }
  .hp-brand-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-contact, .ed-ref-contact { gap: .85rem 1.3rem; }
}
