/* Homepage banner. Image and copy: templates/home/_banner.html.
Edit object-position separately for desktop/mobile to keep the subject visible.
object-fit: cover crops the landscape without stretching its proportions. */
.portrait-masthead {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 740px;
  height: calc(100svh - 76px);
  max-height: 1100px;
  overflow: hidden;
  color: #ffffff;
  background: #101010;
}

.masthead-photo {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.masthead-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.masthead-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(0deg,#101010b0,transparent 35%,#10101040 75%,#10101080);
}

.masthead-meta {
  position: absolute;
  top: 32px;
  left: 56px;
  right: 56px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: .65rem;
}

/* Viewport-relative lettering stays large without overflowing short desktop windows. */
.masthead-name {
  position: absolute;
  left: 3.5%;
  right: 3.5%;
  top: 50%;
  transform: translateY(-50%);
  font-size: min(24vw,37svh);
  line-height: .98;
  text-transform: uppercase;
  letter-spacing: -.035em;
  margin: 0;
  font-weight: 400;
}

.masthead-name > span {
  display: block;
}

.masthead-name > span:last-child {
  color: transparent;
  -webkit-text-stroke: 2px #ffffff;
}

.masthead-period {
  color: #59acff;
  -webkit-text-stroke: 0;
}

.masthead-footer {
  position: absolute;
  bottom: 32px;
  left: 56px;
  right: 56px;
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 28px;
}

.masthead-links {
  display: flex;
  gap: 35px;
}

.masthead-links a {
  display: flex;
  align-items: center;
  gap: 30px;
  text-decoration: none;
  border-bottom: 1px solid #ffffff80;
  padding-block: 12px;
  font-size: .85rem;
}

.masthead-links a:hover {
  color: #59acff;
  border-color: currentColor;
}

.masthead-links a span {
  font-size: 1.4rem;
}

/* Animate only when the visitor has not requested reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes display-enter {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes portrait-enter {
    from {
      clip-path: inset(12% 0 0 0);
      opacity: 0;
    }
    to {
      clip-path: inset(0);
      opacity: 1;
    }
  }
  .masthead-name > span {
    animation: display-enter 1s cubic-bezier(.2,.65,.2,1) both;
  }
  .masthead-name > span:last-child {
    animation-delay: .12s;
  }
  .masthead-photo {
    animation: portrait-enter 1.3s cubic-bezier(.2,.65,.2,1) both;
  }
}

@media (max-width: 900px) {
  .masthead-meta,.masthead-footer {
    left: 24px;
    right: 24px;
  }
  .masthead-name {
    left: 3.5%;
    right: 3.5%;
  }
  .portrait-masthead {
    min-height: 680px;
  }
}

@media (max-width: 600px) {
  .portrait-masthead {
    height: calc(100svh - 70px);
    min-height: 680px;
    max-height: 950px;
  }
  .masthead-photo {
    inset: 0;
  }
  .masthead-photo img {
    object-position: 80% 35%;
  }
  .masthead-shade {
    background: linear-gradient(0deg,#101010 0%,#101010b8 20%,#10101030 65%,#101010b0 100%);
  }
  .masthead-meta {
    top: 24px;
    flex-direction: column;
    gap: 6px;
    font-size: .6rem;
  }
  .masthead-name {
    top: 50%;
    bottom: auto;
    transform: translateY(-40%);
    font-size: 26vw;
  }
  .masthead-name > span:last-child {
    -webkit-text-stroke-width: 1.5px;
  }
  .masthead-footer {
    bottom: 24px;
    display: block;
  }
  .masthead-links {
    justify-content: space-between;
    gap: 24px;
  }
  .masthead-links a {
    gap: 18px;
  }
}

@media print {
  .masthead-name > span:last-child {
    color: #ffffff;
  }
}
