/* The hero and the sections below it use independent paint layers. */
.hero-frame,
.hero-text,
.showcase-caption,
.showcase-controls {
  transform: translateZ(0);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #e8f7ff;
  border-block: 1px solid #dae5e9;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('img/contours.webp') right center / cover no-repeat;
  /* Match the bitmap's base blue to the solid blue of the section. */
  filter: url(#hero-contour-color);
  --contour-fade: linear-gradient(90deg, transparent 38%, #000 62%);
  -webkit-mask-image: var(--contour-fade);
  mask-image: var(--contour-fade);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr);
  align-items: center;
  width: min(1370px, 90%);
  min-height: 490px;
  margin: auto;
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 52px 0;
}

.hero a { color: inherit; text-decoration: none; }
.hero a:focus-visible, .hero button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.hero-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.hero-rule { width: 27px; height: 3px; background: var(--sun); display: inline-block; }

.hero h1 {
  margin: 0;
  font-size: clamp(59px, 6.1vw, 95px);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: .96;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  isolation: isolate;
  color: var(--blue-ink);
  font-style: normal;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 1%;
  right: -3%;
  bottom: 0;
  height: .11em;
  border-radius: 50%;
  background: var(--sun);
  transform: rotate(-2deg);
}

.hero-intro { margin: 23px 0 27px; max-width: 360px; font-size: 19px; line-height: 1.48; color: #405765; }

.hero .hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  border: 0;
  border-radius: 28px;
  background: var(--berry);
  color: #fff;
  box-shadow: 0 2px 0 #98042325;
  font-size: 16px;
  font-weight: 700;
}
.hero-cta:hover { background: #b60932; }

.hero-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
  min-width: 0;
  padding: 28px 0 22px;
}

.showcase-slide { position: relative; color: var(--ink); }

.showcase-composition {
  position: relative;
  width: 100%;
  aspect-ratio: 1.58;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.showcase-composition .showcase-illustration {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.showcase-has-switched .showcase-slide:not([hidden]) :is(.showcase-composition, .showcase-caption) {
  animation: showcase-enter .32s ease-out;
}
@keyframes showcase-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-has-switched .showcase-slide:not([hidden]) :is(.showcase-composition, .showcase-caption) { animation: none; }
}

.showcase-caption {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding-top: 16px;
  border-top: 1px solid #a1b9c2;
}
.showcase-caption strong { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.showcase-caption p { margin: 5px 0 0; max-width: 220px; font-size: 13px; line-height: 1.4; color: #486878; }
.showcase-link { padding-bottom: 3px; font-size: 13px; white-space: nowrap; color: var(--blue-ink); }
.showcase-slide:hover .showcase-link { text-decoration: underline; text-underline-offset: 4px; }

.showcase-controls {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 10px;
  margin: 8px 0 0;
}
.showcase-controls button {
  min-height: 44px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #405765;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.hero .showcase-controls button:focus-visible { outline-offset: 0; }
.showcase-controls button[aria-pressed="true"] {
  color: var(--blue-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
@media (hover: hover) {
  .showcase-controls button:hover { color: var(--blue-ink); }
}
.showcase-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); }
  .showcase-caption { align-items: start; flex-direction: column; gap: 10px; min-height: 105px; }
}
@media (max-width: 800px) {
  .hero-inner { width: 92%; min-height: 400px; }
  .hero h1 { font-size: 56px; }
  .hero-intro { font-size: 17px; }
}
@media (max-width: 720px) {
  .hero-backdrop { --contour-fade: linear-gradient(180deg, transparent 47%, #000 75%); }
  .hero-inner { display: block; }
  .hero-text { padding: clamp(30px, 5vw, 38px) 0 0; }
  .hero-showcase { padding: 14px 0 24px; }
  .showcase-caption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    align-items: end;
    gap: 4px 14px;
    min-height: 80px;
  }
  .showcase-caption > div { display: contents; }
  .showcase-caption strong { grid-column: 1 / -1; font-size: 20px; }
  .showcase-caption p { margin: 0; font-size: 12px; min-height: 2.8em; }
  .showcase-link { font-size: 12px; text-align: right; }
  .showcase-controls { gap: 0 3px; }
  .showcase-controls button { padding-inline: 5px; }
}
@media (max-width: 590px) {
  .hero-inner { width: 90%; }
  .hero-backdrop { background-position: center bottom; background-size: auto 80%; }
  .hero-label { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(48px, 11.5vw, 66px); }
  .hero-intro { margin: 13px 0 17px; max-width: 315px; }
  .hero .hero-cta { padding: 12px 18px; }
}
@media (max-width: 440px) {
  .showcase-controls::after { content: ""; flex-basis: 100%; order: 1; }
  .showcase-controls button:nth-of-type(n+4) { order: 2; }
}
