@font-face {
  font-family: "Funnel Display";
  src: url("/font/FunnelDisplay-LatinExt-Variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300 800;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Funnel Display";
  src: url("/font/FunnelDisplay-Latin-Variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300 800;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --site-blue: #0d0da8;
  --dialog-blue: #070769;
  --option-blue: rgba(13, 13, 168, 0.42);
  --text: #dedede;
  --soft-text: rgba(222, 222, 222, 0.8);
  --accent: #7a5cff;
  --accent-hover: #a855f7;
  --border: rgba(122, 92, 255, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--site-blue);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--site-blue);
  font-family: "Funnel Display", -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 1.8;
}

[lang="zh-Hans"] {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", Arial, sans-serif;
}

a {
  color: inherit;
}

.language-entry {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow-x: hidden;
  padding: clamp(20px, 4vw, 52px);
}

.language-entry__noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: url("/img/bg/noise120.gif") repeat;
  background-size: 180px 177px;
  opacity: 0.2;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}

.language-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  padding: clamp(26px, 4vw, 48px);
  /* border: 1px solid var(--border);
  background: var(--dialog-blue);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42); */
  text-align: center;
}

.language-panel__logo {
  display: flex;
  justify-content: center;
  margin: 0 auto clamp(28px, 4vw, 46px);
}

.language-panel__logo .main_logo {
  display: block;
  width: clamp(170px, 25vw, 260px);
  height: auto;
  fill: var(--text);
}

.language-panel__prompt {
  margin-bottom: clamp(22px, 3vw, 34px);
}

.language-panel__prompt h1 {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: none;
}

.language-panel__prompt p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin: 0;
  color: var(--soft-text);
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1.45;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.language-option {
  position: relative;
  display: grid;
  min-height: 96px;
  align-content: center;
  justify-items: center;
  padding: 24px 16px;
  border: 1px solid rgba(122, 92, 255, 0.38);
  background: var(--option-blue);
  text-decoration: none;
  transition: border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.is-recommended {
  border-color: var(--accent-hover);
  background: rgba(168, 85, 247, 0.16);
  outline: none;
}

.language-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent-hover);
}

.language-option__name {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.language-panel__note,
.placeholder-copy {
  margin: clamp(20px, 3vw, 30px) 0 0;
  color: var(--soft-text);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.45;
}

.language-panel--placeholder h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.placeholder-copy {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  font-size: 14px;
}

.compact-language-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.compact-language-options a,
.back-link {
  min-height: 44px;
  padding: 12px 18px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.compact-language-options a:hover,
.compact-language-options a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  border-color: var(--accent-hover);
  color: var(--dialog-blue);
  background: var(--accent-hover);
  outline: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 30px;
}

@media (max-width: 760px) {
  .language-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .language-option {
    min-height: 92px;
  }
}

@media (max-width: 460px) {
  .language-entry {
    align-items: start;
    padding: 16px;
  }

  .language-panel {
    padding: 28px 18px;
  }

  .language-panel__logo {
    margin-bottom: 28px;
  }

  .language-panel__logo .main_logo {
    width: 170px;
  }

  .language-options {
    grid-template-columns: 1fr;
  }

  .language-option {
    min-height: 72px;
    grid-template-columns: 1fr;
    align-items: center;
    align-content: center;
    justify-items: start;
    padding: 16px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-option {
    transition: none;
  }
}
