/*
 * 随造公司站页头、页脚、按钮与全站底色（方案 R）。
 * 单一来源在公司站 corp/chrome-r.css；改后复制到 sepzok-web/src/app/chrome-r.css（测试断言两份逐字节相同）。
 * 只改外观，不改页头页脚的文字、链接与 DOM 结构。
 * 加载顺序：styles.css 之后。
 */

:root {
  --bg: #f3f6fb;
  --ink: #0f172a;
  --muted: #5b6b86;
  --line: #d5deee;
  --soft: #f3f6fb;
  --accent: #1e40af;
  --accent-deep: #1e3a8a;
  --accent-soft: #dbeafe;
  --r-blue: #3b82f6;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --header-h: 72px;
}

body {
  background:
    radial-gradient(1000px 640px at 50% 0%, rgba(59, 130, 246, 0.22), transparent 70%),
    radial-gradient(700px 520px at 0% 70%, rgba(147, 197, 253, 0.32), transparent 70%),
    var(--bg);
  background-repeat: no-repeat, no-repeat, repeat;
}

/* —— 页头：悬浮胶囊。占位固定 72px（首页长卷 home-r.js 依赖此值） —— */
.site-header,
.site-header:has(.brand.is-playing) {
  position: sticky;
  top: var(--safe-top, env(safe-area-inset-top, 0px));
  z-index: 40;
  box-sizing: border-box;
  padding-top: var(--safe-top, env(safe-area-inset-top, 0px));
  min-height: calc(var(--header-h) + var(--safe-top, env(safe-area-inset-top, 0px)));
  display: flow-root;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  overflow: visible;
}

/* 毛玻璃画在 ::before 上，不让 blur 成为 .brand 的祖先裁剪容器（morph 要画到槽外） */
.site-header-inner {
  position: relative;
  isolation: isolate;
  width: min(1140px, 100% - 24px);
  min-height: 48px;
  margin: 12px auto 0;
  padding: 6px 10px 6px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: visible;
}

.site-header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: rgba(243, 246, 251, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(30, 64, 175, 0.08);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  pointer-events: none;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  font-size: 14px;
  min-width: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.nav a:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
  font-weight: 600;
}

/* —— 语言菜单 —— */
.lang-menu {
  position: relative;
  flex: none;
}

.lang-menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.lang-menu-btn:hover {
  background: #fff;
  color: var(--accent);
}

.lang-menu-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.lang-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  min-width: 168px;
  padding: 6px;
  border: 1px solid #fff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px -16px rgba(30, 64, 175, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lang-menu.is-open .lang-menu-panel {
  display: grid;
}

.lang-menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.lang-menu-panel a:hover {
  background: rgba(59, 130, 246, 0.1);
}

.lang-menu-panel a[aria-current="true"] {
  font-weight: 600;
  color: var(--accent);
}

.lang-menu-panel a[aria-current="true"]::after {
  content: "✓";
}

/* —— 页头登录入口：与导航同一胶囊形状，主色文字；导航在窄屏横向滚动，登录不被挤掉 —— */
.header-login {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-login:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-deep);
}

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

/* —— 移动端菜单按钮（≤599px）：无边框，两道细杠，展开成 × —— */
.menu-btn {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn:hover,
.menu-btn:active,
.menu-btn:focus-visible,
.menu-btn[aria-expanded="true"] {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-btn-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.menu-btn-bars::before,
.menu-btn-bars::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1.75px;
  margin-top: -0.875px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 160ms ease;
}

.menu-btn-bars::before {
  transform: translateY(-3.875px);
}

.menu-btn-bars::after {
  transform: translateY(3.875px);
}

.menu-btn[aria-expanded="true"] .menu-btn-bars::before {
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-btn-bars::after {
  transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .menu-btn-bars::before,
  .menu-btn-bars::after {
    transition: none;
  }
}

/* 语言分段只在移动端菜单里出现；桌面仍用 .lang-menu */
.nav-lang {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px -6px 0;
  padding: 10px 12px 8px;
  border-top: 1px solid rgba(91, 107, 134, 0.28);
}

.nav-lang-label {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-lang-seg {
  display: flex;
  flex: 1 1 auto;
  max-width: 196px;
  height: 36px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.nav .nav-lang-seg a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 30px;
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.nav .nav-lang-seg a:hover {
  background: transparent;
  color: var(--ink);
}

.nav .nav-lang-seg a[aria-current="true"],
.nav .nav-lang-seg a[aria-current="true"]:hover {
  background: #fff;
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 14px rgba(30, 64, 175, 0.14);
}

/* —— 按钮（与首页 .rbtn 同一视觉） —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #4b8dfa, #2f6fe0);
  color: #fff;
  box-shadow: 0 10px 26px -6px rgba(59, 130, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #5a97fb, #3a7aea);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border-color: #c3d3ec;
}

.btn-ghost:hover {
  background: #fff;
  color: var(--accent);
  border-color: #9db7e6;
}

/* —— 页面主体：透明底，让冰蓝背景透出 —— */
.page-band {
  background: transparent;
}

/* —— 页脚：浅色玻璃圆角卡 —— */
.site-footer {
  margin: 56px auto 16px;
  width: min(1180px, 100% - 24px);
  padding: 40px 36px 28px;
  border-radius: 32px;
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 60px -34px rgba(30, 64, 175, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
}

.footer-grid {
  width: auto;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
}

.footer-blurb,
.footer-entity-addr,
.footer-entity-name-en {
  color: var(--muted);
}

.footer-blurb {
  margin: 8px 0 0;
  max-width: 34ch;
  font-size: 0.95rem;
}

.footer-entity-name {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
}

.footer-entity-name-en {
  margin: 0 0 8px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.footer-entity-addr {
  margin: 0;
  max-width: 36ch;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-entity-country {
  white-space: nowrap;
}

.footer-col h3 {
  margin: 0 0 12px;
  color: #1e40af;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--r-blue);
}

.footer-bottom {
  width: auto;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.footer-beian {
  color: var(--muted);
  text-decoration: none;
}

.footer-beian:hover {
  color: var(--r-blue);
}

@media (max-width: 560px) {
  .site-footer {
    padding: 28px 22px 22px;
    border-radius: 24px;
  }
}

/* —— 移动端：页头仍单行；链接过多时横向滚动，不隐藏、不换行 —— */
@media (max-width: 899px) {
  .site-header-inner {
    gap: 8px;
    padding: 6px 6px 6px 12px;
  }

  .brand {
    gap: 8px;
  }

  .header-end {
    gap: 6px;
    flex: 1 1 auto;
  }

  .nav {
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 13px;
  }

  .lang-menu-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .header-login {
    min-height: 34px;
    padding: 0 9px;
    font-size: 13px;
  }
}

@media (min-width: 600px) {
  .menu-btn {
    display: none;
  }
}

@media (max-width: 599px) {
  .site-header-inner {
    gap: 8px;
    padding: 10px 12px 10px 14px;
  }

  .header-end {
    gap: 6px;
    flex: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 3;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: min(280px, calc(100vw - 24px));
    max-height: none;
    overflow: visible;
    padding: 6px;
    border: 1px solid #fff;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px -16px rgba(30, 64, 175, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .site-header.is-menu-open .nav {
    display: flex;
  }

  .nav > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    font-size: 16px;
    border-radius: 12px;
    white-space: nowrap;
  }

  .header-login {
    min-height: 40px;
    padding: 0 10px;
    font-size: 14px;
    flex: none;
    white-space: nowrap;
  }

  .lang-menu {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .site-header.is-menu-open .nav .nav-lang {
    display: flex;
  }
}

@media (min-width: 600px) {
  .nav-lang,
  .site-header.is-menu-open .nav .nav-lang {
    display: none;
  }
}
