/* ========================================================================
   Ladybird 星座月相腕表 —— 从 ladybird.html 抽出的表盘组件样式
   作用域：.hero-watch（index.html 首屏右侧）
   ======================================================================== */

/* ================= 容器与尺寸 ================= */
.hero-watch {
  /* 表盘直径：随视口缩放，内部所有元素都按 % / calc 相对它定位 */
  --W: clamp(250px, 32vw, 500px);
  /* 时间子盘在表盘中的实际宽度 */
  --timeBox: calc(var(--W) * .4925);

  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInRight 1.2s ease-out;
}
.hero-watch .watch {
  position: relative;
  width: var(--W);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 38px 52px rgba(0, 0, 0, .66)) drop-shadow(0 0 30px rgba(120, 162, 214, .10));
}

/* ================= 实拍表盘底图 ================= */
.hero-watch .plate {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ================= 珍珠贝母底盘 ================= */
.hero-watch .dial {
  position: absolute;
  inset: 2.7%;
  border-radius: 50%;
  overflow: hidden;               /* 裁掉旋转星座盘的四角 */
  background:
    radial-gradient(100% 100% at 24% 16%, #ffffff 0%, rgba(255, 255, 255, 0) 52%),
    radial-gradient(92% 92% at 78% 74%, #eef2f9 0%, rgba(238, 242, 249, 0) 60%),
    radial-gradient(70% 70% at 52% 42%, #fdfaf4 0%, rgba(253, 250, 244, 0) 62%),
    conic-gradient(from 205deg at 50% 48%,
      #f8f6f1 0deg, #edf0f7 70deg, #fbf9f4 140deg, #eceff6 210deg, #f9f7f2 280deg, #eef1f7 330deg, #f8f6f1 360deg);
  box-shadow: inset 0 0 28px rgba(68, 84, 110, .17), inset 0 0 3px rgba(255, 255, 255, .9);
}
/* 贝母云纹（SVG 湍流噪声） */
.hero-watch .dial::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='5' seed='11'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 62% 62%;
  opacity: .8;
  mix-blend-mode: soft-light;
}

/* ================= 星座盘 ================= */
.hero-watch .zodiac {
  position: absolute;
  z-index: 1;
  left: -5.75%;
  top: -5.75%;
  width: 111.5%;
  height: 111.5%;
  border-radius: 50%;
  overflow: hidden;
  mix-blend-mode: multiply;       /* 去掉素材白底，只留星座环 */
  pointer-events: none;
}
.hero-watch .zodiac img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 50%;
  animation: zodiacSpin 300s linear infinite;
}

/* ================= 月份盘（实拍照片叠加） ================= */
.hero-watch .month-img {
  position: absolute;
  z-index: 11;
  left: -0.995%;
  top: 16.24%;
  width: 61.36%;
  height: auto;
  /* 不透明覆盖底图里的月份盘，避免两张盘的月份文字重影 */
  clip-path: circle(38.2% at 50% 50.3%);
  pointer-events: none;
}

/* ================= 日期环（藏在实拍底图下，只从日期开口露出） ================= */
.hero-watch .day-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: polygon(49.34% 7.40%, 49.49% 8.70%, 48.86% 10.28%, 47.50% 12.03%, 45.50% 13.82%, 42.99% 15.53%, 40.15% 17.05%, 37.17% 18.28%, 34.25% 19.13%, 31.59% 19.54%, 29.38% 19.48%, 27.76% 18.96%, 26.85% 18.02%, 26.70% 16.71%, 27.33% 15.14%, 28.69% 13.39%, 30.69% 11.60%, 33.20% 9.89%, 36.04% 8.36%, 39.02% 7.14%, 41.94% 6.29%, 44.59% 5.88%, 46.80% 5.94%, 48.42% 6.45%);
  pointer-events: none;
}
.hero-watch .day-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 135.5%;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}

/* ================= 指针通用（绕轴心旋转） ================= */
.hero-watch .pivot {
  position: absolute;
  width: 0;
  height: 0;
}
/* 月份针在月份盘之上、时间子盘之下 */
.hero-watch .month-pivot {
  left: 29.69%;
  top: 46.89%;
  z-index: 11;
}
.hero-watch .hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  transform-origin: var(--ox) var(--oy);
  transform:
    translate(calc(var(--ox) * -1), calc(var(--oy) * -1))
    rotate(var(--rot, 0deg));
  will-change: transform;
  pointer-events: none;
}
.hero-watch .hand img {
  display: block;
  width: 100%;
  height: 100%;
}
/* 月份指针：hand-needle.png 下半段的直针 */
.hero-watch .month-hand {
  --ox: 17.74%;
  --oy: 48.42%;
  width: calc(var(--W) * .246);
  height: calc(var(--W) * .0188);
  transition: transform 1.4s cubic-bezier(.2, .8, .2, 1);
}
/* 时间盘：时针（左叶形指针） */
.hero-watch .hour-hand {
  --u: calc(var(--timeBox) * .000364);
  --ox: 82.22%;
  --oy: 69.86%;
  width: calc(822 * var(--u));
  height: calc(485 * var(--u));
  z-index: 3;
}
/* 时间盘：分针（右叶形指针） */
.hero-watch .minute-hand {
  --u: calc(var(--timeBox) * .000427);
  --ox: 17.03%;
  --oy: 69.67%;
  width: calc(848 * var(--u));
  height: calc(485 * var(--u));
  z-index: 3;
}

/* ================= 中心帽 ================= */
.hero-watch .cap {
  position: absolute;
  z-index: 6;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 36% 30%, #ffffff 0 10%, #e4e8ec 26%, #a8b2bd 52%, #f2f5f8 72%, #7c8794 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .35),
    inset 0 0 0 .5px rgba(255, 255, 255, .75),
    inset 0 -1px 2px rgba(0, 0, 0, .18);
}
.hero-watch .month-cap {
  left: 29.69%;
  top: 46.89%;
  z-index: 12;
  width: calc(var(--W) * .033);
  height: calc(var(--W) * .033);
}

/* ================= 时间子盘 ================= */
.hero-watch .time-sub {
  position: absolute;
  z-index: 12;
  left: 24.958%;
  top: 44.656%;
  width: 49.254%;
  height: 47.804%;
  --d: var(--timeBox);
}
.hero-watch .time-sub .time-img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-watch .time-pivot {
  left: 49.5%;
  top: 49.5%;
}
.hero-watch .time-cap {
  left: 49.5%;
  top: 49.5%;
  width: calc(var(--d) * .062);
  height: calc(var(--d) * .062);
  z-index: 6;
}
.hero-watch .sec-hand {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 50%;
  width: calc(var(--d) * .006);
  height: calc(var(--d) * .365);
  border-radius: 999px;
  background: linear-gradient(180deg, #3c4d70, #6d7b92 70%, #9aa6b6);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--rot, 0deg));
  will-change: transform;
}
.hero-watch .sec-hand::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--d) * -.012);
  width: calc(var(--d) * .022);
  height: calc(var(--d) * .034);
  transform: translateX(-50%);
  border-radius: 40% 40% 50% 50%;
  background: linear-gradient(180deg, #f6e3ad, #b8933f);
  box-shadow: 0 0 4px rgba(255, 224, 150, .8);
}
.hero-watch .sec-hand::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: calc(var(--d) * .035);
  height: calc(var(--d) * .035);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(120, 132, 150, .75);
  background: rgba(248, 250, 252, .75);
}

/* ================= 玻璃反光 ================= */
.hero-watch .glare {
  position: absolute;
  z-index: 20;
  inset: 2.7%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.hero-watch .glare::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: linear-gradient(118deg,
    transparent 34%, rgba(255, 255, 255, .34) 46%, rgba(255, 255, 255, .05) 53%, transparent 62%);
  animation: lbSheen 16s ease-in-out infinite;
}
.hero-watch .glare::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 32% at 30% 12%, rgba(255, 255, 255, .5), transparent 72%);
}

/* ================= 动画 ================= */
@keyframes zodiacSpin {
  to { transform: rotate(360deg); }
}
@keyframes lbSheen {
  0%, 100% { transform: translateX(-16%); opacity: .45; }
  50%      { transform: translateX(16%);  opacity: .85; }
}

/* ================= 响应式 ================= */
@media (max-width: 1024px) {
  .hero-watch { --W: min(78vw, 400px); max-width: 100%; }
}
@media (max-width: 768px) {
  .hero-watch { --W: min(86vw, 360px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-watch .zodiac img,
  .hero-watch .glare::before { animation: none; }
}
