/* 灰度AI · 多风格首页。仅覆盖 #/home，工作台继续使用原有主题。 */
:root {
  --gray-ai-ink: #262b33;
  --gray-ai-ink-soft: #3e444d;
  --gray-ai-paper: #f3f1ed;
  --gray-ai-silver: #b9bab9;
  --gray-ai-orange: #ff5a1f;
  --gray-ai-orange-soft: #ff7a3d;
}

body[data-view="home"] {
  --home-bg: #080a0e;
  --home-panel: rgba(24, 28, 35, 0.78);
  --home-text: var(--gray-ai-paper);
  --home-muted: #a7a8aa;
  --home-line: rgba(255, 255, 255, 0.12);
  --home-accent: var(--gray-ai-orange);
  --home-accent-2: var(--gray-ai-orange-soft);
  overflow-x: hidden;
  color: var(--home-text);
  background: var(--home-bg);
}

body[data-view="home"] .ambient-bg,
body[data-view="home"] .side-nav {
  display: none;
}

body[data-view="home"] .platform-shell {
  display: block;
  min-height: 100svh;
  background: var(--home-bg);
}

body[data-view="home"] .platform-main {
  width: 100%;
  min-height: 100svh;
}

#homeView.home-view {
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  color: var(--home-text);
  background: var(--home-bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.home-stage,
.home-stage * {
  box-sizing: border-box;
}

.home-stage button {
  font: inherit;
}

.home-nav {
  position: relative;
  z-index: 20;
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 0 clamp(28px, 4.6vw, 92px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(90deg, rgba(8, 10, 14, 0.99), rgba(18, 21, 27, 0.97) 48%, rgba(8, 10, 14, 0.99));
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.22);
}

.home-nav::after {
  content: "";
  position: absolute;
  left: clamp(28px, 4.6vw, 92px);
  bottom: -1px;
  width: 76px;
  height: 2px;
  background: linear-gradient(90deg, var(--gray-ai-paper) 0 22%, var(--gray-ai-silver) 22% 44%, var(--gray-ai-ink-soft) 44% 76%, var(--gray-ai-orange) 76% 100%);
}

.home-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--home-text);
  background: transparent;
  cursor: pointer;
}

.home-brand-mark {
  width: 46px;
  height: 46px;
}

.brand-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 5px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  color: var(--gray-ai-ink);
  background: var(--gray-ai-paper);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(38, 43, 51, 0.06);
}

.brand-glyph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-brand > span:last-child {
  display: grid;
  gap: 2px;
  text-align: left;
}

.home-brand strong {
  color: var(--gray-ai-paper);
  font-size: 20px;
  font-weight: 820;
  letter-spacing: 0.015em;
}

.home-brand small {
  color: #85878d;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.home-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.2vw, 54px);
}

.home-nav-links button {
  position: relative;
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  color: #9b9da5;
  background: transparent;
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease;
}

.home-nav-links button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--home-accent);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.home-nav-links button:hover,
.home-nav-links button.active {
  color: #fff;
}

.home-nav-links button.active::after {
  width: 18px;
}

.home-login-btn {
  justify-self: end;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 21px;
  border: 1px solid rgba(255, 167, 77, 0.22);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff8a00, var(--home-accent));
  box-shadow: 0 10px 30px rgba(255, 105, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.home-login-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.home-login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 36px rgba(255, 105, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 84px);
  overflow: hidden;
  background: #070a10;
}

.home-hero-art,
.home-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero-art {
  z-index: -3;
  background: #0a0e16 url("./assets/multiverse-hero-v1.png") center center / cover no-repeat;
  transform: scale(1.025);
  animation: home-scene-breathe 18s ease-in-out infinite alternate;
}

.home-hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 5, 9, 0.98) 0%, rgba(3, 5, 9, 0.9) 24%, rgba(4, 7, 13, 0.54) 43%, rgba(4, 7, 13, 0.08) 67%, rgba(4, 7, 13, 0.22) 100%),
    linear-gradient(0deg, rgba(4, 6, 10, 0.99) 0%, rgba(4, 6, 10, 0.58) 21%, rgba(4, 6, 10, 0.04) 52%, rgba(4, 6, 10, 0.12) 100%),
    radial-gradient(circle at 72% 40%, rgba(255, 129, 24, 0.08), transparent 31%);
}

.home-hero-inner {
  width: min(1760px, 100%);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.3vh, 30px);
  margin: 0 auto;
  padding: clamp(42px, 7vh, 94px) clamp(28px, 5.6vw, 112px) 24px;
}

.home-hero-copy {
  flex: 1 1 auto;
  max-width: 650px;
  align-content: center;
  padding: 0 0 clamp(12px, 2vh, 28px);
  animation: home-copy-in 620ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.home-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  color: #a9abb2;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.2em;
}

.home-kicker i {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gray-ai-paper) 0 23%, var(--gray-ai-silver) 23% 46%, var(--gray-ai-ink-soft) 46% 74%, var(--gray-ai-orange) 74% 100%);
}

.home-hero-copy h1 {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(48px, 5vw, 82px);
  font-weight: 820;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.4);
}

.home-hero-copy h1 span {
  position: relative;
  display: inline-block;
  color: var(--gray-ai-orange);
  background: linear-gradient(100deg, var(--gray-ai-orange) 8%, var(--gray-ai-orange-soft) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero-copy h1 span::after {
  content: "";
  position: absolute;
  left: 1%;
  right: -2%;
  bottom: -9px;
  height: 4px;
  background: linear-gradient(90deg, var(--gray-ai-orange) 0 74%, transparent 74% 78%, var(--gray-ai-silver) 78% 88%, var(--gray-ai-ink-soft) 88% 100%);
}

.home-lead {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--home-muted);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.home-primary-cta {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 1px solid color-mix(in srgb, var(--gray-ai-orange) 44%, transparent);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--gray-ai-orange-soft) 0%, var(--gray-ai-orange) 64%, #e94412 100%);
  box-shadow: 0 14px 34px rgba(255, 90, 31, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 16px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.home-primary-cta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.home-primary-cta i {
  margin-left: 5px;
  font-style: normal;
  font-size: 18px;
  transition: transform 180ms ease;
}

.home-primary-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 46px rgba(255, 105, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.home-primary-cta:hover i {
  transform: translateX(3px);
}

.home-action-note {
  color: #767983;
  font-size: 12px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  animation: home-cards-in 680ms 100ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.genre-card {
  --genre-image: url("./assets/multiverse-hero-v1.png");
  --genre-position: 50% 46%;
  position: relative;
  min-width: 0;
  min-height: clamp(150px, 16vh, 184px);
  display: flex;
  align-items: flex-end;
  gap: 12px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #fff;
  background: #11151e;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.genre-card::before,
.genre-card::after {
  content: "";
  position: absolute;
  inset: 0;
}

.genre-card::before {
  background-image: var(--genre-image);
  background-position: var(--genre-position);
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.01);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 220ms ease;
}

.genre-card::after {
  height: auto;
  border-radius: 0;
  background: linear-gradient(
    to top,
    rgba(6, 8, 13, 0.94) 0%,
    rgba(6, 8, 13, 0.56) 34%,
    rgba(6, 8, 13, 0.18) 56%,
    rgba(6, 8, 13, 0) 82%
  );
}

.genre-card:hover {
  z-index: 2;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--gray-ai-orange) 72%, transparent);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 90, 31, 0.08);
}

.genre-card:hover::before {
  transform: scale(1.06);
  filter: saturate(1.08) brightness(1.04);
}

.genre-card-index {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 16px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.genre-card-index::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  background: var(--gray-ai-orange);
}

.genre-card-icon,
.genre-card-copy,
.genre-card-arrow {
  position: relative;
  z-index: 2;
}

.genre-card-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 168, 74, 0.28);
  border-radius: 4px;
  color: #ffd0b9;
  background: color-mix(in srgb, var(--gray-ai-orange) 23%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 780;
}

.genre-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.genre-card-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7);
}

.genre-card-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-card-arrow {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 9, 14, 0.44);
  font-size: 15px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.genre-card:hover .genre-card-arrow {
  color: #fff;
  background: var(--home-accent);
  transform: rotate(8deg);
}

.home-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 6, 10, 0.44);
  backdrop-filter: blur(10px);
}

.home-capability {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 12px 20px;
}

.home-capability + .home-capability::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24%;
  bottom: 24%;
  width: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.home-capability svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: var(--gray-ai-orange);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px rgba(255, 114, 0, 0.26));
}

.home-capability span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-capability strong {
  overflow: hidden;
  color: #e9e9e7;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-capability small {
  overflow: hidden;
  color: #737680;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-footer {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(28px, 5.6vw, 112px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #575a63;
  background:
    linear-gradient(90deg, rgba(243, 241, 237, 0.025), transparent 24%),
    #07090d;
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* 登录弹层、工作台与侧栏复用灰度AI标志。 */
.side-brand-mark {
  width: 40px;
  height: 40px;
  padding: 5px;
  border-radius: 5px;
  background: var(--gray-ai-paper);
  box-shadow: 0 8px 20px rgba(38, 43, 51, 0.18);
}

.side-brand strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark.brand-glyph {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 5px;
  background: var(--gray-ai-paper);
  box-shadow: 0 8px 20px rgba(38, 43, 51, 0.16);
}

.login-brand {
  background:
    linear-gradient(105deg, rgba(4, 7, 13, 0.97), rgba(4, 7, 13, 0.72) 58%, rgba(4, 7, 13, 0.3)),
    url("./assets/multiverse-hero-v1.png") 63% center / cover no-repeat !important;
}

.login-brand h2 span {
  color: #ff7b0a;
  -webkit-text-fill-color: currentColor;
}

.login-feature-row > div {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 11, 17, 0.52);
}

.login-view [hidden] {
  display: none !important;
}

body[data-view="home"] .login-view .login-tabs button.active {
  color: var(--home-accent);
  border-bottom-color: var(--home-accent);
}

body[data-view="home"] .login-view .login-field:focus-within {
  border-color: rgba(255, 128, 16, 0.86);
  box-shadow: 0 0 0 3px rgba(255, 114, 0, 0.1);
}

body[data-view="home"] .login-view .login-field.code button {
  color: #df6300;
  background: rgba(255, 114, 0, 0.11);
}

body[data-view="home"] .login-view .login-submit {
  color: #fff;
  background: linear-gradient(135deg, #ff8a00, var(--home-accent));
  box-shadow: 0 14px 34px rgba(255, 105, 0, 0.22);
}

body[data-view="home"] .login-view .login-agree input {
  accent-color: var(--home-accent);
}

body[data-view="home"] .login-view .login-agree a {
  color: #e86700;
}

.home-brand:focus-visible,
.home-nav-links button:focus-visible,
.home-login-btn:focus-visible,
.home-primary-cta:focus-visible,
.genre-card:focus-visible {
  outline: 3px solid rgba(255, 145, 39, 0.72);
  outline-offset: 3px;
}

@keyframes home-copy-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes home-cards-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes home-scene-breathe {
  from { transform: scale(1.025); }
  to { transform: scale(1.055); }
}

@media (max-width: 1180px) {
  .home-nav {
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    gap: 18px;
    padding-inline: 28px;
  }

  .home-nav-links {
    gap: 22px;
  }

  .home-hero-inner {
    padding-inline: 34px;
  }

  .genre-card {
    padding: 16px;
  }

  .genre-card-icon {
    display: none;
  }
}

@media (max-width: 900px) {
  .home-nav {
    min-height: 118px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 68px 42px;
    padding: 0 20px 8px;
  }

  .home-nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    gap: 30px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-nav-links::-webkit-scrollbar {
    display: none;
  }

  .home-hero {
    min-height: calc(100svh - 118px);
  }

  .home-hero-inner {
    padding-top: 48px;
  }

  .genre-grid,
  .home-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-capability:nth-child(3)::before {
    display: none;
  }

  .home-capability:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }
}

@media (max-width: 780px) {
  body[data-view="home"] .platform-shell {
    display: block;
  }

  #homeView.home-view {
    padding: 0;
  }

  .home-hero-art {
    background-position: 60% center;
    opacity: 0.82;
  }

  .home-hero-shade {
    background:
      linear-gradient(90deg, rgba(3, 5, 9, 0.98), rgba(3, 5, 9, 0.65) 74%, rgba(3, 5, 9, 0.35)),
      linear-gradient(0deg, rgba(4, 6, 10, 0.99) 0%, rgba(4, 6, 10, 0.52) 32%, rgba(4, 6, 10, 0.18));
  }

  .home-hero-inner {
    gap: 18px;
    padding: 42px 18px 20px;
  }

  .home-hero-copy {
    align-content: start;
  }

  .home-hero-copy h1 {
    font-size: clamp(44px, 12vw, 62px);
  }

  .home-lead {
    max-width: 560px;
    margin-top: 26px;
    font-size: 15px;
    line-height: 1.75;
  }

  .genre-card {
    min-height: 142px;
  }
}

@media (max-width: 520px) {
  .home-nav {
    gap: 12px;
    padding-inline: 14px;
  }

  .home-brand {
    gap: 9px;
  }

  .home-brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 4px;
  }

  .home-brand strong {
    font-size: 16px;
  }

  .home-brand small {
    display: none;
  }

  .home-login-btn {
    min-height: 39px;
    padding: 0 14px;
    font-size: 12px;
  }

  .home-login-btn svg {
    display: none;
  }

  .home-nav-links {
    gap: 25px;
  }

  .home-nav-links button {
    font-size: 13px;
  }

  .home-hero-inner {
    padding-top: 36px;
  }

  .home-kicker {
    margin-bottom: 16px;
    font-size: 9px;
  }

  .home-hero-copy h1 {
    font-size: clamp(42px, 13vw, 56px);
  }

  .home-hero-actions {
    margin-top: 24px;
  }

  .home-primary-cta {
    min-height: 50px;
    padding-inline: 20px;
    font-size: 14px;
  }

  .home-action-note {
    display: none;
  }

  .genre-grid {
    gap: 10px;
  }

  .genre-card {
    min-height: 134px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: end;
    padding: 13px;
    border-radius: 15px;
  }

  .genre-card-copy strong {
    font-size: 14px;
  }

  .genre-card-copy small,
  .genre-card-index {
    font-size: 9px;
  }

  .genre-card-arrow {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .home-capability {
    min-height: 68px;
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 10px;
  }

  .home-capability svg {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .home-capability strong {
    font-size: 11px;
  }

  .home-capability small {
    font-size: 9px;
  }

  .home-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 9px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-art,
  .home-hero-copy,
  .genre-grid {
    animation: none;
  }

  .home-login-btn,
  .home-primary-cta,
  .genre-card,
  .genre-card::before,
  .genre-card-arrow {
    transition: none;
  }
}
