/* Original Cambridge Coffee landing composition and animation. */
.hero {
  --paper: #fff2d6;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template: auto minmax(0, 1fr) / minmax(0, 1fr);
  min-height: 26rem;
  height: 100vh;
  height: 100svh;
  overflow: clip;
}
.hero .paper-texture {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--paper-opacity, 1);
}
.hero .corner-seal {
  display: block;
  width: clamp(3.5rem, 5.25vw, 4.8rem);
  height: auto;
  margin: clamp(.2rem, .38vw, .35rem) clamp(.65rem, 1.1vw, 1.1rem);
}
.hero .artwork {
  position: relative;
  min-width: 0;
  container: hero / size;
}
.hero .bicycle-frame { position: absolute; inset: 0; }
.hero .art-bike,
.hero .art-name { position: absolute; display: block; height: auto; pointer-events: none; }
.hero .art-bike {
  right: 1.1cqw;
  bottom: 1cqh;
  width: min(92cqw, 132cqh);
}
.hero .bike-print,
.hero .bike-print img { display: block; width: 100%; height: auto; }
/* Keep the original wheel layers visible as a still image under reduced motion. */
.hero .wheel-window {
  position: absolute;
  display: block;
  left: calc(100% * 101 / 986);
  top: calc(100% * 193 / 608);
  width: calc(100% * 350 / 986);
  aspect-ratio: 1;
  -webkit-mask: url("assets/rear-window.webp") center / 100% 100% no-repeat;
  mask: url("assets/rear-window.webp") center / 100% 100% no-repeat;
}
.hero .wheel-window img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero .wheel-spokes { transform-origin: 50.142857% 50%; }
.hero .wheel-reflections { transform-origin: 50.628571% 49.857143%; }
@keyframes rear-wheel-turn { to { transform: rotate(1turn); } }
.hero .wordmark-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(97cqw, 124cqh);
  aspect-ratio: 1.24;
}
.hero .art-name {
  left: .5%;
  top: 2.4%;
  width: 98%;
  overflow: visible;
}
.hero .art-name .lettering { pointer-events: visiblePainted; }
.hero .wordmark-power { opacity: 0; pointer-events: none; }
@keyframes wordmark-light-cycle {
  0%, 25%, 100% { opacity: 0; }
  50%, 75% { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .wheel-window img { animation: rear-wheel-turn 4.8s linear infinite; }
  .hero .wordmark-power { animation: wordmark-light-cycle 20s ease-in-out infinite; }
}
.hero .art-name:focus:not(:focus-visible) { outline: none; }
.hero .art-name:focus-visible { outline: 2px dotted var(--paper); outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) {
  .hero .art-name:active .wordmark-power,
  .hero .art-name:focus-visible .wordmark-power { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (any-hover: hover) {
  .hero .art-name:hover .wordmark-power { opacity: 1; }
}
@container hero (max-aspect-ratio: 1 / 1) {
  .hero .bicycle-frame {
    inset: clamp(.75rem, 6cqh, 4rem) 0 auto;
    height: min(93cqw, 94cqh);
  }
  .hero .art-bike { bottom: 0; right: .4cqw; width: 97cqw; }
}
@media (max-width: 42rem) {
  .hero .wordmark-frame {
    top: clamp(.75rem, 4svh, 2.25rem);
    transform: translateX(-50%);
    width: min(97cqw, 116cqh);
  }
}
