/* 译百分 · 全站视觉（OpenAI 式留白 + 克制动效）
   不改业务逻辑，只增强呈现；各模块内联样式仍可并存。 */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Syne:wght@600;700;800&display=swap");

:root {
  --yb-bg: #f4f5f3;
  --yb-bg-deep: #e8ebe6;
  --yb-surface: #ffffff;
  --yb-ink: #111413;
  --yb-muted: #5c6560;
  --yb-line: rgba(17, 20, 19, 0.08);
  --yb-accent: #0f766e;
  --yb-accent-soft: #d8f3ef;
  --yb-accent-hover: #0d9488;
  --yb-danger: #b42318;
  --yb-ok: #067647;
  --yb-warn: #b54708;
  --yb-radius: 16px;
  --yb-radius-sm: 12px;
  --yb-shadow: 0 1px 2px rgba(17, 20, 19, 0.04), 0 12px 32px rgba(17, 20, 19, 0.06);
  --yb-shadow-hover: 0 4px 12px rgba(17, 20, 19, 0.06), 0 20px 48px rgba(15, 118, 110, 0.12);
  --yb-font: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --yb-display: "Syne", "Manrope", "PingFang SC", sans-serif;
  --brand: var(--yb-accent);
  --bg: var(--yb-bg);
  --card: var(--yb-surface);
  --text: var(--yb-ink);
  --muted: var(--yb-muted);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--yb-font);
  color: var(--yb-ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(15, 118, 110, 0.10), transparent 55%),
    radial-gradient(900px 500px at 92% 8%, rgba(17, 20, 19, 0.05), transparent 50%),
    linear-gradient(180deg, #f7f8f6 0%, var(--yb-bg) 40%, var(--yb-bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--yb-accent);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(244, 245, 243, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--yb-line);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--yb-line), 0 4px 14px rgba(15, 118, 110, 0.14);
}

.brand-logo video,
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--yb-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--yb-ink);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--yb-muted);
  font-weight: 500;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--yb-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--yb-ink);
  background: rgba(17, 20, 19, 0.05);
}

.site-nav a.nav-cta {
  color: #fff;
  background: var(--yb-accent);
}

.site-nav a.nav-cta:hover {
  background: var(--yb-accent-hover);
  color: #fff;
}

.nav-logout-form {
  display: inline;
  margin: 0;
}

.nav-logout-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--yb-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-logout-btn:hover {
  color: var(--yb-ink);
  background: rgba(17, 20, 19, 0.05);
}

/* —— 登录 / 注册 —— */
.yb-auth {
  display: flex;
  justify-content: center;
  padding: 12px 0 28px;
}

.yb-auth__card {
  width: min(420px, 100%);
  background: var(--yb-surface);
  border: 1px solid var(--yb-line);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: var(--yb-shadow-hover);
}

.yb-auth__brand {
  text-align: center;
  margin-bottom: 22px;
}

.yb-auth__logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 28%;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--yb-line), 0 10px 28px rgba(15, 118, 110, 0.16);
}

.yb-auth__logo video,
.yb-auth__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yb-auth__brand h1 {
  font-family: var(--yb-display);
  font-size: 1.7rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.yb-auth__brand p {
  margin: 0;
  color: var(--yb-muted);
  font-size: 0.92rem;
}

.yb-auth__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yb-field__label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--yb-ink);
}

.yb-field__hint {
  font-size: 0.78rem;
  color: var(--yb-muted);
}

.yb-field__error {
  font-size: 0.8rem;
  color: var(--yb-danger);
}

.yb-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--yb-line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  background: #fbfcfb;
  color: var(--yb-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.yb-input:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.yb-auth__submit {
  width: 100%;
  margin-top: 6px;
}

.yb-auth__foot {
  text-align: center;
  margin: 18px 0 0;
  color: var(--yb-muted);
  font-size: 0.9rem;
}

.yb-auth__foot a {
  font-weight: 700;
  text-decoration: none;
}

.yb-auth__foot a:hover {
  text-decoration: underline;
}

/* —— Main / Footer —— */
.site-main {
  width: min(1100px, calc(100% - 40px));
  margin: 28px auto 48px;
}

.site-main--narrow {
  width: min(960px, calc(100% - 40px));
}

.site-footer {
  text-align: center;
  color: var(--yb-muted);
  font-size: 0.75rem;
  padding: 8px 20px 36px;
}

.site-footer strong {
  color: var(--yb-ink);
  font-family: var(--yb-display);
  font-weight: 700;
}

/* —— Messages —— */
.yb-flash {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--yb-radius-sm);
  font-size: 0.92rem;
  border: 1px solid var(--yb-line);
  background: var(--yb-surface);
  animation: yb-fade-up 0.45s ease both;
}

.yb-flash--error {
  background: #fef3f2;
  color: var(--yb-danger);
  border-color: #fecdca;
}

.yb-flash--success {
  background: #ecfdf3;
  color: var(--yb-ok);
  border-color: #abeFC6;
}

.yb-flash--info {
  background: var(--yb-accent-soft);
  color: #0f5c56;
  border-color: #99e2d6;
}

/* —— Buttons（通用） —— */
.btn-primary,
button.btn-primary,
a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--yb-accent) !important;
  color: #fff !important;
  border: 0 !important;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}

.btn-primary:hover,
a.btn-primary:hover {
  background: var(--yb-accent-hover) !important;
  transform: translateY(-1px);
}

/* —— Home hero —— */
.yb-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  min-height: min(72vh, 560px);
  padding: 28px 8px 12px;
  overflow: hidden;
}

.yb-hero__copy {
  position: relative;
  z-index: 1;
}

.yb-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--yb-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.yb-hero__title {
  font-family: var(--yb-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 14px;
  color: var(--yb-ink);
}

.yb-hero__lead {
  margin: 0 0 26px;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--yb-muted);
}

.yb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.yb-hero__ghost {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--yb-line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--yb-ink);
  text-decoration: none;
  font-weight: 650;
  transition: background 0.2s ease, transform 0.2s ease;
}

.yb-hero__ghost:hover {
  background: #fff;
  transform: translateY(-1px);
}

.yb-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yb-hero__orb {
  position: absolute;
  width: min(420px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(15, 118, 110, 0.22), transparent 55%);
  filter: blur(2px);
  animation: yb-breathe 7s ease-in-out infinite;
}

.yb-hero__logo {
  position: relative;
  width: min(280px, 72%);
  aspect-ratio: 1;
  border-radius: 28%;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--yb-shadow-hover);
  animation: yb-float 5.5s ease-in-out infinite;
}

.yb-hero__logo video,
.yb-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— Module cards —— */
.yb-section {
  margin-top: 36px;
  padding-bottom: 12px;
}

.yb-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.yb-section__head h2 {
  margin: 0;
  font-family: var(--yb-display);
  font-size: 1.35rem;
  font-weight: 750;
}

.yb-section__head p {
  margin: 0;
  color: var(--yb-muted);
  font-size: 0.9rem;
}

.yb-module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.yb-module-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--yb-surface);
  border: 1px solid var(--yb-line);
  border-radius: var(--yb-radius);
  padding: 22px 22px 20px;
  box-shadow: var(--yb-shadow);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  opacity: 0;
  transform: translateY(18px);
}

.yb-module-card.is-in {
  opacity: 1;
  transform: translateY(0);
}

.yb-module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--yb-shadow-hover);
  border-color: rgba(15, 118, 110, 0.28);
}

.yb-module-card__index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yb-accent);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.yb-module-card__title {
  font-family: var(--yb-display);
  font-size: 1.25rem;
  font-weight: 750;
  margin: 0 0 8px;
}

.yb-module-card__desc {
  margin: 0;
  color: var(--yb-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.yb-module-card__go {
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yb-accent);
}

/* —— Reveal helpers —— */
.yb-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.yb-reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes yb-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes yb-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes yb-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* —— Progress overlay 兼容旧类名 —— */
.ip-bar {
  position: relative;
  height: 8px;
  background: #e5e9e6;
  border-radius: 999px;
  overflow: hidden;
}

.ip-bar > span {
  position: absolute;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--yb-accent);
  border-radius: 999px;
  animation: ipmove 1.15s ease-in-out infinite;
}

@keyframes ipmove {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

.ip-elapsed {
  color: var(--yb-muted);
  font-size: 12px;
  margin-top: 6px;
}

.ip-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244, 245, 243, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.ip-overlay .box {
  background: #fff;
  border: 1px solid var(--yb-line);
  border-radius: 16px;
  padding: 26px 30px;
  width: min(420px, 90vw);
  box-shadow: var(--yb-shadow-hover);
  text-align: center;
}

/* 个人中心继承新主色 */
.pc {
  --pc: var(--yb-accent) !important;
}

/* 业务页通用标题与白卡片：渐进美化，不覆盖已有内联色 */
.site-main > h1,
.site-main h1:first-child {
  font-family: var(--yb-display);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .yb-hero__logo,
  .yb-hero__orb,
  .yb-module-card,
  .yb-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 840px) {
  .yb-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    padding-top: 12px;
  }

  .yb-hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .yb-hero__actions {
    justify-content: center;
  }

  .yb-hero__visual {
    order: -1;
  }

  .yb-hero__logo {
    width: min(200px, 58%);
  }

  .yb-module-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 10px 16px;
  }

  .brand-sub {
    display: none;
  }
}
