/* URSPIRE home page: brand stage + calm entry grid */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding-top: clamp(28px, 6vh, 72px);
  padding-bottom: clamp(20px, 4vh, 48px);
}

.home-hero-title {
  margin: 10px 0 0;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--text-main);
}

.home-hero-title span { color: var(--primary); }

.home-hero-sub {
  margin: 20px 0 0;
  max-width: 30ch;
  color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
}

.home-hero-actions,
.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
}

.home-hero-actions {
  gap: 12px;
  margin-top: 28px;
}

.home-hero-stats {
  gap: clamp(18px, 3vw, 38px);
  margin: 36px 0 0;
}

.home-hero-stats div {
  display: grid;
  gap: 2px;
}

.home-hero-stats dt {
  font-size: 16px;
  font-weight: 850;
  color: var(--text-main);
}

.home-hero-stats dd {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.home-hero-visual {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(14px, 2.4vw, 24px);
  place-items: center;
  padding: clamp(22px, 4vw, 48px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
}

.home-hero-logo {
  width: min(72%, 340px);
  height: min(80%, 440px); /* 确定高度，让下面 img 的 height:100% + contain 生效，不再溢出被裁 */
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home-hero-logo::before,
.home-hero-logo::after {
  content: none;
}

.home-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 20px 34px rgba(20, 51, 62, 0.16));
}

.home-hero-visual .mini-card {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 2;
  width: min(100%, 460px);
  justify-self: center;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  align-items: stretch;
}

.home-feature-card {
  display: grid;
  overflow: hidden;
  min-width: 0;
  grid-column: span 4;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
  isolation: isolate;
}

.home-feature-card {
  min-height: 320px;
}

.home-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.home-feature-cover {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.38), rgba(230,246,244,0.28)),
    rgba(255,255,255,0.22);
  box-shadow: none;
}

.home-feature-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-feature-cover.image-contain img {
  box-sizing: border-box;
  object-fit: contain;
  padding: clamp(10px, 2.2vw, 22px);
}

.home-feature-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 0;
  padding: clamp(16px, 2.2vw, 26px);
}

.home-feature-copy small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-feature-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-main);
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.2;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-feature-copy span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-feature-card.is-lead {
  grid-column: span 6;
  grid-row: span 2;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 420px;
}

.home-feature-card.is-lead .home-feature-cover {
  height: 100%;
  min-height: 100%;
}

.home-feature-card.is-lead .home-feature-copy {
  justify-content: center;
}

.home-feature-card[data-feature-type="music"] .home-feature-cover {
  aspect-ratio: 1 / 1;
}

.home-feature-card[data-feature-type="music"].is-lead {
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
}

.home-feature-card[data-feature-type="music"].is-lead .home-feature-cover {
  align-self: center;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.home-feature-card[data-feature-type="blog"] .home-feature-cover {
  aspect-ratio: 16 / 9;
}

.home-feature-card[data-feature-type="work"] .home-feature-cover,
.home-feature-card[data-feature-type="user_work"] .home-feature-cover {
  aspect-ratio: 4 / 3;
}

.home-featured[data-feature-count="1"] .home-feature-card,
.home-featured[data-feature-count="2"] .home-feature-card {
  grid-column: span 6;
  grid-row: auto;
  min-height: 380px;
}

.home-featured[data-feature-count="1"] .home-feature-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 0.46fr) minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 440px;
}

.home-featured[data-feature-count="3"] .home-feature-card:not(.is-lead) {
  grid-column: span 6;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 202px;
}

.home-featured[data-feature-count="3"] .home-feature-card:not(.is-lead) .home-feature-cover {
  height: 100%;
  min-height: 100%;
}

.home-featured[data-feature-count="4"] .home-feature-card {
  grid-column: span 6;
}

.home-featured[data-feature-count="4"] .home-feature-card.is-lead {
  grid-column: span 6;
  grid-row: span 2;
}

.home-featured[data-feature-count="5"] .home-feature-card,
.home-featured[data-feature-count="6"] .home-feature-card {
  grid-column: span 4;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.home-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.home-entry:hover {
  transform: translateY(-2px);
  border-color: var(--control-border-hover);
  box-shadow: var(--shadow-card);
}

.home-entry strong {
  color: var(--text-main);
  font-size: 18px;
}

.home-entry span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

:root[data-theme="dark"] .home-entry,
:root:not([data-theme="light"]) .home-entry {
  border-color: rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,0.08), transparent 30%),
    linear-gradient(145deg, rgba(15,35,43,0.58), rgba(8,18,28,0.44)),
    rgba(8,18,28,0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.22),
    0 14px 34px rgba(0,0,0,0.18);
}

:root[data-theme="dark"] .home-entry:hover,
:root:not([data-theme="light"]) .home-entry:hover {
  border-color: rgba(103, 232, 249, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.13),
    inset 0 -1px 0 rgba(0,0,0,0.24),
    0 20px 48px rgba(0,0,0,0.26),
    0 0 30px rgba(45,212,191,0.10);
}

.home-join-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(30px, 4rem, 54px);
  border-radius: var(--radius-xl);
}

.home-join-preview h2 {
  margin: 0;
  max-width: 24ch;
  color: var(--text-main);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.14;
  letter-spacing: 0;
}

.home-join-preview p:not(.eyebrow) {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.8;
}

.home-join-preview .join-preview-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.home-join-preview .join-preview-list span {
  padding: 12px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.70), rgba(235, 248, 245, 0.52)),
    rgba(255, 255, 255, 0.64);
  box-shadow: var(--control-shadow);
  color: #12333b;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 880px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    order: -1;
    aspect-ratio: 16 / 10;
  }

  .home-featured-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card,
  .home-feature-card.is-lead,
  .home-featured[data-feature-count] .home-feature-card,
  .home-featured[data-feature-count] .home-feature-card.is-lead,
  .home-featured[data-feature-count="3"] .home-feature-card:not(.is-lead) {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  .home-feature-card.is-lead .home-feature-cover,
  .home-featured[data-feature-count="3"] .home-feature-card:not(.is-lead) .home-feature-cover {
    height: auto;
    min-height: 0;
  }

  .home-feature-card:not([data-feature-type="music"]) .home-feature-cover {
    aspect-ratio: 16 / 9;
  }

  .home-join-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-hero-logo {
    width: min(68%, 260px);
  }

  .home-hero-visual .mini-card {
    width: 100%;
    padding: 14px 16px;
  }

  .home-feature-copy {
    padding: 14px;
  }
}

:root[data-theme="dark"] .home-hero-logo img,
:root:not([data-theme="light"]) .home-hero-logo img {
  mix-blend-mode: screen;
  filter: invert(1) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.28));
}
