/* Homepage brand introduction. The two masks share the same diagonal edge. */
.brand-opening {
  --brand-opening-ready: 1;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #f5f9ff;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}
.brand-opening::backdrop { background: transparent; }
html.brand-opening-active,
html.brand-opening-active body { overflow: hidden; }
.brand-opening__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #03070d;
}
.brand-opening__panel--top {
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 60%);
  animation: brand-opening-top 1.2s cubic-bezier(.77, 0, .175, 1) 2.8s both;
}
.brand-opening__panel--bottom {
  clip-path: polygon(0 60%, 100% 40%, 100% 100%, 0 100%);
  animation: brand-opening-bottom 1.2s cubic-bezier(.77, 0, .175, 1) 2.8s both;
}
.brand-opening__wordmark {
  position: relative;
  text-align: center;
  animation: brand-opening-zoom 4s ease-in-out both;
}
.brand-opening__title {
  display: block;
  padding-left: .16em;
  background: linear-gradient(180deg, #fff 12%, #d9e8f6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: clamp(30px, 8vw, 120px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .16em;
  white-space: nowrap;
  filter: drop-shadow(0 8px 28px #92caff26);
}
.brand-opening__subtitle {
  position: absolute;
  top: 100%;
  left: 50%;
  width: max-content;
  margin-top: 18px;
  color: #b5c8dc;
  font-size: clamp(10px, 1.2vw, 17px);
  font-weight: 400;
  letter-spacing: .28em;
  transform: translateX(-50%);
  animation: brand-opening-subtitle 4s ease-in-out both;
}
.brand-opening__slash {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.brand-opening__slash line {
  stroke: #f4fbff;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: brand-opening-slash .8s ease-in-out 2.4s both;
}
html.brand-opening-active body > :is(site-header, main, footer, site-tools) {
  opacity: 0;
}
html.brand-opening-revealed body > :is(site-header, main, footer, site-tools) {
  animation: brand-opening-page 1s ease-out both;
}
@keyframes brand-opening-top {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-105vh); }
}
@keyframes brand-opening-bottom {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(105vh); }
}
@keyframes brand-opening-zoom {
  0% { opacity: 0; transform: scale(.9); }
  10%, 30% { opacity: 1; transform: scale(1); }
  70% { opacity: .95; transform: scale(2.2); }
  100% { opacity: .8; transform: scale(2.4); }
}
@keyframes brand-opening-subtitle {
  0% { opacity: 0; }
  10%, 30% { opacity: 1; }
  45%, 100% { opacity: 0; }
}
@keyframes brand-opening-slash {
  0% { stroke-dashoffset: 1; stroke-width: 1px; opacity: 0; }
  30% { opacity: 1; }
  50% { stroke-width: 8px; opacity: 1; }
  100% { stroke-dashoffset: 0; stroke-width: 1px; opacity: 0; }
}
@keyframes brand-opening-page {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Scale only the hero: transforming the page would change fixed tool positions. */
html.brand-opening-revealed .particle-stage {
  animation: brand-opening-hero 1s ease-out both;
}
@keyframes brand-opening-hero {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-opening { display: none; }
  html.brand-opening-active body > :is(site-header, main, footer, site-tools) { opacity: 1; }
  html.brand-opening-revealed body > :is(site-header, main, footer, site-tools),
  html.brand-opening-revealed .particle-stage { animation: none; }
}
