:root{
  --bg0:#070B12;
  --bg1:#0A1223;
  --ink:#ECF2FF;
  --muted:#A9B7D6;
  --faint:rgba(236,242,255,.08);
  --card:rgba(12,18,34,.62);
  --stroke:rgba(236,242,255,.16);
  --stroke2:rgba(130,170,255,.22);
  --blue:#67B7FF;
  --blue2:#8B7CFF;
  --amber:#FFC98A;
  --shadow:0 30px 90px rgba(0,0,0,.52);
  --radius:22px;
  --radius2:14px;
  --sans:"PingFang SC", -apple-system, BlinkMacSystemFont, system-ui, "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif:var(--sans);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--ink);
  font-family:var(--sans);
  background:
    radial-gradient(1200px 900px at 18% 14%, rgba(103,183,255,.14) 0%, transparent 62%),
    radial-gradient(900px 700px at 76% 18%, rgba(255,201,138,.10) 0%, transparent 55%),
    radial-gradient(1100px 900px at 70% 88%, rgba(139,124,255,.10) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* links: keep text white across states */
a{
  color: rgba(236,242,255,.96);
  text-decoration-color: rgba(236,242,255,.72);
  text-underline-offset: 3px;
}
a:visited{ color: rgba(236,242,255,.96); }
a:hover{ color: rgba(236,242,255,.98); }
a:active{ color: rgba(236,242,255,.98); }
a:focus-visible{
  outline: 2px solid rgba(103,183,255,.55);
  outline-offset: 3px;
  border-radius: 10px;
}

/* reveal animation (progressive text entrance) */
.revealItem{
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  will-change: opacity, transform, filter;
}
body.reveal-ready .revealItem{
  animation: revealUp 720ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes revealUp{
  from{ opacity:0; transform: translateY(10px); filter: blur(6px); }
  to{ opacity:1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce){
  .revealItem{
    opacity: 1;
    transform: none;
    filter: none;
    animation: none !important;
  }
}

.skip{
  position:absolute; left:-999px; top:10px;
  background:var(--ink); color:#0b1020;
  padding:10px 14px; border-radius:12px;
}
.skip:focus{left:12px; z-index:50}

.page{min-height:100%; display:flex; flex-direction:column}

.hero{
  position:relative;
  min-height:100vh;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  --hero-lead-top: 5vh;
}

.hero__bg{
  position:absolute; inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 520px at 18% 26%, rgba(103,183,255,.20), transparent 60%),
    radial-gradient(740px 520px at 68% 34%, rgba(139,124,255,.12), transparent 60%),
    radial-gradient(820px 560px at 76% 78%, rgba(255,201,138,.10), transparent 60%),
    linear-gradient(180deg, rgba(7,11,18,.10), rgba(7,11,18,.82)),
    linear-gradient(90deg, rgba(7,11,18,.78), rgba(7,11,18,.20) 42%, rgba(7,11,18,.72)),
    url("./aita-bg.jpeg") center / cover no-repeat;
  mask-image: radial-gradient(1200px 800px at 40% 28%, #000 52%, transparent 100%);
  opacity:1;
  filter:saturate(1.05) contrast(1.06);
}

.hero__frame{
  position:relative;
  z-index:1;
  max-width:1120px;
  margin:0 auto;
  width:100%;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:16px;
  padding: clamp(12px, 3.2vw, 22px);
}

.hero__body{
  position:relative;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  min-height:0;
  width:100%;
}

.hero__body::before{
  content:"";
  /* Keep the lead tagline ~5% from top of viewport */
  flex:0 0 var(--hero-lead-top);
  min-height:0;
  width:0;
  pointer-events:none;
}
.hero__body::after{
  content:"";
  flex:1 1 auto;
  min-height:0;
  width:0;
  pointer-events:none;
}

.hero__tagline{
  z-index:3;
  width:100%;
  max-width:100%;
  margin-inline:auto;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: clamp(16px, 2.8vh, 32px);
  overflow: visible;
  padding-top: 6px;
}

.hero__tagline-bottom{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:10vh;
  bottom:10dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: clamp(10px, 1.8vh, 18px);
  width:max-content;
  max-width:92vw;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.hero__tagline-line{
  margin:0;
  width:max-content;
  max-width:none;
  white-space:nowrap;
  color: rgba(236,242,255,.96);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.48;
  letter-spacing: .02em;
  text-shadow:
    0 1px 0 rgba(7,11,18,.35),
    0 12px 40px rgba(0,0,0,.35);
}
.hero__tagline-bottom .hero__tagline-line{
  font-size: clamp(22px, 2.8vw, 32px);
}
.hero__tagline-bottom .hero__tagline-line:nth-child(2){
  font-size: clamp(18px, 2.3vw, 28px);
}
.hero__tagline-line--lead{
  margin-top: 0;
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.35;
}
.hero__tagline-line--accent{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:10vh;
  bottom:10dvh;
  width:min(36em, 92vw);
  margin:0;
  padding-block: 0.12em;
  text-align:center;
  font-weight: 700;
  font-size: clamp(13px, 2vw, 20px);
  line-height: 1.55;
  letter-spacing: .06em;
  color: rgba(255,255,255,.96);
  text-shadow:
    0 1px 0 rgba(7,11,18,.35),
    0 12px 40px rgba(0,0,0,.35);
}
.hero__tagline-line span{
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: -.01em;
  font-size: 1.03em;
  line-height: inherit;
}

.siteHeader{
  position:relative;
  z-index:2;
  width:100%;
  background: transparent;
}
.siteHeader__inner{
  max-width:1120px;
  margin:0 auto;
  padding-left: clamp(12px, 3.2vw, 22px);
  padding-right: clamp(12px, 3.2vw, 22px);
  padding-bottom: 10px;
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(10px, 2.2vw, 18px));
  display:flex;
  align-items:center;
  justify-content:flex-start;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.siteHeader__inner::-webkit-scrollbar{display:none}
.siteHeader__title{
  margin:0;
  display:inline-flex;
  align-items:baseline;
  gap: 6px;
  white-space: nowrap;
  color: rgba(236,242,255,.96);
}
.siteHeader__en{
  font-family:var(--serif);
  font-weight:900;
  font-size: clamp(15px, 1.85vw, 20px);
  line-height: 1.05;
  letter-spacing:-.02em;
}
.siteHeader__zh{
  font-family:var(--sans);
  font-weight:800;
  font-size: clamp(12px, 1.45vw, 15px);
  line-height: 1.05;
  letter-spacing: .02em;
  /* optical alignment vs latin cap height */
  transform: translateY(calc(0.08em - 2px));
  opacity: .92;
}

.legalBar{
  width:100%;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
.legalBar__inner{
  padding: 10px 14px;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:flex-start;
  gap: 6px;
  color: rgba(214,224,246,.92);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.legalBar__copy{
  color: rgba(236,242,255,.92);
  font-weight: 760;
  letter-spacing: .01em;
  white-space: normal;
  max-width: 72ch;
}
.legalBar__contact{
  width: 100%;
  white-space: normal;
  max-width: 72ch;
}
.legalBar__beian{
  color: rgba(214,224,246,.92);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: .01em;
}
.legalBar__beian:hover{
  color: rgba(236,242,255,.96);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero::after{
  content:"";
  position:absolute; inset:-2px;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.16;
}

@media (max-width: 920px){
  .hero__frame{
    padding: 14px;
  }
  .siteHeader__inner{
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 10px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
  .legalBar__inner{
    align-items:center;
  }
}

@media (max-width: 520px){
  .hero{
    min-height: 100svh;
    min-height: 100dvh;
    --hero-lead-top: 15vh;
  }

  .hero__frame{
    padding: 12px;
    gap: 10px;
  }

  .siteHeader__inner{
    padding-left: 26px;
    padding-right: 14px;
    padding-bottom: 10px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 26px);
  }

  .siteHeader__title{
    align-items:center;
    gap: 8px;
    letter-spacing: .01em;
  }
  .siteHeader__en{
    font-size: clamp(16px, 4.6vw, 19px);
    line-height: 1.1;
  }
  .siteHeader__zh{
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.1;
    transform: translateY(0);
  }

  .hero__tagline{
    gap: clamp(24px, 6.2vh, 44px);
    padding-top: 6px;
  }

  .hero__tagline-line--lead{
    margin-top: 0;
    font-size: clamp(22px, 6.2vw, 30px);
    line-height: 1.26;
    letter-spacing: .02em;
  }

  .hero__tagline-line{
    font-size: clamp(16px, 4.6vw, 20px);
    letter-spacing: .015em;
    width: auto;
    max-width: 92vw;
    white-space: normal;
    text-wrap: balance;
    line-height: 1.42;
  }

  /* Mobile: keep the two bottom lines readable without horizontal scrolling */
  .hero__tagline-bottom{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20vh;
    bottom: 20dvh;
    width: min(92vw, 44ch);
    max-width: 92vw;
    overflow: visible;
  }
  .hero__tagline-bottom .hero__tagline-line{
    font-size: clamp(14px, 4.2vw, 18px);
  }
  .hero__tagline-bottom .hero__tagline-line:nth-child(2){
    font-size: clamp(13px, 3.9vw, 17px);
  }

  .legalBar__inner{
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    font-size: 11px;
  }
  .legalBar__contact{
    text-wrap: pretty;
  }
}

@media (max-height: 720px) and (max-width: 520px){
  .hero__tagline{
    gap: 12px;
  }
}

@media (max-height: 480px) and (orientation: landscape){
  .hero__frame{
    padding-top: calc(env(safe-area-inset-top, 0px) + 26px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .hero__tagline{
    gap: 10px;
  }

  .hero__tagline-line--lead{
    margin-top: 0;
    font-size: clamp(20px, 3.4vw, 28px);
    line-height: 1.22;
  }

  /* Prevent overlaps with footer on short landscape screens */
  .hero__tagline-bottom{
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 92vw;
    overflow: visible;
  }
  .hero__tagline-bottom .hero__tagline-line{
    width: auto;
    max-width: 92vw;
    white-space: normal;
  }

  .legalBar__inner{
    padding-top: 8px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
}

