.avatar-hero {
  position: relative;
  scroll-margin-top: 80px;
  width: 100%;
  height: clamp(560px, 42vw, 760px);
  overflow: hidden;
  isolation: isolate;
  background: #070f2c;
  color: #fff;
}
.avatar-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.avatar-hero__poster, .avatar-hero__video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}
.avatar-hero__video { opacity: 0; }
.avatar-hero.is-video-ready .avatar-hero__video { opacity: 1; }
.avatar-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5,12,35,.36), transparent 50%);
}
.avatar-hero__content {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 72px);
  pointer-events: none;
}
.avatar-hero__copy { width: 43%; }
.avatar-hero .avatar-hero__title {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading), sans-serif;
  font-size: clamp(46px, 5.2vw, 76px) !important;
  line-height: 1.07 !important;
  letter-spacing: -.045em !important;
  font-weight: 400;
}
.avatar-hero__title strong { font-weight: 700; }
.avatar-hero__description {
  display: block;
  margin-top: 24px;
  max-width: 420px;
  color: #d1d9ed;
  font: 400 19px/1.6 'Inter', sans-serif;
}
@media (min-width:1200px) {
  .avatar-hero__media { transform: translateX(100px); }
  .avatar-hero::after {
    background: linear-gradient(90deg, #070f2c 100px, rgba(7,15,44,.72) 220px, rgba(7,15,44,0) 55%);
  }
}
@media (min-width:768px) and (max-width:1199px) {
  #top.avatar-hero {
    height: clamp(420px, 47vw, 560px) !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }
  .avatar-hero__content { align-items: center; padding-top: 0; }
  .avatar-hero__copy { width: 48%; }
  .avatar-hero .avatar-hero__title { font-size: clamp(40px, 5.2vw, 60px) !important; }
  .avatar-hero__description { margin-top: 18px; font-size: 17px; max-width: 350px; }
  .avatar-hero__media { top: 0; transform: translateX(12%); }
  .avatar-hero__poster { object-position: center top; }
  .avatar-hero__video { display: block; }
  .avatar-hero::after {
    background: linear-gradient(90deg, #070f2c 12%, rgba(7,15,44,.5) 32%, rgba(7,15,44,0) 55%);
  }
}
@media (max-width:767px) {
  #top.avatar-hero {
    height: clamp(590px, calc(100vw + 190px), 620px) !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }
  .avatar-hero__content { align-items: flex-start; padding-top: 40px; }
  .avatar-hero__copy { width: 100%; }
  .avatar-hero .avatar-hero__title { font-size: clamp(38px, 9.5vw, 48px) !important; }
  .avatar-hero__description { margin-top: 10px; font-size: 16px; max-width: 320px; }
  .avatar-hero__media { top: 195px; background: #070f2c; }
  .avatar-hero__poster {
    width: clamp(660px, 165vw, 720px);
    height: auto;
    max-width: none;
    left: 50%;
    right: auto;
    top: 25px;
    bottom: auto;
    /* The character is at 59.5% of the source artwork width. */
    transform: translateX(-59.5%);
    object-fit: contain;
  }
  .avatar-hero__video { display: none; }
  .avatar-hero::after {
    background: linear-gradient(180deg, #070f2c 0%, #070f2c 32%, rgba(7,15,44,.85) 37%, rgba(7,15,44,0) 47%);
  }
}

.avatar-hero__description p { margin: 0; }
.avatar-hero__description p + p { margin-top: 10px; }
.avatar-hero__brand { white-space: nowrap; }

.avatar-hero__description { width: 100%; max-width: none; }

/* Desktop: hero 150px shorter; video smaller and pushed right, blended into a matching gradient */
@media (min-width:1200px) {
  #top.avatar-hero {
    height: clamp(410px, calc(42vw - 150px), 610px);
    background:
      radial-gradient(ellipse 60% 90% at 72% 70%, #2b3d8f 0%, #16236a 38%, rgba(7,15,44,0) 75%),
      linear-gradient(90deg, #070f2c 0%, #0b1440 55%, #0a1238 100%);
  }
  #top.avatar-hero .avatar-hero__poster,
  #top.avatar-hero .avatar-hero__video {
    inset: 0 0 auto auto;
    width: auto;
    height: calc(100% + 90px);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 50% 0%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 85%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 85%, transparent 100%);
  }
  #top.avatar-hero::after { background: linear-gradient(90deg, rgba(5,12,35,.5), transparent 45%); }
  #top.avatar-hero .avatar-hero__media { transform: none; }
}

/* Home: full-bleed project artwork, with stable copy and bottom controls. */
#top.avatar-hero--carousel {
  height: clamp(520px, 39vw, 720px) !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  background: #070f2c;
}
#top.avatar-hero--carousel::after { display: none; }
.avatar-hero--carousel .avatar-hero__content {
  position: relative;
  align-items: center;
  padding-top: 0;
  padding-bottom: 80px;
}
.avatar-hero--carousel .avatar-hero__copy {
  position: relative;
  z-index: 2;
  width: 44%;
}
.avatar-hero--carousel .avatar-hero__title { font-size: clamp(44px, 4.6vw, 68px) !important; }
.avatar-hero--carousel .avatar-hero__description { font-size: clamp(16px, 1.3vw, 19px); max-width: 540px; }
.hero-carousel {
  position: absolute;
  inset: 0;
  /* The content container is capped; the artwork spans the entire hero. */
  left: calc((100% - 100vw) / 2);
  right: calc((100% - 100vw) / 2);
  pointer-events: auto;
}
.hero-carousel__viewport { position: absolute; inset: 0; overflow: hidden; }
.hero-carousel__slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease;
}
.hero-carousel__slide:nth-child(1) { background: #6750e9; }
.hero-carousel__slide:nth-child(2) { background: #22a5e9; }
.hero-carousel__slide:nth-child(n+3) { background: #030506; }
.hero-carousel__slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.hero-carousel__slide picture { display: contents; }
.hero-carousel__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}
.hero-carousel__slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4,9,28,.92) 0%, rgba(4,9,28,.84) 30%, rgba(4,9,28,.12) 59%, transparent 74%),
    linear-gradient(0deg, rgba(4,9,28,.86) 0%, transparent 24%);
}
.hero-carousel__caption {
  position: absolute;
  z-index: 1;
  right: max(5vw, calc((100vw - 1296px) / 2));
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hero-carousel__kind {
  font: 500 11px/1.4 'Space Mono', monospace;
  letter-spacing: .12em; text-transform: uppercase;
  color: #d1d9ed;
}
.hero-carousel__name {
  display: inline-flex; align-items: center; gap: 9px;
  font: 600 19px/1.3 var(--font-heading, 'Manrope'), sans-serif;
  letter-spacing: -.02em;
}
.hero-carousel__name svg { width: 15px; height: 15px; flex-shrink: 0; transition: transform .2s ease; }
.hero-carousel__slide:hover .hero-carousel__name svg,
.hero-carousel__slide:focus-visible .hero-carousel__name svg { transform: translateX(4px); }
.hero-carousel__slide:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.hero-carousel__controls {
  position: absolute;
  z-index: 3;
  left: max(5vw, calc((100vw - 1296px) / 2));
  bottom: 24px;
  display: flex; align-items: center; gap: 6px;
}
.hero-carousel__dots { display: flex; align-items: center; gap: 0; }
.hero-carousel__dot {
  appearance: none; border: 0; padding: 0;
  width: 44px; height: 44px;
  background: transparent; cursor: pointer; position: relative;
}
.hero-carousel__dot::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 5px; height: 5px; border-radius: 999px;
  background: rgba(255,255,255,.4);
  transform: translate(-50%,-50%);
  transition: width .2s ease, background .2s ease;
}
.hero-carousel__dot:hover::before { background: #fff; }
.hero-carousel__dot.is-active::before { width: 18px; height: 4px; background: rgba(255,255,255,.85); }
.hero-carousel__toggle {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  position: relative; border: 0; border-radius: 999px;
  background: transparent; color: rgba(255,255,255,.8); cursor: pointer;
}
.hero-carousel__toggle::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; }
.hero-carousel__toggle svg { width: 11px; height: 11px; }
.hero-carousel__toggle:hover { color: #fff; }
.hero-carousel__toggle:hover::before { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.5); }
.hero-carousel__dot:focus-visible, .hero-carousel__toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 999px; }
.hero-carousel__toggle .i-play { display: none; }
.hero-carousel.is-paused .hero-carousel__toggle .i-play { display: block; }
.hero-carousel.is-paused .hero-carousel__toggle .i-pause { display: none; }
.hero-carousel__viewport { touch-action: pan-y pinch-zoom; cursor: grab; }
.hero-carousel__viewport img { -webkit-user-drag: none; user-select: none; }
.hero-carousel[data-dragging] .hero-carousel__viewport,
.hero-carousel[data-dragging] .hero-carousel__slide { cursor: grabbing; }
@media (min-width:768px) and (max-width:1199px) {
  #top.avatar-hero--carousel { height: clamp(450px, 47vw, 560px) !important; }
  .avatar-hero--carousel .avatar-hero__copy { width: 46%; }
  .avatar-hero--carousel .avatar-hero__title { font-size: clamp(34px, 4.6vw, 52px) !important; }
  .avatar-hero--carousel .avatar-hero__description { font-size: 16px; margin-top: 18px; }
  .hero-carousel__slide img { object-fit: contain; object-position: right center; }
  .hero-carousel__name { font-size: 17px; }
}
@media (max-width:767px) {
  #top.avatar-hero--carousel { height: clamp(740px, calc(100vw + 360px), 860px) !important; }
  .avatar-hero--carousel .avatar-hero__content { align-items: flex-start; padding-top: 36px; padding-bottom: 0; }
  .avatar-hero--carousel .avatar-hero__copy { width: 100%; }
  .avatar-hero--carousel .avatar-hero__title { font-size: clamp(34px, 8.7vw, 48px) !important; }
  .avatar-hero--carousel .avatar-hero__description { font-size: 16px; line-height: 1.6; margin-top: 16px; max-width: 440px; }
  .hero-carousel__slide img { height: calc(100% - 140px); object-position: center bottom; }
  .hero-carousel__slide::after {
    background: linear-gradient(180deg, rgba(4,9,28,.93) 0%, rgba(4,9,28,.82) 26%, rgba(4,9,28,.3) 44%, transparent 58%),
      linear-gradient(0deg, #070f2c 0px, #070f2c 138px, rgba(7,15,44,.16) 210px, transparent 270px);
  }
  .hero-carousel__caption { left: 50%; right: auto; bottom: 86px; width: max-content; max-width: calc(100% - 40px); transform: translateX(-50%); align-items: flex-start; text-align: left; }
  .hero-carousel__kind { font-size: 10px; }
  .hero-carousel__name { font-size: 18px; }
  .hero-carousel__controls { left: 50%; bottom: 20px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel__slide, .hero-carousel__name svg, .hero-carousel__dot::before { transition: none; }
}

/* Desktop: reveal supporting project details when the hero is engaged. */
@media (min-width:1200px) and (hover:hover) and (pointer:fine) {
  .avatar-hero--carousel .hero-carousel__caption,
  .avatar-hero--carousel .hero-carousel__controls {
    opacity: .35;
    transition: opacity .25s ease;
  }
  .avatar-hero--carousel:hover .hero-carousel__caption,
  .avatar-hero--carousel:hover .hero-carousel__controls,
  .avatar-hero--carousel:focus-within .hero-carousel__caption,
  .avatar-hero--carousel:focus-within .hero-carousel__controls { opacity: 1; }
}
@media (prefers-reduced-motion:reduce) {
  .avatar-hero--carousel .hero-carousel__caption,
  .avatar-hero--carousel .hero-carousel__controls { transition: none; }
}
