/* Tech hero: dark space + blue Earth arc + particle net + iPad orbit */
.hero-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  max-height: 920px;
  overflow: hidden;
  background: #010208;
}

/* Starfield */
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 8% 12%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 18% 28%, rgba(200, 220, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 32% 8%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 45% 22%, rgba(180, 210, 255, 0.65), transparent),
    radial-gradient(1px 1px at 58% 14%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 72% 30%, rgba(200, 230, 255, 0.7), transparent),
    radial-gradient(1px 1px at 85% 10%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 92% 35%, rgba(180, 200, 255, 0.55), transparent),
    radial-gradient(1px 1px at 12% 48%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 28% 55%, rgba(200, 220, 255, 0.45), transparent),
    radial-gradient(1px 1px at 66% 50%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 78% 42%, rgba(220, 235, 255, 0.6), transparent),
    radial-gradient(ellipse at 50% 0%, #0a1228 0%, transparent 55%);
  opacity: 0.95;
}

/*
 * Stylized blue Earth — size/position set by JS so the visible arc
 * ends exactly at the bottom-left and bottom-right of the stage.
 */
.hero-earth {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin-left: -50%;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #041f45;
  box-shadow:
    0 0 40px 8px rgba(50, 160, 255, 0.45),
    0 0 90px 28px rgba(30, 120, 255, 0.35),
    0 0 140px 48px rgba(20, 90, 220, 0.22);
}

/* Blue globe body */
.hero-earth-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 34%, rgba(100, 190, 255, 0.4) 0%, transparent 32%),
    radial-gradient(ellipse 28% 22% at 62% 42%, rgba(25, 90, 170, 0.55) 0%, transparent 70%),
    radial-gradient(circle at 50% 48%, #1c6fb8 0%, #0d4f96 40%, #08356e 68%, #041f42 100%);
  z-index: 0;
}

/* Satellite Earth-at-night (canvas-drawn city lights) */
.hero-earth-night {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: screen;
}

/* Atmosphere glow rim — cooler blue */
.hero-earth::before {
  content: "";
  position: absolute;
  inset: -5%;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 45%,
    transparent 56%,
    rgba(70, 170, 255, 0.55) 68%,
    rgba(90, 190, 255, 0.28) 74%,
    rgba(40, 130, 255, 0.1) 80%,
    transparent 86%
  );
}

.hero-earth::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 28% at 62% 28%, rgba(140, 210, 255, 0.2) 0%, transparent 65%),
    linear-gradient(180deg, rgba(120, 190, 255, 0.08) 0%, transparent 22%, rgba(0, 30, 70, 0.15) 100%);
  box-shadow:
    inset -18px -10px 40px rgba(0, 30, 70, 0.25),
    inset 0 0 60px rgba(60, 150, 255, 0.12);
}

@keyframes earth-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.hero-stage .no1 {
  background-color: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ipad-orbit-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 1500px;
  padding-top: 20px;
  padding-bottom: 18%;
}

.ipad-orbit {
  position: relative;
  width: 500px;
  height: 500px;
  /* Drop ~half an iPad */
  margin-top: 120px;
  transform-style: preserve-3d;
  animation: ipad-spin 36s linear infinite;
}

@keyframes ipad-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.ipad-device {
  position: absolute;
  left: 50%;
  top: 50%;
  /* 2× 逻辑尺寸，配合 JS scale(0.5) 提升 3D 纹理清晰度 */
  width: 392px;
  height: 528px;
  margin-left: -196px;
  margin-top: -264px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.ipad-frame {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background: linear-gradient(160deg, #2a2f38 0%, #12151a 55%, #0a0c10 100%);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 2px #3a404c;
  padding: 16px;
  box-sizing: border-box;
  position: relative;
}

.ipad-screen {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d2840 0%, #061018 100%);
  position: relative;
  transform: translateZ(0);
}

.ipad-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.ipad-screen.is-empty::after {
  content: "INFMAXAI";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(120, 190, 255, 0.55);
  font-size: 26px;
  letter-spacing: 0.12em;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

/* iPhone 17 Pro Max — between iPads on the same orbit */
.iphone-device {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 196px;
  height: 420px;
  margin-left: -98px;
  margin-top: -210px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.iphone-frame {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background: linear-gradient(155deg, #4a4e56 0%, #1c1f24 45%, #0c0e12 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 1.5px #5a606a;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
}

.iphone-island {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 56px;
  height: 16px;
  margin-left: -28px;
  border-radius: 12px;
  background: #050608;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 3;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d2840 0%, #061018 100%);
  position: relative;
  transform: translateZ(0);
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.iphone-screen.is-empty::after {
  content: "CMS";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(120, 190, 255, 0.5);
  font-size: 18px;
  letter-spacing: 0.1em;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.hero-brand-glow {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  pointer-events: none;
  color: rgba(200, 230, 255, 0.92);
  text-shadow: 0 0 24px rgba(64, 160, 255, 0.5);
}

.hero-brand-glow .hero-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}

.hero-brand-glow .hero-sub {
  margin: 8px 0 0;
  font-size: 0.85rem;
  opacity: 0.75;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .ipad-orbit {
    animation: none;
  }
}

@media screen and (max-width: 900px) {
  body{
    min-width: 0;
  }
  /* 显示栏缩矮约五分之一 */
  .hero-stage {
    height: 80vh;
    min-height: 384px;
    max-height: 576px;
    min-width: 0;
  }
  .ipad-orbit {
    width: 320px;
    height: 320px;
    margin-top: 70px;
  }
  .ipad-device {
    width: 292px;
    height: 392px;
    margin-left: -146px;
    margin-top: -196px;
  }
  .ipad-frame {
    border-radius: 28px;
    padding: 12px;
  }
  .iphone-device {
    width: 146px;
    height: 316px;
    margin-left: -73px;
    margin-top: -158px;
  }
  .iphone-frame {
    border-radius: 28px;
    padding: 8px;
  }
  .iphone-island {
    width: 44px;
    height: 12px;
    margin-left: -22px;
    top: 12px;
  }
  .iphone-screen {
    border-radius: 20px;
  }
  .hero-brand-glow {
    bottom: 14%;
  }
}

@media screen and (max-width: 640px) {
  /* 手机也显示 iPhone 夹在 iPad 之间旋转 */
  .ipad-orbit {
    width: 240px;
    height: 240px;
    margin-top: 48px;
  }
  .ipad-device {
    width: 236px;
    height: 316px;
    margin-left: -118px;
    margin-top: -158px;
  }
  .iphone-device {
    display: block;
    width: 116px;
    height: 248px;
    margin-left: -58px;
    margin-top: -124px;
  }
  .iphone-island {
    width: 56px;
    height: 14px;
  }
}
