:root {
  --niu-font-heading: 'HelveticaNowDisplay-Medium', 'Helvetica Neue', Arial, sans-serif;
  --niu-font-body: 'HelveticaNowDisplayW01-Rg', 'Helvetica Neue', Arial, sans-serif;
}

.niu-hero,
.niu-hero * {
  box-sizing: border-box;
}

.niu-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: #050505;
  background: linear-gradient(135deg, #eaf4fb 0%, #c9e4f4 48%, #8fbfe0 100%);
  font-family: var(--niu-font-body);
}

.niu-hero a,
.niu-hero button {
  color: inherit;
  font: inherit;
}

.niu-hero a {
  text-decoration: none;
}

.niu-hero button {
  border: 0;
}

.niu-hero a:focus-visible,
.niu-hero button:focus-visible {
  outline: 2px solid #050505;
  outline-offset: 4px;
}

.niu-hero-visuals,
.niu-hero-base,
.niu-hero-bg-position,
.niu-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.niu-hero-visuals {
  z-index: 0;
  overflow: hidden;
}

.niu-hero-base {
  z-index: 0;
  background: linear-gradient(135deg, #eaf4fb 0%, #c9e4f4 48%, #8fbfe0 100%);
}

.niu-hero-bg-position {
  z-index: 1;
  overflow: hidden;
}

.niu-hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
  filter: saturate(.92) brightness(1.02);
  transform: translate3d(0,0,0) scale(1.06);
  transform-origin: center;
  will-change: transform;
}

.niu-hero-overlay {
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgb(245 250 252 / 82%) 0%,
    rgb(245 250 252 / 58%) 30%,
    rgb(245 250 252 / 15%) 58%,
    transparent 76%
  );
}

.niu-hero-portrait-position {
  position: absolute;
  z-index: 3;
  right: -8vw;
  bottom: clamp(-30px, -2vh, 0px);
  width: max-content;
  height: clamp(560px, 91svh, 980px);
  pointer-events: none;
}

.niu-hero-portrait {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 24px 45px rgb(20 45 64 / 12%));
  transform: translate3d(0,0,0) perspective(1200px) rotateX(0) rotateY(0) scale(1.01);
  transform-origin: 50% 80%;
  will-change: transform;
}

.niu-hero-nav {
  position: absolute;
  z-index: 14;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 2.7vw, 2.5rem);
}

.niu-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: #050505;
}

.niu-hero-logo {
  font-family: var(--niu-font-heading);
  font-size: clamp(1.3rem, 1.8vw, 1.625rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.niu-hero-symbol {
  font-size: clamp(1.55rem, 2.1vw, 1.875rem);
  line-height: 1;
  letter-spacing: -.02em;
  user-select: none;
}

.niu-hero-desktop-nav {
  position: absolute;
  left: 50%;
  display: flex;
  transform: translateX(-50%);
  color: #050505;
  font-size: 1.4375rem;
  line-height: 1.1;
  white-space: nowrap;
}

.niu-hero-desktop-nav a,
.niu-hero-contact-link {
  transition: opacity .2s ease;
}

.niu-hero-desktop-nav a:hover,
.niu-hero-contact-link:hover {
  opacity: .6;
}

.niu-hero-contact-link {
  color: #050505;
  font-size: 1.4375rem;
  line-height: 1.1;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.niu-hero-menu-button {
  position: relative;
  z-index: 32;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  background: transparent;
  cursor: pointer;
}

.niu-hero-menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  background: #050505;
  transition: transform .3s ease, opacity .3s ease;
}

.niu-hero-menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.niu-hero-menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.niu-hero-menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.niu-hero-mobile-menu {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  color: #050505;
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.niu-hero-mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.niu-hero-mobile-menu a {
  width: fit-content;
  color: #050505;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.05;
}

.niu-hero-mobile-menu a:last-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.niu-hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0 clamp(1.25rem, 2.7vw, 2.5rem);
  pointer-events: none;
}

.niu-hero-copy {
  position: relative;
  z-index: 10;
  width: min(36rem, 47vw);
}

.niu-hero-intro,
.niu-hero-typewriter {
  margin: 0 0 clamp(1.25rem, 1.8vw, 1.5rem);
  color: #050505;
  font-size: clamp(1.125rem, 2.1vw, 1.625rem);
  font-weight: 400;
}

.niu-hero-intro {
  line-height: 1.3;
  filter: blur(4px);
  user-select: none;
}

.niu-hero-typewriter {
  min-height: 4.4rem;
  line-height: 1.35;
}

.niu-hero-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: middle;
  background: #050505;
  animation: niuHeroBlink 1s step-end infinite;
}

@keyframes niuHeroBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.niu-hero-actions {
  display: flex;
  flex-wrap: wrap;
  row-gap: .25rem;
  margin-left: -.2em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: auto;
  transition: opacity .4s ease, transform .4s ease;
}

.niu-hero-actions.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.niu-hero-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 .2em .4em;
  padding: .3em 1rem;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 999px;
  color: #050505;
  background: #fff;
  font-size: clamp(.8125rem, 1vw, .9375rem);
  line-height: 1.3;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.niu-hero-pill:hover {
  color: #fff;
  background: #050505;
  border-color: #050505;
}

.niu-hero-email-pill {
  border-color: #050505;
  background: transparent;
  cursor: pointer;
}

.niu-hero-email-pill svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.niu-hero-email-address {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.niu-hero-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.niu-hero-active .pointer-glow {
  opacity: 0;
}

@media (max-width: 1100px) and (min-width: 768px) {
  .niu-hero-copy {
    width: min(31rem, 54vw);
  }

  .niu-hero-portrait-position {
    right: -24vw;
  }

  .niu-hero-desktop-nav {
    font-size: 1.1rem;
  }

  .niu-hero-contact-link {
    font-size: 1.1rem;
  }
}

@media (max-width: 767px) {
  .niu-hero {
    min-height: 100svh;
  }

  .niu-hero-desktop-nav,
  .niu-hero-contact-link {
    display: none;
  }

  .niu-hero-menu-button,
  .niu-hero-mobile-menu {
    display: flex;
  }

  .niu-hero-content {
    justify-content: flex-end;
    padding: 0 1.25rem calc(3rem + env(safe-area-inset-bottom, 0px));
  }

  .niu-hero-copy {
    width: 100%;
    max-width: 38rem;
  }

  .niu-hero-portrait-position {
    top: clamp(88px, 14svh, 126px);
    right: -4vw;
    bottom: auto;
    height: min(44svh, 420px);
    opacity: .94;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
  }

  .niu-hero-portrait {
    will-change: auto;
  }

  .niu-hero-overlay {
    background:
      linear-gradient(
        0deg,
        rgb(245 250 252 / 96%) 0%,
        rgb(245 250 252 / 84%) 36%,
        rgb(245 250 252 / 30%) 67%,
        transparent 83%
      ),
      linear-gradient(
        90deg,
        rgb(245 250 252 / 56%) 0%,
        rgb(245 250 252 / 18%) 66%,
        transparent 100%
      );
  }

  .niu-hero-intro,
  .niu-hero-typewriter {
    font-size: clamp(1.05rem, 4.6vw, 1.35rem);
  }

  .niu-hero-typewriter {
    min-height: 4.2rem;
  }

  .niu-hero-pill {
    min-height: 38px;
  }
}

@media (max-width: 767px) and (max-height: 720px) {
  .niu-hero-content {
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .niu-hero-intro {
    margin-bottom: .7rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .niu-hero-typewriter {
    min-height: 2.5rem;
    margin-bottom: .75rem;
    font-size: 1rem;
    line-height: 1.25;
  }

  .niu-hero-pill {
    min-height: 32px;
    margin-bottom: .3em;
    padding-inline: .85rem;
    font-size: .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .niu-hero *,
  .niu-hero *::before,
  .niu-hero *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .niu-hero-bg,
  .niu-hero-portrait {
    will-change: auto;
  }
}

/* v3: Chinese hero copy, with the former blurred introductory label removed. */
.niu-hero-copy {
  max-width: 39rem;
}

.niu-hero-typewriter {
  margin-top: 0;
}

@media (min-width: 768px) {
  .niu-hero-typewriter {
    max-width: 36rem;
  }
}
