@import "/fonts/lxgw/font.css";

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2");
}

:root {
  --page-bg: #0d0f0f;
  --surface: rgba(20, 23, 22, 0.78);
  --surface-hover: rgba(25, 29, 27, 0.92);
  --ink: #f5f2e9;
  --muted: #929792;
  --line: rgba(230, 237, 228, 0.17);
  --line-strong: rgba(169, 207, 157, 0.42);
  --accent: #a9dd9d;
  --accent-muted: #748b70;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Nunito", "PingFang SC", "Hiragino Sans GB", sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.site-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  background-color: var(--page-bg);
  background-image: url("/moon-grid-bg.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.site-header,
.site-footer {
  width: min(1380px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-image {
  width: 50px;
  height: 50px;
  overflow: hidden;
  border: 1px solid rgba(232, 239, 229, 0.24);
  border-radius: 50%;
  background: #161818;
  box-shadow: 0 0 0 7px rgba(224, 231, 221, 0.03);
}

.brand-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.13);
}

.brand-name,
h1,
.app-copy strong {
  font-family: "LXGW WenKai GB Screen", "Kaiti SC", STKaiti, serif;
}

.brand-name {
  font-size: 26px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.locale-picker,
.site-status,
.account-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 15, 15, 0.68);
}

.account-link {
  padding: 0 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.account-link:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.locale-picker {
  gap: 7px;
  padding: 0 10px;
  color: var(--muted);
}

.locale-picker svg {
  width: 16px;
  height: 16px;
}

.locale-picker > img {
  width: 16px;
  height: 16px;
  filter: invert(67%) sepia(7%) saturate(187%) hue-rotate(78deg) brightness(88%);
}

.locale-picker select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 700 12px/1 "Nunito", sans-serif;
}

.locale-picker option {
  background: #171918;
}

.site-status {
  gap: 8px;
  margin: 0;
  padding: 0 13px;
  border-color: rgba(169, 221, 157, 0.26);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(169, 221, 157, 0.5);
}

.site-main {
  position: relative;
  display: flex;
  width: min(900px, calc(100% - 48px));
  align-self: center;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(74px, 10vh, 118px) 0 clamp(96px, 12vh, 138px);
}

h1 {
  margin: 0 0 clamp(48px, 7vh, 72px);
  font-size: clamp(42px, 5.7vw, 70px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-align: center;
}

.greeting-brand {
  white-space: nowrap;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 0.92em;
  margin-left: 12px;
  background: var(--accent);
  vertical-align: -0.08em;
  animation: cursor-blink 1.15s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0.2;
  }
}

.app-list {
  display: grid;
  gap: 12px;
}

.app-card {
  display: grid;
  min-height: 112px;
  grid-template-columns: 12px 72px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background-color 180ms ease,
    transform 180ms ease;
}

a.app-card:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.app-card.is-coming {
  color: var(--muted);
}

.app-state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #858985;
}

.app-state-dot.is-live {
  background: var(--accent);
  box-shadow: 0 0 13px rgba(169, 221, 157, 0.32);
}

.app-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(169, 221, 157, 0.28);
  border-radius: 16px;
  color: var(--accent);
}

.is-coming .app-icon {
  border-color: var(--line);
  color: #b0b3af;
}

.app-icon svg {
  width: 31px;
  height: 31px;
}

.app-icon img {
  width: 31px;
  height: 31px;
  filter: invert(90%) sepia(16%) saturate(853%) hue-rotate(58deg) brightness(93%);
}

.is-coming .app-icon img {
  filter: invert(77%) sepia(4%) saturate(205%) hue-rotate(72deg) brightness(92%);
}

.app-copy {
  display: grid;
  gap: 6px;
}

.app-index {
  color: var(--accent-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.app-copy strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
}

.app-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  opacity: 0.74;
}

.app-open svg {
  width: 27px;
  height: 27px;
  transition: transform 180ms ease;
}

.app-open img {
  width: 27px;
  height: 27px;
  filter: invert(90%) sepia(16%) saturate(853%) hue-rotate(58deg) brightness(93%);
  transition: transform 180ms ease;
}

a.app-card:hover .app-open svg {
  transform: translateX(3px);
}

a.app-card:hover .app-open img {
  transform: translateX(3px);
}

.coming-badge {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b9bcb8;
  font-size: 11px;
}

.moon-mascot {
  position: absolute;
  right: -168px;
  bottom: 22px;
  width: clamp(138px, 13vw, 190px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.site-footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.filing-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.filing-info a {
  display: inline-flex;
  align-items: center;
}

.filing-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.police-filing {
  gap: 6px;
}

.police-filing img {
  width: 18px;
  height: 20px;
  object-fit: contain;
}

.filing-info a:hover {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .moon-mascot {
    right: -44px;
    bottom: 4px;
    width: 130px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 82px;
  }

  .brand-image {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 22px;
  }

  .site-status {
    display: none;
  }

  .site-main {
    width: calc(100% - 32px);
    padding: 72px 0 132px;
  }

  h1 {
    max-width: 9em;
    margin-right: auto;
    margin-bottom: 48px;
    margin-left: auto;
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.22;
  }

  .type-cursor {
    margin-left: 7px;
  }

  .app-card {
    min-height: 92px;
    grid-template-columns: 8px 52px 1fr auto;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .app-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  .app-icon svg {
    width: 25px;
    height: 25px;
  }

  .app-icon img {
    width: 25px;
    height: 25px;
  }

  .app-copy {
    gap: 3px;
  }

  .app-copy strong {
    font-size: 19px;
  }

  .app-index {
    font-size: 9px;
  }

  .app-open span {
    display: none;
  }

  .app-open svg {
    width: 23px;
    height: 23px;
  }

  .app-open img {
    width: 23px;
    height: 23px;
  }

  .coming-badge {
    padding: 5px 8px;
    font-size: 9px;
  }

  .moon-mascot {
    right: 4px;
    bottom: 14px;
    width: 104px;
  }

  .site-footer {
    min-height: 104px;
    padding: 18px 0;
    text-align: center;
  }

  .filing-info {
    flex-direction: column;
    gap: 8px;
  }

  .filing-divider {
    display: none;
  }
}

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

  .type-cursor {
    animation: none;
  }

  .app-card,
  .app-open svg {
    transition: none;
  }
}
