/* ==========================================================================
   Xiaomi About — static edition overrides
   No JavaScript. This file replaces the small runtime layer of the
   interactive build with native HTML/CSS behaviour.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page shell / motion
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.page-main {
  animation: none !important;
}

.reveal {
  opacity: 1 !important;
  transform: none !important;
}

html {
  scroll-padding-top: 108px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Keep the in-page "back to top" link visible without JS. */
.backtop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  text-decoration: none;
}

/* CSS-only "appear after scrolling" for the back-to-top link. */
@supports (animation-timeline: scroll()) {
  .backtop {
    animation: backtop-reveal linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 360px;
  }
}

@keyframes backtop-reveal {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   2. Native popovers: video / WeChat / mobile drawer
   -------------------------------------------------------------------------- */
.modal[popover]:not(:popover-open) {
  display: none;
}

.modal[popover] {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 28px;
  border: 0;
  background: rgba(10, 10, 10, 0.78);
  overflow: auto;
}

.modal[popover]:popover-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[popover]::backdrop {
  background: transparent;
}

.modal .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.modal .modal__dialog {
  position: relative;
  z-index: 1;
}

.modal[popover] .modal__dialog {
  animation: none;
}

.modal[popover] video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  background: #000;
}

.modal[popover] .qr-wrap img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.brand-hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Mobile drawer: pure CSS :target, no top-layer popover needed. */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 160;
  width: min(390px, 92vw);
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  transform: none;
}

.mobile-drawer:target {
  display: block;
}

.mobile-drawer .drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  background: rgba(0, 0, 0, 0.48);
}

.mobile-drawer .drawer-backdrop:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -4px;
}

.mobile-menu-btn,
.drawer-close {
  text-decoration: none;
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close,
.modal .modal-close {
  cursor: pointer;
}

.modal .modal-close {
  z-index: 2;
}

/* --------------------------------------------------------------------------
   3. Management team: static cards + native <details>
   -------------------------------------------------------------------------- */
.founder-card__body {
  display: block;
}

.founder-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.founder-card__meta h3 {
  margin: 0;
}

.founder-card__meta p {
  margin-top: 5px;
}

.founder-card__hint {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.founder-bio-details {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.founder-bio-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.04em;
  list-style: none;
  cursor: pointer;
}

.founder-bio-details > summary::-webkit-details-marker {
  display: none;
}

.founder-bio-details > summary::after {
  content: "＋";
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.founder-bio-details[open] > summary::after {
  content: "－";
}

.founder-bio-details > summary:hover {
  color: var(--orange-dark);
}

.founder-bio-details__body {
  padding: 12px 0 2px;
}

.founder-bio-details__body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.founder-bio-details__body p:last-child {
  margin-bottom: 0;
}

.founder-grid {
  align-items: start;
}

.founder-card:has(.founder-bio-details[open]) {
  transform: none;
}

/* --------------------------------------------------------------------------
   4. Contact directory: native <details>
   -------------------------------------------------------------------------- */
.contact-group > summary {
  list-style: none;
}

.contact-group > summary::-webkit-details-marker {
  display: none;
}

.contact-group__trigger {
  width: 100%;
  cursor: pointer;
}

.contact-group__trigger > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-group__trigger h3 {
  margin: 0;
}

.contact-group__trigger span {
  color: var(--muted-2);
  font-size: 11px;
}

.contact-group__trigger .icon {
  flex: none;
  transition: transform 0.22s ease;
}

.contact-group[open] > .contact-group__trigger .icon {
  color: var(--orange);
  transform: rotate(45deg);
}

.contact-group[open] > .contact-group__panel {
  display: block;
}

.contact-group__trigger:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Static form: let the browser handle required fields. */
.contact-form textarea {
  resize: vertical;
}

/* --------------------------------------------------------------------------
   5. News: static toolbar and newsletter note
   -------------------------------------------------------------------------- */
.news-toolbar__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.news-toolbar__label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--orange);
}

.news-letter__note {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  text-align: right;
}

.news-letter__note strong {
  color: var(--ink);
  font-weight: 500;
}

.news-letter__note a {
  color: var(--orange);
}

.news-static-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   6. Article pages
   -------------------------------------------------------------------------- */
.article-actions {
  flex-wrap: wrap;
}

.article-static-note {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.7;
}

.article-next .article-next__label {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.16em;
}

/* --------------------------------------------------------------------------
   7. Search page / full index
   -------------------------------------------------------------------------- */
.static-search-page {
  padding: 66px 0 96px;
}

.static-search-head {
  max-width: 760px;
  margin: 0 auto 46px;
  text-align: center;
}

.static-search-head .eyebrow {
  justify-content: center;
}

.static-search-head h1 {
  margin: 14px 0 12px;
  color: var(--ink);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.14;
}

.static-search-head > p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.search-big {
  display: flex;
  max-width: 620px;
  margin: 28px auto 0;
  border: 1px solid var(--line);
  background: #fff;
}

.search-big input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.search-big button {
  flex: none;
  height: 48px;
  padding: 0 24px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.search-big button:hover {
  background: var(--orange);
}

.static-search-tip {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11px;
}

.static-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
  margin-top: 12px;
}

.static-index-block {
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.static-index-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.static-index-block__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

.static-index-block__head span {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.static-index-links {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.static-index-links li {
  margin: 0;
  padding: 0;
}

.static-index-links li + li {
  border-top: 1px solid #f4f4f4;
}

.static-index-links a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.static-index-links strong {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-weight: 400;
}

.static-index-links a:hover {
  color: var(--orange);
}

.static-index-links a span {
  flex: none;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.static-index-note {
  margin-top: 30px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   8. Small static helpers
   -------------------------------------------------------------------------- */
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--orange);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.linklike:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #dcdcdc;
  border-radius: 50%;
  background: transparent;
  color: #8d8d8d;
  font-size: 11px;
  cursor: pointer;
}

.social-icon-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.about-nav-list a.is-active {
  color: var(--orange);
}

.about-nav-list a.is-active::after {
  transform: scaleX(1);
}

.news-card a:focus-visible,
.founder-bio-details > summary:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   9. Responsive adjustments for static additions
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .static-index-grid {
    grid-template-columns: 1fr;
  }

  .news-letter {
    align-items: flex-start;
  }

  .news-letter__note {
    text-align: left;
  }
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 96px;
  }

  .static-search-page {
    padding: 42px 0 70px;
  }

  .static-search-head {
    margin-bottom: 34px;
    text-align: left;
  }

  .static-search-head .eyebrow {
    justify-content: flex-start;
  }

  .search-big {
    margin-left: 0;
  }

  .static-index-block {
    padding: 22px 20px;
  }

  .news-letter {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }

  .news-letter__note {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .modal[popover] {
    padding: 14px;
  }

  .modal[popover] .qr-wrap img {
    width: 180px;
    height: 180px;
  }

  .founder-card__hint {
    width: 24px;
    height: 24px;
  }

  .static-search-head h1 {
    font-size: 32px;
  }

  .search-big {
    flex-direction: column;
  }

  .search-big input {
    border-bottom: 1px solid var(--line);
  }

  .search-big button {
    width: 100%;
  }

  .article-static-note {
    width: 100%;
  }
}
