/* 首屏「白色导航条 + 圆角图片卡片」样式（参考 awesomic.com）。
   只在 <body> 带 hero-card 时生效：去掉这个 class 就回到原来的照片铺满首屏。
   导航：在顶部时是白色横条、深色文字；往下滑后和原来一样收拢成一条毛玻璃胶囊——
   白色横条随导航一起收起，毛玻璃底跟着内容收成胶囊；
   图片：四周留白的圆角卡片，往下滑时仍然会再缩小一点（hero-shrink.js 从卡片原本的圆角开始算）。 */

:is(.hero-card, .hero-fullscreen) {
  --card-radius: 32px;
}

.hero-card {
  --card-nav-h: 64px;
  --card-gap: 12px;
}

/* ---------- 导航条 ---------- */
.hero-card .header {
  height: var(--card-nav-h);
  background-color: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color var(--nav-move);
}
.hero-card .header.is-condensed { background-color: rgb(255 255 255 / 0%); }
/* 在顶部，胶囊底与后面的白色横条融为一体。 */
.hero-card .header:not(.is-condensed) .nav-inner {
  width: min(calc(100% - 160px), 1440px);
  height: var(--card-nav-h);
  margin-top: 0;
  padding: 0;
  box-shadow: none;
}
/* 收拢后：胶囊高度 = 按钮 + 上下各 6px；离顶部 6px，内容的垂直位置和在横条里时几乎一样，不会上下跳 */
.hero-card .header.is-condensed .nav-inner { height: 53px; margin-top: 6px; }
.hero-card .header.is-condensed .brand img { width: 68px; }
/* 胶囊和其中的内容共用一个盒子，收拢和反向展开时始终有背景。 */
.hero-card .header.is-ready .nav-inner {
  background-color: #fff;
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  transition:
    width var(--nav-move), height var(--nav-move), padding var(--nav-move), margin var(--nav-move),
    background-color var(--nav-move), box-shadow var(--nav-move);
}
.hero-card .header.is-ready.is-condensed .nav-inner { background-color: rgb(255 255 255 / 84%); }
.hero-card .header.is-ready .brand,
.hero-card .header.is-ready .brand img {
  transition: width var(--nav-move), padding var(--nav-move);
}
.hero-card .header.is-ready :is(.nav-links, .nav-actions) {
  transition: translate var(--nav-move), height var(--nav-move), padding var(--nav-move);
}
.hero-card .header :is(.nav-links, .nav-actions),
.hero-card .header:not(.is-condensed) :is(.nav-links, .nav-actions) {
  translate: none;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: #18181b;
}
/* 文字层级（参照 awesomic）：
   中间导航链接 13px / 500 / 近黑 #18181b，每项左右 14px 内边距；
   右边次要项（语言、手机上的博客）同字号同字重，但颜色浅一级 #3f3f46；
   主按钮「下载 APP」13px / 500 白字黑底；logo 高度约 24px，比文字略大一档。 */
.hero-card .header .nav-links { height: 40px; gap: 0; padding-inline: 0; font-size: 13px; font-weight: 500; line-height: 1.25; letter-spacing: 0; }
.hero-card .header .nav-links a { padding: 12px 14px; color: #18181b; transition: color .2s ease; }
.hero-card .header .nav-links a:hover { color: rgb(24 24 27 / 55%); }
.hero-card .header .brand img,
.hero-card .header:not(.is-condensed) .brand img { width: 76px; scale: 1; filter: none; }
.hero-card .header .brand { width: auto; height: 40px; }
.hero-card .header .language-picker summary { height: 40px; padding-inline: 8px; font-size: 13px; font-weight: 500; color: #3f3f46; }
.hero-card .header .language-picker summary:hover { color: #18181b; }
.hero-card .header .language-chevron img,
.hero-card .header:not(.is-condensed) .language-chevron img { filter: none; }
.hero-card .header .nav-blog { color: #3f3f46; font-weight: 500; }
.hero-card .header .nav-actions { gap: 12px; padding-right: 0; }

/* 「下载 APP」：黑色胶囊按钮，顶部一道细高光（和页面下方「现在就来体验 Midoo 吧」同一种交互：悬停只是稍微变亮，弹出二维码气泡） */
.hero-card .header .nav-actions .button-dark,
.hero-card .header:not(.is-condensed) .nav-actions .button-dark {
  height: 41px;
  min-width: 0;
  padding-inline: 16px;
  border: 0;
  border-radius: 999px;   /* 两端是半圆：收拢成胶囊后刚好贴着胶囊的圆头 */
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.hero-card .header .nav-actions .button-dark,
.hero-card .header:not(.is-condensed) .nav-actions .button-dark,
:is(.hero-card, .hero-fullscreen) .hero .prompt-submit,
:is(.hero-card, .hero-fullscreen) .prompt-flight .prompt-flight-action,
:is(.hero-card, .hero-fullscreen) .compare-option .button-primary {
  /* 纯黑平面按钮：去掉顶部高光、内侧光晕、外圈描边和投影的质感。
     首屏输入框飞进课程手机时的按钮副本也用同一个样子，飞的过程中不会变色 */
  background: #09090b;
  box-shadow: none;
  transition: background-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .hero-card .header .nav-actions .button-dark:hover,
  .hero-card .header:not(.is-condensed) .nav-actions .button-dark:hover,
  :is(.hero-card, .hero-fullscreen) .hero .prompt-submit:hover,
  :is(.hero-card, .hero-fullscreen) .compare-option .button-primary:hover { background: #252525; color: #fff; }
}
.hero-card .header :is(.brand, .nav-links a, summary, .button-dark):focus-visible { outline-color: #18181b; }

/* ---------- 图片卡片 ---------- */
:is(.hero-card, .hero-fullscreen) .hero .headline { font-weight: 700; }
:is(.hero-card, .hero-fullscreen) .hero .description { font-weight: 300; }
:is(.hero-card, .hero-fullscreen) :is(.hero .prompt-submit, .prompt-flight .prompt-flight-action) { border-color: transparent; }
.hero-card .hero-photos {
  inset: calc(var(--card-nav-h) + 8px) var(--card-gap) var(--card-gap);
  border-radius: var(--card-radius);
}
:is(.hero-card, .hero-fullscreen) .site-footer { border-radius: var(--card-radius) var(--card-radius) 0 0; }
.hero-card .scene { --hero-nav-clearance: calc(var(--card-nav-h) + 48px); }

@media (max-width: 880px) {
  .hero-card .header:not(.is-condensed) .nav-inner { width: calc(100% - 48px); }
  .hero-card .header .nav-links a { padding-inline: 9px; }
}

@media (min-width: 701px) and (max-width: 1000px) {
  /* 保持中间链接在两侧内容之间，收拢时也使用相同的网格。 */
  .hero-card .header.is-ready .nav-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 12px;
  }
  .hero-card .header.is-ready .nav-inner > .nav-links {
    justify-self: center;
    translate: none;
  }
}

@media (max-width: 700px) {
  :is(.hero-card, .hero-fullscreen) { --card-radius: 24px; }
  .hero-card { --card-nav-h: 56px; --card-gap: 8px; }
  .hero-card .header .nav-inner { grid-template-columns: auto minmax(0, 1fr); }
  .hero-card .header:not(.is-condensed) .nav-inner { width: calc(100% - 32px); }
  .hero-card .header.is-condensed .nav-inner { height: 42px; margin-top: 7px; }
  .hero-card .header.is-condensed .brand img { width: 68px; }
  .hero-card .header .brand img,
  .hero-card .header:not(.is-condensed) .brand img { width: 68px; }
  .hero-card .header .brand { height: 36px; }
  .hero-card .header .nav-actions { max-width: 100%; gap: 4px; }
  .hero-card .header .language-picker,
  .hero-card .header .language-label { min-width: 0; }
  .hero-card .header .language-chevron { flex-shrink: 0; }
  .hero-card .header .language-picker summary { height: 36px; padding-inline: 6px; font-size: 13px; }
  .hero-card .header .nav-actions .nav-blog { height: 36px; padding-inline: 6px; font-size: 13px; }
  .hero-card .header .nav-actions .button-dark,
  .hero-card .header:not(.is-condensed) .nav-actions .button-dark { height: 34px; padding-inline: 12px; border-radius: 999px; font-size: 12px; }
  .hero-card .scene { --hero-nav-clearance: calc(var(--card-nav-h) + 32px); }
}

@media (max-width: 360px) {
  .hero-card .header .nav-actions { gap: 2px; }
  .hero-card .header .nav-actions .nav-blog,
  .hero-card .header .language-picker summary { padding-inline: 4px; }
  .hero-card .header .nav-actions .button-dark,
  .hero-card .header:not(.is-condensed) .nav-actions .button-dark { padding-inline: 8px; }
}
