.clawdy-3d-link{display:inline-block;margin-top:18px}

#clawdy-3d {
  height: 305svh;
  scroll-margin-top: 0;
}

#clawdy-3d .stage {
  --signal: #a0382c;
  position: sticky;
  isolation: isolate;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 58%, #e9ad9e, #f5e3dd 76%);
}

#clawdy-3d .stage::before,
#clawdy-3d .stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  will-change: opacity;
}
#clawdy-3d .stage::before {
  background: radial-gradient(ellipse at 50% 58%, #eac775, #f7ebcf 76%);
  opacity: var(--amber-mix, 0);
}
#clawdy-3d .stage::after {
  background: radial-gradient(ellipse at 50% 58%, #a4cba7, #e2efe1 76%);
  opacity: var(--green-mix, 0);
}

#clawdy-3d .stage-intro {
  width: min(100%, 500px);
  justify-self: center;
  text-align: center;
  padding: clamp(16px, 4vh, 38px) 16px 0;
  z-index: 1;
}

#clawdy-3d .stage-intro .eyebrow {
  display: block;
  margin: 0 0 8px;
}

#clawdy-3d .stage-intro h2 {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  margin: 0 0 12px;
  font-weight: 480;
  letter-spacing: -.075em;
}

#clawdy-3d em { color: var(--signal); }

#clawdy-3d .stage-bullets {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: clamp(.84rem, 1.6vw, 1.125rem);
  line-height: 1.4;
}

#clawdy-3d .stage-bullets li::before {
  content: "";
  display: inline-block;
  width: .42em;
  height: .42em;
  margin: 0 .65em .16em 0;
  background: var(--signal);
  border-radius: 50%;
}

#clawdy-3d .art { position: relative; min-height: 0; }
#clawdy-3d .art .still,
#clawdy-3d .art canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--art-size, min(100%, 1080px));
  height: auto;
  transform: translate3d(calc(-50% + var(--model-pan, 0px)), -50%, 0);
}
#clawdy-3d .art canvas { opacity: 0; }
#clawdy-3d .art[data-ready] canvas { opacity: 1; }
#clawdy-3d .art[data-ready] .still { visibility: hidden; }

#clawdy-3d .readout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 13px 0 23px;
  border-top: 1px solid #29292325;
}

#clawdy-3d .chapter { margin: 0; }
#clawdy-3d #signal-dot { display: inline-block; margin-right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

#clawdy-3d .selector {
  display: flex;
  gap: 4px;
  border: 1px solid #29292325;
  padding: 4px;
  border-radius: 40px;
  background: #f5f1ebbb;
}

#clawdy-3d .selector button {
  border: 0;
  background: transparent;
  border-radius: 25px;
  padding: 9px 11px;
  font-size: 12px;
  white-space: nowrap;
  min-height: 44px;
}

#clawdy-3d .selector button[aria-pressed=true] { background: #fff; box-shadow: 0 1px 5px #29292318; }
#clawdy-3d .selector i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ba4c3c; margin-right: 6px; }
#clawdy-3d .selector button:nth-child(2) i { background: #b87412; }
#clawdy-3d .selector button:nth-child(3) i { background: #348057; }

#clawdy-3d .scroll-link { justify-self: end; display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 9px; letter-spacing: .14em; line-height: 1.5; }
#clawdy-3d .scroll-link b { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #29292325; border-radius: 50%; font-size: 17px; font-weight: 400; }
#clawdy-3d .progress { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #29292325; }
#clawdy-3d .progress i { display: block; width: 100%; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }

@media (min-width: 900px) and (min-height: 650px) and (min-aspect-ratio: 4/3) and (prefers-reduced-motion: no-preference) {
  #clawdy-3d .stage { grid-template-rows: minmax(0, 1fr) auto; }
  #clawdy-3d .stage-intro {
    position: absolute;
    width: min(34vw, 500px);
    top: 47%;
    right: max(6vw, 32px);
    padding: 0;
    transform: translateY(-50%);
    text-align: left;
    opacity: var(--story-copy, 1);
  }
  #clawdy-3d [data-signal-phase=working] .stage-intro { right: auto; left: max(6vw, 32px); }
  #clawdy-3d .stage-intro h2 { font-size: clamp(46px, 6vw, 96px); }
}

@media (max-width: 700px) {
  #clawdy-3d .readout { grid-template-columns: 1fr auto; gap: 10px; padding: 11px 0 16px; }
  #clawdy-3d .selector { grid-row: 2; grid-column: 1/-1; justify-self: center; }
  #clawdy-3d .selector button { min-height: 44px; }
  #clawdy-3d .scroll-link { gap: 6px; letter-spacing: .06em; }
  #clawdy-3d .stage-intro h2 { font-size: clamp(40px, 11vw, 58px); }
}

@media (prefers-reduced-motion: reduce), (max-height: 500px) {
  #clawdy-3d { height: auto; }
  #clawdy-3d .stage { position: relative; top: auto; min-height: 440px; }
  #clawdy-3d .progress { display: none; }
}
