/* erviclabs.com: page-specific styles on top of the shared kit. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mono {
  font-family: var(--el-font-mono);
  font-size: 0.82em;
  letter-spacing: -0.01em;
}

/* Load choreography */

.reveal {
  animation: rise var(--el-dur) var(--el-ease) both;
  animation-duration: 700ms;
  animation-delay: calc(var(--i, 0) * 90ms + 60ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--el-space-4);
  padding-block: var(--el-space-5);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--el-font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark-mark {
  width: 1.1rem;
  height: 1.1rem;
  background:
    linear-gradient(var(--el-signal), var(--el-signal)) 0 0 / 50% 50% no-repeat,
    linear-gradient(var(--el-ink), var(--el-ink)) 100% 100% / 50% 50% no-repeat;
  outline: 1px solid var(--el-ink);
  outline-offset: 0;
}

@media (max-width: 34rem) {
  .masthead-meta {
    display: none;
  }
}

/* Hero: a specimen sheet with crop marks */

.hero {
  padding-block: var(--el-space-4) var(--el-space-8);
}

.hero-sheet {
  position: relative;
  display: grid;
  gap: var(--el-space-7);
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background: var(--el-paper-raised);
  border: var(--el-border);
}

.crop {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--el-ink);
  border-style: solid;
  border-width: 0;
}

.crop-tl { top: -9px; left: -9px; border-top-width: 1px; border-left-width: 1px; }
.crop-tr { top: -9px; right: -9px; border-top-width: 1px; border-right-width: 1px; }
.crop-bl { bottom: -9px; left: -9px; border-bottom-width: 1px; border-left-width: 1px; }
.crop-br { bottom: -9px; right: -9px; border-bottom-width: 1px; border-right-width: 1px; }

.hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--el-space-3);
  padding-bottom: var(--el-space-4);
  border-bottom: 1px dashed var(--el-rule);
}

.hero-title {
  font-size: var(--el-step-4);
  font-weight: 400;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  line-height: 0.98;
  letter-spacing: -0.022em;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--el-signal);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.hero-bottom {
  display: grid;
  gap: var(--el-space-5);
  align-items: end;
}

@media (min-width: 48rem) {
  .hero-bottom {
    grid-template-columns: minmax(0, 36rem) auto;
    justify-content: space-between;
  }
}

.hero-lede {
  font-size: var(--el-step-1);
  line-height: 1.45;
  color: var(--el-ink-soft);
}

/* Index */

.index {
  padding-bottom: var(--el-space-8);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--el-space-4);
  padding-bottom: var(--el-space-3);
  border-bottom: 1px solid var(--el-ink);
}

.section-head h2 {
  font-size: var(--el-step-3);
  font-style: italic;
  font-weight: 300;
}

.specimens {
  list-style: none;
  margin: 0;
  padding: var(--el-space-6) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--el-space-6) var(--el-space-5);
}

/* Card: a specimen plate */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--el-paper-raised);
  border: var(--el-border);
  animation: rise 600ms var(--el-ease) both;
  animation-delay: calc(var(--i, 0) * 80ms + 300ms);
  transition: border-color var(--el-dur) var(--el-ease), transform var(--el-dur) var(--el-ease),
    box-shadow var(--el-dur) var(--el-ease);
}

.card:not(.is-closed):hover {
  border-color: var(--el-ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.45);
}

.plate {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--el-paper-sunk);
  border-bottom: var(--el-border);
}

.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 900ms var(--el-ease);
}

.card:not(.is-closed):hover .plate img {
  transform: scale(1.035);
}

.plate-empty {
  display: grid;
  place-items: center;
  font-family: var(--el-font-display);
  font-size: var(--el-step-4);
  font-style: italic;
  color: var(--el-ink-faint);
}

.plate-tags {
  position: absolute;
  inset: var(--el-space-3) var(--el-space-3) auto;
  display: flex;
  justify-content: space-between;
  gap: var(--el-space-2);
  pointer-events: none;
}

.plate-tag {
  padding: 0.45em 0.65em;
  background: var(--el-paper-raised);
  border: var(--el-border);
  line-height: 1;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--el-space-2);
  padding: var(--el-space-4) var(--el-space-5) var(--el-space-5);
}

.card h3 {
  font-size: var(--el-step-2);
  font-weight: 400;
}

.card-link {
  text-decoration: none;
  background: linear-gradient(var(--el-signal), var(--el-signal)) 0 100% / 0 2px no-repeat;
  transition: background-size var(--el-dur) var(--el-ease), color var(--el-dur) var(--el-ease);
}

/* Whole card is clickable; secondary links sit above this layer. */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card:hover .card-link {
  background-size: 100% 2px;
}

.card-body p {
  color: var(--el-ink-soft);
}

.card-foot {
  margin-top: auto;
  padding-top: var(--el-space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--el-space-2) var(--el-space-4);
  border-top: 1px dashed var(--el-rule);
  font-family: var(--el-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.card-host {
  color: var(--el-ink-faint);
  overflow-wrap: anywhere;
}

.card-go {
  color: var(--el-signal);
}

.card-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--el-space-1) var(--el-space-3);
}

.card-links a {
  color: var(--el-ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-links a:hover {
  color: var(--el-signal);
}

.card.is-closed .plate img {
  filter: grayscale(1);
  opacity: 0.6;
}

.card-empty .card-body h3 {
  font-style: italic;
  color: var(--el-ink-soft);
}

/* Principles */

.principles {
  display: grid;
  gap: var(--el-space-6);
  padding-bottom: var(--el-space-8);
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.principle {
  display: grid;
  align-content: start;
  gap: var(--el-space-2);
  padding-top: var(--el-space-4);
  border-top: 1px solid var(--el-ink);
}

.principle h3 {
  font-size: var(--el-step-1);
  font-weight: 500;
}

.principle p {
  color: var(--el-ink-soft);
}
