/* =========================================================
   Pellosy 首页 v3（重制版）专属样式
   与 style3.css 共用设计变量，仅作用于本页面新增组件。
   ========================================================= */

/* ---------- 滚动进度条 ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 3px;
  background: var(--acid);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------- 极光背景 ---------- */

.hero-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  width: 38vw;
  height: 38vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  opacity: .5;
  mix-blend-mode: multiply;
}

.aurora-blob-one {
  top: -9%;
  right: -5%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(217, 255, 56, .85),
    transparent 70%
  );
  animation: auroraDrift 16s ease-in-out infinite alternate;
}

.aurora-blob-two {
  bottom: -13%;
  left: -9%;
  background: radial-gradient(
    circle at 60% 40%,
    rgba(122, 185, 255, .75),
    transparent 70%
  );
  animation: auroraDrift 21s ease-in-out infinite alternate-reverse;
}

@keyframes auroraDrift {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(5vw, 4vh) scale(1.12);
  }
}

.manifesto-aurora {
  right: -8%;
  bottom: -22%;
  width: 52vw;
  height: 52vw;
  max-width: 640px;
  max-height: 640px;
  opacity: .16;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at 40% 45%,
    rgba(217, 255, 56, .9),
    transparent 68%
  );
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

/* ---------- 流光文字 ---------- */

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .text-shimmer {
    color: transparent;
    background: linear-gradient(
      100deg,
      var(--orange) 25%,
      var(--acid) 42%,
      var(--orange) 60%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShimmer 7s linear infinite;
  }
}

@keyframes textShimmer {
  to {
    background-position: -220% 0;
  }
}

/* ---------- 视觉画框（交由 Motion 驱动） ---------- */

.hero-visual-frame {
  animation: none;
  transform: none;
}

.tilt-card,
[data-tilt] {
  will-change: transform;
}

.hero-floating-card.floating-card-one {
  right: 0;
}

.hero-floating-card.floating-card-two {
  left: 0;
}

/* ---------- Spotlight 卡片 ---------- */

.spotlight-card {
  position: relative;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    480px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(255, 104, 72, .16),
    transparent 65%
  );
  transition: opacity .35s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Bento 服务网格 ---------- */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 70px;
}

.bento-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    transform .3s var(--ease),
    border-color .3s ease;
}

.bento-cell:hover {
  border-color: var(--ink);
  transform: translateY(-4px);
}

.bento-cell-wide {
  grid-column: span 2;
}

.bento-cell-accent {
  color: var(--black);
  background: var(--acid);
  border-color: var(--acid);
}

.bento-number {
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .12em;
}

.bento-cell-accent .bento-number {
  color: rgba(16, 17, 18, .55);
}

.bento-cell h3 {
  margin-top: 24px;
  color: var(--ink);
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.06em;
}

.bento-cell p {
  margin-top: 9px;
  color: #4a4b47;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bento-cell-accent p {
  color: rgba(16, 17, 18, .62);
}

.bento-arrow {
  position: absolute;
  right: 22px;
  bottom: 20px;
  font-size: 18px;
  transition: transform .35s var(--ease);
}

.bento-cell:hover .bento-arrow {
  transform: translate(4px, -4px);
}

/* ---------- 灵感音乐 App 宣传 ---------- */

.music-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
  gap: 6vw;
  align-items: center;
  margin-top: 70px;
}

.music-copy h2 {
  font-size: clamp(44px, 6vw, 92px);
  letter-spacing: -.09em;
  line-height: .96;
}

.music-copy h2 span {
  color: var(--orange);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.music-lead {
  max-width: 430px;
  margin-top: 32px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.music-features {
  max-width: 520px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.music-features li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -.02em;
}

.music-features li span {
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .1em;
}

.music-features li small {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0;
}

.music-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.music-visual {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.phone-frame {
  position: relative;
  z-index: 2;
  width: min(340px, 92%);
  padding: 12px;
  background: var(--ink);
  border-radius: 28px;
  box-shadow: 24px 28px 0 rgba(23, 23, 23, .12);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 14px;
  color: var(--white);
  font-size: 9px;
  letter-spacing: .14em;
}

.phone-signal {
  color: var(--acid);
}

.album-art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange), var(--blue));
}

.album-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 7px,
    rgba(255, 255, 255, .6) 8px,
    transparent 9px
  );
}

.album-glyph {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .92);
  font-family: var(--serif);
  font-size: 110px;
  font-style: italic;
  line-height: 1;
}

.album-label {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  color: var(--white);
  font-size: 11px;
  letter-spacing: .16em;
  line-height: 1.5;
}

.equalizer {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.equalizer i {
  width: 4px;
  height: 24%;
  display: block;
  background: var(--acid);
  animation: equalizerBar 1.1s ease-in-out infinite;
}

.phone-frame:not(.is-playing) .equalizer i {
  animation-play-state: paused;
}

.equalizer i:nth-child(2n) {
  background: var(--orange);
  animation-delay: .18s;
}

.equalizer i:nth-child(3n) {
  background: var(--white);
  animation-delay: .34s;
}

@keyframes equalizerBar {
  0%,
  100% {
    height: 18%;
  }

  50% {
    height: 100%;
  }
}

.player-info {
  padding: 16px 10px 0;
  color: var(--white);
}

.player-info strong {
  display: block;
  font-size: 16px;
  letter-spacing: -.03em;
}

.player-info span {
  display: block;
  margin-top: 4px;
  color: rgba(248, 247, 241, .55);
  font-size: 10px;
}

.player-progress {
  height: 3px;
  margin: 16px 10px 0;
  overflow: hidden;
  background: rgba(248, 247, 241, .18);
}

.player-progress span {
  display: block;
  height: 100%;
  background: var(--acid);
}

.player-times {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px 0;
  color: rgba(248, 247, 241, .45);
  font-size: 9px;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 16px 0 12px;
}

.player-controls button {
  color: var(--white);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 17px;
  transition: color .2s ease, transform .2s var(--ease);
}

.player-controls button:hover {
  color: var(--acid);
  transform: scale(1.15);
}

.player-controls .pc-play {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--black);
  background: var(--acid);
  border-radius: 50%;
  font-size: 15px;
}

.player-controls .pc-play:hover {
  color: var(--white);
  background: var(--orange);
}

.phone-bottom {
  padding: 0 10px 8px;
  color: rgba(248, 247, 241, .4);
  font-size: 8px;
  letter-spacing: .12em;
}

.music-float-card {
  width: 118px;
}

.music-float-card.card-a {
  top: 7%;
  left: -5%;
  animation: floatingCardOne 6s ease-in-out infinite;
}

.music-float-card.card-b {
  right: 6px;
  bottom: 8%;
  background: var(--blue);
  animation: musicCardFloatB 7s ease-in-out infinite;
}

@keyframes musicCardFloatB {
  0%,
  100% {
    transform: rotate(-8deg) translate(0, 0);
  }

  50% {
    transform: rotate(-11deg) translate(0, -10px);
  }
}

.music-marquee {
  margin-top: 110px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.music-marquee span {
  display: inline-block;
  animation: marquee 12s linear infinite;
}

/* ---------- 公告区 ---------- */

.notice-section {
  background: var(--paper-light);
}

.notice-mark-all {
  padding: 0 0 8px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .06em;
  transition: color .25s ease, gap .35s var(--ease);
}

.notice-mark-all:hover {
  color: var(--ink);
}

.notice-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 70px;
}

.notice-heading h2 {
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: -.09em;
  line-height: .95;
}

.notice-heading h2 em {
  color: var(--orange);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.notice-heading p {
  max-width: 320px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.notice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 68px);
  margin-top: 42px;
}

.notice-stats strong {
  display: block;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -.06em;
  line-height: 1;
}

.notice-stats strong::after {
  content: "";
  width: 100%;
  height: 3px;
  display: block;
  margin-top: 9px;
  background: var(--acid);
}

.notice-stats span {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 48px;
}

.notice-card {
  position: relative;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition:
    border-color .3s ease,
    transform .3s var(--ease),
    opacity .3s ease;
}

.notice-card:hover {
  border-color: var(--ink);
  transform: translateX(6px);
}

.notice-card.is-pinned {
  border-left-color: var(--orange);
}

.notice-card.is-read {
  opacity: .62;
}

.notice-card.is-read:hover {
  opacity: 1;
}

.notice-head {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.notice-tag {
  color: var(--orange);
}

.notice-unread {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--ink);
}

.notice-unread::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 104, 72, .16);
}

.notice-card.is-read .notice-unread {
  display: none;
}

.notice-card h3 {
  margin-top: 13px;
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: -.04em;
}

.notice-body {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.notice-body[hidden] {
  display: none;
}

.notice-toggle {
  margin-top: 15px;
  padding: 0 0 3px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .08em;
  transition: color .25s ease, border-color .25s ease;
}

.notice-toggle:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.notice-toggle b {
  font-weight: 400;
}

.notice-source {
  margin-top: 32px;
  color: rgba(23, 23, 23, .42);
  font-size: 9px;
  letter-spacing: .06em;
}

/* ---------- 性能：视口外渲染隔离 ---------- */

.lazy-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .music-layout {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .music-visual {
    min-height: 0;
    padding: 30px 0 10px;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-cell-wide {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .music-visual {
    padding-top: 10px;
  }

  .phone-frame {
    width: 100%;
    padding: 9px;
    border-radius: 22px;
    box-shadow: 12px 14px 0 rgba(23, 23, 23, .12);
  }

  .music-float-card {
    display: none;
  }

  .music-marquee {
    margin-top: 70px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-cell-wide {
    grid-column: span 1;
  }

  .notice-card {
    padding: 18px;
  }
}

/* ---------- 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  .aurora-blob,
  .manifesto-aurora,
  .text-shimmer,
  .equalizer i,
  .music-marquee span {
    animation: none;
  }

  .tilt-card,
  [data-tilt] {
    will-change: auto;
  }
}

/* ---------- 在线 IDE 入口 ---------- */

.ide-section {
  background: var(--paper-light);
}

.ide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .92fr);
  gap: 6vw;
  align-items: center;
  margin-top: 70px;
}

.ide-copy h2 {
  font-size: clamp(38px, 5.4vw, 82px);
  letter-spacing: -.09em;
  line-height: .98;
}

.ide-copy h2 span {
  color: var(--orange);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.ide-lead {
  max-width: 470px;
  margin-top: 32px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.ide-features {
  max-width: 520px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  list-style: none;
}

.ide-features li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -.02em;
}

.ide-features li span {
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .1em;
}

.ide-features li small {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0;
  text-align: right;
}

.ide-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.ide-visual {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.ide-frame {
  position: relative;
  z-index: 2;
  width: min(530px, 100%);
  padding-bottom: 14px;
  overflow: hidden;
  color: #e6e9ef;
  background: #0b0d11;
  border-radius: 20px;
  box-shadow: 24px 28px 0 rgba(23, 23, 23, .12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ide-frame-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #12151a;
  border-bottom: 1px solid #242a32;
  font-size: 11px;
  letter-spacing: .06em;
}

.ide-frame-dots {
  display: flex;
  gap: 6px;
}

.ide-frame-dots i {
  width: 9px;
  height: 9px;
  background: #313842;
  border-radius: 50%;
}

.ide-frame-dots i:first-child {
  background: #ff5f56;
}

.ide-frame-dots i:nth-child(2) {
  background: #ffbd2e;
}

.ide-frame-dots i:last-child {
  background: #27c93f;
}

.ide-frame-title {
  color: #8b93a1;
}

.ide-frame-mode {
  margin-left: auto;
  padding: 2px 9px;
  color: #0b0d11;
  background: var(--acid);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .04em;
}

.ide-frame-code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  color: #cfd6e0;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre;
}

.ide-frame-out {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 16px 0;
  padding: 10px 14px;
  color: #8bd39b;
  background: rgba(139, 211, 155, .08);
  border: 1px solid rgba(139, 211, 155, .28);
  border-radius: 10px;
  font-size: 12px;
}

.ide-frame-play {
  color: var(--acid);
}

.ide-frame-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 2px;
  color: #5d6572;
  font-size: 10.5px;
  letter-spacing: .08em;
}

@media (max-width: 980px) {
  .ide-layout {
    grid-template-columns: 1fr;
    gap: 44px;
    margin-top: 46px;
  }

  .ide-visual {
    min-height: 380px;
  }

  .ide-frame {
    box-shadow: 14px 16px 0 rgba(23, 23, 23, .12);
  }
}

@media (max-width: 600px) {
  .ide-frame-code {
    padding: 14px;
    font-size: 11px;
  }

  .ide-frame-mode {
    display: none;
  }

  .ide-features li small {
    display: none;
  }
}