/* Figma 155:18370, 1920 × 1080. Keep the site's existing system font.
   This file is loaded only by the Chinese homepage. */
.home-figma-hero .header::before { content: none; }
.home-figma-hero .header {
  -webkit-backdrop-filter: blur(calc(14.3 * var(--u)));
  backdrop-filter: blur(calc(14.3 * var(--u)));
  /* 导航条的高度单独缩：小屏上比字号缩得多，导航更扁；字号仍按 --u，大小不变。1920×1080 时和设计稿一致 */
  --nav-row-u: max(.68px, calc(.35px + .65 * var(--layout-k)));
}

.home-figma-hero .nav-inner { padding-top: calc(27 * var(--u)); }

.home-figma-hero .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(127 * var(--u));
  height: calc(58 * var(--nav-row-u));
}

.home-figma-hero .brand img {
  width: calc(118.902 * var(--u));
  height: auto;
  aspect-ratio: 118.902 / 37.9746;
}

.home-figma-hero .nav-links {
  height: calc(58 * var(--nav-row-u));
  padding-inline: calc(36 * var(--u));
  border-radius: calc(30 * var(--u));
  background: rgb(255 255 255 / 30%);
  color: #000;
  translate: calc(-3.5 * var(--u)) 0;
}

.home-figma-hero .nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  padding-right: calc(5 * var(--u));
  border-radius: calc(56 * var(--u));
  background: rgb(255 255 255 / 30%);
  pointer-events: auto;
  translate: calc(2 * var(--u)) 0;
}

.home-figma-hero .nav-actions .button-dark {
  min-width: calc(128 * var(--u));
  height: calc(48 * var(--nav-row-u));
  min-height: 0;
  padding-inline: 0;
  font-size: calc(16 * var(--u));
  font-weight: 900;
  line-height: calc(24 * var(--u));
}

.home-figma-hero .language-picker { position: relative; }

.home-figma-hero .language-picker summary {
  display: flex;
  align-items: center;
  gap: calc(4 * var(--u));
  height: calc(58 * var(--nav-row-u));
  padding-inline: calc(28 * var(--u));
  border-radius: 999px;
  font-size: calc(16 * var(--u));
  font-weight: 500;
  line-height: calc(24 * var(--u));
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.home-figma-hero .language-picker summary::-webkit-details-marker { display: none; }
.home-figma-hero .language-picker summary:hover { background: rgb(255 255 255 / 32%); }

.home-figma-hero .language-flag {
  position: relative;
  flex: 0 0 calc(24 * var(--u));
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  overflow: hidden;
}

.home-figma-hero .language-flag img {
  position: absolute;
  inset: 0;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.home-figma-hero .language-chevron {
  display: grid;
  place-items: center;
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  margin-left: calc(2 * var(--u));
  mask: url("data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgc3R5bGU9ImRpc3BsYXk6IGJsb2NrOyIgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTAgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJjbGlwMF8yMDg1XzM5MTI2MSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik0xMCAwSDBWMTBIMTBWMFoiIGZpbGw9ImJsYWNrIi8+CjwvZz4KPC9zdmc+Cg==") center / contain no-repeat;
}

.home-figma-hero .language-chevron img {
  width: calc(9.575 * var(--u));
  height: auto;
}

.home-figma-hero .language-picker[open] .language-chevron { rotate: 180deg; }

.home-figma-hero .language-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  max-height: max(0px, calc(100dvh - var(--language-menu-top, var(--card-nav-h, 64px)) - 8px));
  overflow: clip;
  padding: 6px;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(0 0 0 / 8%);
  font-size: 14px;
}

.home-figma-hero .language-options-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgb(24 32 46 / 30%) transparent;
}

.home-figma-hero .language-options a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
}

.home-figma-hero .language-options a:is(:hover, [aria-current="page"]) { background: #f1f5ff; }

.home-figma-hero .scene {
  grid-template-rows: minmax(var(--hero-nav-clearance), 1fr) auto minmax(var(--hero-nav-clearance), 1fr);
}

.home-figma-hero .copy {
  width: min(calc(100% - 32px), calc(776 * var(--u)));
  padding: 0;
  translate: 0 calc(-.5 * var(--u));
}

.home-figma-hero .headline {
  width: 100%;
  font-size: calc(58 * var(--u));
  line-height: calc(74 * var(--u));
}

.home-figma-hero .description {
  width: 100%;
  min-height: calc(32 * var(--u));
}

.home-figma-hero .prompt-entry {
  min-height: calc(156 * var(--u));
  gap: calc(32 * var(--u));
  padding: calc(20 * var(--u) - 1px);
  border-radius: calc(32 * var(--u));
}

.home-figma-hero .prompt-line {
  padding-block: calc(6 * var(--u));
  font-size: calc(20 * var(--u));
  line-height: calc(30 * var(--u));
  letter-spacing: calc(-.086 * var(--u));
}

.home-figma-hero .prompt-caret {
  /* 光标粗一点，和 500 字重的文字笔画粗细均衡 */
  width: max(2.5px, calc(3 * var(--u)));
  height: calc(20 * var(--u));
}

.home-figma-hero .prompt-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: calc(42 * var(--u));
  padding: calc(11 * var(--u) - 1px) calc(12 * var(--u) - 1px) calc(11 * var(--u) - 1px) calc(20 * var(--u) - 1px);
  border: 1px solid #7f7c7c;
  border-radius: calc(40 * var(--u));
  aspect-ratio: auto;
  background: linear-gradient(112.2413deg, #3c3c3c 1.6152%, #000 72.335%);
  color: #fff;
  font-size: calc(16 * var(--u));
  font-weight: 600;
  line-height: calc(20 * var(--u));
  white-space: nowrap;
}

.home-figma-hero .prompt-submit:hover { background: #252525; }
.home-figma-hero .prompt-submit img { width: calc(20 * var(--u)); height: auto; }

/* Keep the photographs full-bleed while the foreground follows the page grid. */
.home-photo-hero .hero {
  background: #171b23;
}

.home-photo-hero .hero-photos {
  position: absolute;
  inset: 0;
  isolation: isolate;
  pointer-events: none;
}

.home-photo-hero .hero-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

/* Hold the outgoing photo underneath until the next photo is opaque. */
.home-photo-hero .hero-photos .is-previous { opacity: 1; }
.home-photo-hero .hero-photos .is-current { z-index: 1; opacity: 1; }

.home-photo-hero .hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgb(11 14 22 / 53%), transparent 76%),
    linear-gradient(180deg, rgb(8 12 20 / 65%), rgb(8 12 20 / 14%) 24%, rgb(8 12 20 / 14%) 71%, rgb(8 12 20 / 44%));
}

.home-photo-hero .scene { z-index: 2; }

.home-photo-hero .headline {
  color: #fff;
  text-shadow: 0 2px 24px rgb(0 0 0 / 45%);
}

.home-photo-hero .headline-topic {
  background-image: none;
  color: var(--hero-topic-color);
}

.home-photo-hero .topic-travel { --hero-topic-color: #bee4ff; }
.home-photo-hero .topic-interview { --hero-topic-color: #efd8ff; }
.home-photo-hero .topic-meeting { --hero-topic-color: #c2f6e9; }
.home-photo-hero .topic-exam { --hero-topic-color: #ffe3b7; }

.home-photo-hero .headline-topics:focus-visible {
  outline-color: #fff;
  border-radius: .12em;
}

.home-photo-hero .gallery-trigger { cursor: auto; }

.home-photo-hero .description {
  color: #fff;
  text-shadow: 0 1px 12px rgb(0 0 0 / 55%);
}

.home-photo-hero .prompt-entry {
  --hero-glass-alpha: .95;
  box-shadow: 0 16px 56px rgb(0 0 0 / 20%);
}

.home-photo-hero #prompt-text { color: #18202e; }

.home-photo-hero .header:not(.is-condensed) { -webkit-backdrop-filter: none; backdrop-filter: none; }

.home-photo-hero .header:not(.is-condensed) .brand img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 5px rgb(0 0 0 / 35%));
}

.home-photo-hero .header:not(.is-condensed) :is(.nav-links, .nav-actions) {
  background: rgb(18 22 30 / 46%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  color: #fff;
}

.home-photo-hero .header:not(.is-condensed) .nav-links a:hover { color: #bee4ff; }
.home-photo-hero .header:not(.is-condensed) .language-chevron img { filter: invert(1); }
.home-photo-hero .header:not(.is-condensed) .language-options { color: #18202e; }
.home-photo-hero .header:not(.is-condensed) .button-dark { background: #fff; color: #18202e; }
@media (hover: hover) and (pointer: fine) {
  .home-photo-hero .header:not(.is-condensed) .button-dark:hover { background: #e9e9ea; }
}
.home-photo-hero .header:not(.is-condensed) :is(.brand, .nav-links a, summary, .button-dark):focus-visible {
  outline-color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .home-photo-hero .hero-photos .is-current { transition: opacity .72s ease-in-out; }
  html.midoo-intro:not(.is-hero-in) .hero-photos { opacity: 0; }
  html.midoo-intro.is-hero-in .hero-photos { animation: intro-fade .65s ease both; }
}

@media (max-width: 700px) {
  .home-photo-hero .hero-photos img { object-position: var(--hero-photo-focus, 50%) center; }
}

@media (forced-colors: active) {
  .home-photo-hero .headline-topic { color: ButtonText; }
}

@media (min-width: 881px) and (max-width: 1100px) {
  .home-figma-hero .nav-inner { width: calc(100% - 64px); }
}

@media (max-width: 880px) {
  .home-figma-hero .nav-inner {
    width: min(calc(100% - 32px), 760px);
    padding-top: 16px;
  }

  .home-figma-hero .brand { width: auto; height: 40px; }
  .home-figma-hero .brand img { width: clamp(66px, 12vw, 88px); }
  .home-figma-hero .nav-links { height: 40px; padding-inline: 16px; gap: 18px; translate: none; }
  .home-figma-hero .language-picker summary { height: 40px; padding-inline: 12px; font-size: 13px; }
  .home-figma-hero .language-flag { flex-basis: 20px; width: 20px; height: 20px; }
  .home-figma-hero .language-flag img { width: 20px; height: 20px; }
  .home-figma-hero .language-chevron { width: 10px; height: 10px; }
  .home-figma-hero .language-chevron img { width: 9.575px; }
  .home-figma-hero .nav-actions { padding-right: 4px; translate: none; }
  .home-figma-hero .nav-actions .button-dark { min-width: 0; height: 32px; padding-inline: 16px; font-size: 13px; }
  .home-figma-hero .copy { width: min(calc(100% - 32px), 590px); }
  .home-figma-hero .headline { font-size: clamp(29px, 7.5vw, 43px); line-height: 1.28; }
  .home-figma-hero .description { width: min(100%, 375px); min-height: 0; }
  .home-figma-hero .prompt-entry { min-height: 112px; padding: 14px; border-radius: 24px; gap: 8px; }
  .home-figma-hero .prompt-line { padding-block: 2px; font-size: clamp(13px, 3.3vw, 16px); line-height: 1.5; }
  .home-figma-hero .prompt-caret { width: 2.5px; height: 1em; }
  .home-figma-hero .prompt-submit { min-height: 36px; padding: 7px 10px 7px 14px; font-size: 13px; line-height: 20px; }
  .home-figma-hero .prompt-submit img { width: 18px; }
}

@media (max-width: 700px) {
  /* 手机：导航只留一行——左边 Logo，右边「语言 + 下载 APP」胶囊。
     中间那排链接放不下，隐藏；「博客」放进语言下拉菜单的第一项（lang-switch.js 加进去）。 */
  .home-figma-hero .header { height: 72px; }
  .home-figma-hero .scene { --hero-nav-clearance: 80px; }
  .home-figma-hero .nav-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .home-figma-hero .brand { grid-row: 1; grid-column: 1; }
  .home-figma-hero .nav-actions { grid-row: 1; grid-column: 2; }
  .home-figma-hero .nav-links { display: none; }
  .home-figma-hero .language-picker summary { padding-inline: 10px; }
  .home-figma-hero .nav-actions .button-dark { padding-inline: 12px; font-size: 12px; }
  .home-figma-hero .language-options { left: auto; right: 0; }
}

@media (max-width: 360px) {
  .home-figma-hero .nav-inner { width: calc(100% - 24px); gap: 4px; }
  .home-figma-hero .language-picker summary { padding-inline: 8px; }
  .home-figma-hero .nav-actions .button-dark { padding-inline: 10px; }
}

/* 往下滑时：照片（连同上面的暗色遮罩）缩成圆角卡片，再随页面往上移走。
   缩放和圆角由 hero-shrink.js 按滚动距离写入；这里只负责把它们放在同一层。 */
.home-photo-hero .hero { background: transparent; }
.home-photo-hero .hero-photos {
  overflow: hidden;
  background: #171b23;
  transform-origin: 50% 100%;
  will-change: scale;
}
.home-photo-hero .hero::after { content: none; }
.home-photo-hero .hero-photos::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgb(11 14 22 / 53%), transparent 76%),
    linear-gradient(180deg, rgb(8 12 20 / 65%), rgb(8 12 20 / 14%) 24%, rgb(8 12 20 / 14%) 71%, rgb(8 12 20 / 44%));
}

/* 首屏输入框：磨砂玻璃。背后照片的颜色和光透出来，轮廓完全糊掉。
   想更实：调高 --glass-top / --glass-bottom（最多 1）；想更通透：调低。 */
.home-photo-hero .prompt-entry {
  --glass-top: .86;
  --glass-bottom: .68;
  border-color: rgb(255 255 255 / 75%);
  background: linear-gradient(135deg, rgb(255 255 255 / var(--glass-top)), rgb(255 255 255 / var(--glass-bottom)));
  -webkit-backdrop-filter: blur(44px) saturate(2) brightness(1.45);
  backdrop-filter: blur(44px) saturate(2) brightness(1.45);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 85%),
    0 2px 6px rgb(0 0 0 / 6%),
    0 18px 60px rgb(0 0 0 / 22%);
}
/* 正在输入时，输入框保持完全不透明（原来作用在外层 .prompt 上的同一条规则） */
.home-photo-hero .prompt-entry:focus-within { opacity: 1 !important; }

/* 层级减轻：顶部导航和首屏文字的字重、不透明度往下收，照片成为主角 */
/* 导航：常规字重，文字 86% 白；胶囊底从深色半透明改成浅色磨砂 */
.home-photo-hero .header :is(.nav-links, .language-picker summary) { font-weight: 400; }
.home-photo-hero .header .nav-actions .button-dark { font-weight: 600; }
.home-photo-hero .header:not(.is-condensed) :is(.nav-links, .nav-actions) {
  background: rgb(255 255 255 / 10%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  color: rgb(255 255 255 / 86%);
}
/* 首屏文字：标题中等字重、阴影更淡；副标题 80% 白；输入框里的示例文字常规字重、更浅 */
.home-photo-hero .headline {
  font-weight: 500;
  text-shadow: 0 1px 20px rgb(0 0 0 / 30%);
}
.home-photo-hero .description {
  color: rgb(255 255 255 / 80%);
  text-shadow: 0 1px 10px rgb(0 0 0 / 35%);
}
.home-photo-hero .prompt-line { font-weight: 400; }
.home-photo-hero #prompt-text { color: rgb(24 32 46 / 62%); }
.home-photo-hero .prompt-submit { font-weight: 500; }

/* 手机：右边胶囊里放「博客 · 当前语言 ⌄ · 下载 APP」（「博客」由 lang-switch.js 从导航里复制过来）；电脑上不显示 */
.home-figma-hero .nav-actions .nav-blog { display: none; }
@media (max-width: 700px) {
  .home-figma-hero .nav-actions .nav-blog {
    display: flex;
    align-items: center;
    height: 40px;
    padding-inline: 14px 4px;
    font-size: 13px;
    white-space: nowrap;
  }
  .home-figma-hero .language-picker summary { padding-inline: 10px; }
  .home-figma-hero .language-label {
    display: block;
    max-width: 5.5em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 360px) {
  .home-figma-hero .nav-actions .nav-blog { padding-inline: 10px 2px; }
  .home-figma-hero .language-picker summary { padding-inline: 8px; }
}
