.companies {
  padding: clamp(5rem, 9vw, 9rem) max(5vw, 2rem);
  border-top: 1px solid #292a28;
  background: var(--black);
  color: #f3f0e8;
  scroll-margin-top: 5rem;
}

.companies-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
}

.companies-head h2 {
  margin: .4rem 0 0;
  font: 400 clamp(3rem, 6vw, 6.5rem)/.9 var(--serif);
}

.companies-head > p {
  margin: 0 0 .5rem;
  color: #b9b5ad;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #34332f;
}

.company-card {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 310px;
  padding: 0;
  border: 0;
  border-right: 1px solid #34332f;
  border-bottom: 1px solid #34332f;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease;
}

.company-card:nth-child(2n) { border-right: 0; }
.company-card:hover, .company-card:focus-visible { background: #151614; outline: 2px solid var(--gold-light); outline-offset: -2px; }

.company-visual {
  position: relative;
  display: block;
  min-height: 310px;
  overflow: hidden;
  background: #101110;
}

.company-visual::after {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(135deg, rgb(6 7 6 / 15%), rgb(6 7 6 / 68%));
}

.company-visual > span {
  position: absolute;
  z-index: 2;
  top: 1.4rem;
  left: 1.4rem;
  color: var(--gold-light);
  font: 400 1.15rem/1 var(--serif);
}

.company-visual img:not(.image-fallback) { width: 100%; height: 100%; object-fit: cover; }
.company-visual .image-fallback { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.company-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.6rem, 3vw, 3rem);
}

.company-type {
  display: block;
  margin: 0 0 1.2rem;
  color: var(--gold-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.company-name {
  display: block;
  margin-bottom: 2.7rem;
  overflow-wrap: anywhere;
  font: 400 clamp(1.9rem, 3vw, 3.4rem)/1.02 var(--serif);
}

.company-card-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  color: #bbb7af;
  font-size: .78rem;
}

.company-card-meta em {
  color: #f2eee5;
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.company-empty { grid-column: 1 / -1; padding: 3rem 0; color: #b9b5ad; }

.company-loading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
}

.company-loading i {
  height: 300px;
  background: linear-gradient(100deg, #111 20%, #1c1d1a 40%, #111 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.company-team {
  padding: clamp(3rem, 7vw, 6rem) max(5vw, 2rem);
  background: #101111;
  color: #f3f0e9;
}

.company-team-head h2 {
  margin: .5rem 0 2.5rem;
  font: 400 clamp(2.4rem, 5vw, 5rem)/1 var(--serif);
}

.company-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #4a463e;
}

.company-maker {
  display: flex;
  min-width: 0;
  min-height: 13rem;
  align-items: flex-start;
  flex-direction: column;
  gap: .55rem;
  padding: 1.5rem;
  border: 0;
  border-right: 1px solid #4a463e;
  border-bottom: 1px solid #4a463e;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.company-maker:not(.static) { cursor: pointer; }
.company-maker:nth-child(3n) { border-right: 0; }
.company-maker:not(.static):hover, .company-maker:not(.static):focus-visible { background: #1b1c1b; outline: 2px solid var(--gold-light); outline-offset: -2px; }
.company-maker > span, .company-maker em { color: var(--gold-light); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.company-maker strong { overflow-wrap: anywhere; font: 400 1.65rem/1.1 var(--serif); }
.company-maker small { color: #c5c1b8; }
.company-maker em { margin-top: auto; font-style: normal; }

@media (max-width: 850px) {
  .companies { padding-inline: 1.25rem; }
  .companies-head { align-items: start; flex-direction: column; }
  .company-grid { grid-template-columns: 1fr; }
  .company-card { grid-template-columns: 42% minmax(0, 1fr); min-height: 245px; border-right: 0; }
  .company-visual { min-height: 245px; }
  .company-name { margin-bottom: 1.7rem; }
  .company-card-meta { align-items: start; flex-direction: column; }
  .company-card-meta em { text-align: left; }
  .company-team-grid { grid-template-columns: 1fr 1fr; }
  .company-maker:nth-child(3n) { border-right: 1px solid #4a463e; }
  .company-maker:nth-child(2n) { border-right: 0; }
}

@media (max-width: 560px) {
  .company-card { grid-template-columns: 1fr; }
  .company-visual { min-height: 230px; }
  .company-copy { min-height: 220px; }
  .company-loading { grid-template-columns: 1fr; }
  .company-loading i:not(:first-child) { display: none; }
  .company-team-grid { grid-template-columns: 1fr; }
  .company-maker, .company-maker:nth-child(3n) { border-right: 0; }
}
