/* ============================================================
   PlannedReady — Hardware device: scroll-driven exploded view
   ============================================================ */
.device-section { position: relative; }

/* tall track that drives the pinned animation */
.explode-track { position: relative; height: 460vh; }
.explode-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* intro heading (fades out as you scroll in) */
.explode-head {
  position: absolute; top: 11vh; left: 50%; transform: translateX(-50%);
  text-align: center; max-width: 640px; width: 90%; z-index: 5; will-change: opacity, transform;
}
.explode-head .eyebrow { display: block; margin-bottom: 12px; }
.explode-head h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-bottom: 14px; }
.explode-head p { color: var(--text-muted); font-size: 1.05rem; }

.scroll-hint {
  position: absolute; bottom: 5vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--text-faint); letter-spacing: .1em; text-transform: uppercase; z-index: 5;
}
.scroll-hint .mouse { width: 22px; height: 34px; border: 2px solid var(--text-faint); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; background: var(--aqua); border-radius: 2px; transform: translateX(-50%); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0%,100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; transform: translate(-50%, 8px); } }

/* 3D stage */
.explode-stage { position: relative; width: 330px; height: 560px; perspective: 1500px; }
.explode-rotor { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }

/* device glow behind */
.explode-glow { position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(34,211,238,.28), transparent 62%); filter: blur(50px); z-index: -1; }

/* photoreal device (assembled) — cross-fades into the exploded layers */
.device-photo {
  position: absolute; left: 50%; top: 50%; width: 320px; max-width: 86%;
  transform: translate(-50%, -50%); border-radius: 30px; will-change: opacity;
  filter: drop-shadow(0 36px 70px rgba(0,0,0,.65));
}

/* each component layer */
.layer {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 72px;
  margin: -36px 0 0 -150px; border-radius: 18px;
  transform-style: preserve-3d; will-change: transform;
  border: 1px solid rgba(170,195,245,.16);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: linear-gradient(155deg, #18233f, #0c1326);
}
.layer .layer-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }
.layer .layer-ic svg { width: 20px; height: 20px; color: var(--aqua); }
.layer .layer-tt b { font-family: var(--font-display); font-weight: 700; font-size: .9rem; display: block; line-height: 1.15; }
.layer .layer-tt span { display: none; } /* detail lives in the callout */

/* material variants */
.layer.l-glass { background: linear-gradient(155deg, rgba(34,211,238,.22), rgba(99,102,241,.16)); border-color: rgba(127,243,255,.4); }
.layer.l-se { background: linear-gradient(155deg, #0c3140, #0a1b2c); border-color: rgba(34,211,238,.5); box-shadow: 0 0 40px -6px rgba(34,211,238,.45), 0 30px 60px -28px #000; }
.layer.l-se .layer-ic { background: var(--grad-brand); box-shadow: var(--glow-aqua); }
.layer.l-se .layer-ic svg { color: #04121b; }
.layer.l-board { background: linear-gradient(155deg, #0d2a24, #0a1622); }
.layer.l-board .layer-ic svg { color: var(--ready); }
.layer.l-shield { background: linear-gradient(155deg, #1c1f3a, #0c1020);
  background-image: linear-gradient(155deg, #1c1f3a, #0c1020), repeating-linear-gradient(45deg, rgba(150,178,235,.07) 0 6px, transparent 6px 12px); }
.layer.l-battery { background: linear-gradient(155deg, #211f44, #0e1126); }
.layer.l-battery .layer-ic svg { color: var(--violet); }
.layer.l-back { background: linear-gradient(155deg, #2a3350, #141a2c); }

/* front glass shows the brand mark */
.layer.l-glass .screen-mark { margin-left: auto; width: 46px; height: 46px; flex: none; }

/* callouts */
.layer-callout { position: absolute; top: 50%; width: 190px; opacity: 0; will-change: opacity, transform; pointer-events: none; }
.layer-callout.side-right { left: calc(100% + 34px); transform: translateY(-50%) translateX(12px); text-align: left; }
.layer-callout.side-left { right: calc(100% + 34px); transform: translateY(-50%) translateX(-12px); text-align: right; }
.layer-callout .co-num { font-family: var(--font-display); font-size: .72rem; color: var(--aqua); letter-spacing: .12em; }
.layer-callout b { display: block; font-size: .92rem; margin: 2px 0 3px; }
.layer-callout span { font-size: .76rem; color: var(--text-muted); line-height: 1.4; }
.layer-callout .co-line { position: absolute; top: 50%; height: 1px; background: linear-gradient(90deg, var(--aqua), transparent); width: 28px; }
.layer-callout.side-right .co-line { right: 100%; margin-right: 6px; background: linear-gradient(270deg, var(--aqua), transparent); }
.layer-callout.side-left .co-line { left: 100%; margin-left: 6px; }
.layer-callout .co-dot { position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 8px var(--aqua); transform: translateY(-50%); }
.layer-callout.side-right .co-dot { right: 100%; margin-right: 30px; }
.layer-callout.side-left .co-dot { left: 100%; margin-left: 30px; }

/* ---- specs + features block (normal flow after the pinned track) ---- */
.device-detail { position: relative; z-index: 2; }
.device-detail .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.spec-card { padding: 30px; }
.spec-card h3 { font-size: 1.3rem; margin-bottom: 18px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.spec-row:last-child { border-bottom: none; }
.spec-row .k { color: var(--text-muted); }
.spec-row .v { color: var(--text); font-weight: 600; text-align: right; }
.dev-feats { display: flex; flex-direction: column; gap: 14px; }
.dev-feat { display: flex; gap: 15px; padding: 18px; }
.dev-feat .ic { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--grad-brand-soft); border: 1px solid var(--glass-border); }
.dev-feat .ic svg { width: 22px; height: 22px; color: var(--aqua); }
.dev-feat h4 { font-size: 1.02rem; margin-bottom: 4px; }
.dev-feat p { font-size: .9rem; color: var(--text-muted); }

.dev-cta-note { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; padding: 10px 16px; border-radius: 99px;
  background: rgba(244,184,96,.1); border: 1px solid rgba(244,184,96,.3); color: var(--calm); font-size: .85rem; }

/* ---- reduced motion / mobile fallback: static exploded diagram ---- */
@media (max-width: 820px), (prefers-reduced-motion: reduce) {
  .explode-track { height: auto; }
  .explode-sticky { position: static; height: auto; padding: 40px 0 10px; }
  .explode-head { position: static; transform: none; opacity: 1 !important; margin-bottom: 30px; }
  .scroll-hint { display: none; }
  .explode-stage { width: 100%; max-width: 360px; height: auto; perspective: none; }
  .explode-glow { display: none; }
  .device-photo { position: static; transform: none; display: block; margin: 0 auto 22px; width: 220px; opacity: 1 !important; }
  .explode-rotor { position: static; transform: none !important; opacity: 1 !important; display: flex; flex-direction: column; gap: 12px; }
  .layer { position: static; margin: 0; width: 100%; transform: none !important; opacity: 1 !important; }
  .layer-callout { display: none; }
  .device-detail .wrap { grid-template-columns: 1fr; }
}
