/* ============================================================
   Sales · orbiting "Recognized on the ground" proof graphic
   ============================================================ */

/* ---- 3D tornado stage ---- */
.tornado { width: 100%; }
.tornado-stage {
  position: relative;
  height: 220px;
  perspective: 1300px;
  perspective-origin: 50% 50%;
}
.tornado-world {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(8deg);
}

/* each arm orbits around the vertical axis; the two are
   phase-offset by half the loop so they sit opposite each other */
.tornado-arm {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  animation: tornado-spin 16s linear infinite;
}
.arm-letter { animation-delay: -8s; }

/* push the piece out along the (rotating) Z axis → circular orbit */
.tornado-out {
  transform-style: preserve-3d;
  transform: translateZ(120px);
  animation: tornado-bob 8s ease-in-out infinite;
}
.arm-letter .tornado-out { animation-delay: -4s; }

/* counter-rotate so each thumbnail always faces the viewer (billboard) */
.tornado-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotateX(-8deg) rotateY(0deg);
  animation: tornado-billboard 16s linear infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.arm-letter .tornado-card { animation-delay: -8s; }

/* pause the whole system on hover */
.tornado-stage:hover .tornado-arm,
.tornado-stage:hover .tornado-out,
.tornado-stage:hover .tornado-card {
  animation-play-state: paused;
}

@keyframes tornado-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
/* cancels the arm's Y rotation + un-tilts the world so the card stays flat to camera */
@keyframes tornado-billboard {
  from { transform: translate(-50%, -50%) rotateX(-8deg) rotateY(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(-8deg) rotateY(-360deg); }
}
/* subtle vertical rise/fall → tornado feel */
@keyframes tornado-bob {
  0%, 100% { transform: translateZ(120px) translateY(-5px); }
  50%      { transform: translateZ(120px) translateY(5px); }
}

/* framed thumbnail */
.orbit-thumb {
  position: relative;
  display: block;
  padding: 8px;
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--r-md);
  box-shadow: 0 18px 40px -22px rgba(3, 3, 3, 0.45), 0 4px 12px -8px rgba(3, 3, 3, 0.25);
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease;
}
.orbit-thumb:hover,
.orbit-thumb:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 26px 52px -22px rgba(3, 3, 3, 0.5), 0 6px 16px -8px rgba(3, 3, 3, 0.3);
  outline: none;
}
.orbit-thumb:focus-visible { border-color: var(--color-ink); }
.orbit-thumb img {
  display: block;
  border-radius: 2px;
}
.frame-landscape img { width: 190px; height: auto; }
.frame-portrait  img { width: 122px; height: auto; }

.orbit-thumb-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-primary);
  background: rgba(3, 3, 3, 0.72);
  padding: 4px 9px;
  border-radius: var(--r-sm);
}
.orbit-thumb-cap {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--color-graphite);
  white-space: nowrap;
}

/* ---- Lightbox ---- */
.orbit-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 3, 3, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.orbit-modal-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-on-primary);
  border: none;
  cursor: pointer;
  transition: background 160ms ease;
}
.orbit-modal-close:hover { background: rgba(255, 255, 255, 0.2); }
.orbit-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
}
.orbit-modal-img {
  display: block;
  background: var(--color-canvas);
  border-radius: var(--r-sm);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}
.modal-landscape .orbit-modal-img { width: min(1000px, 92vw); height: auto; max-height: 82vh; object-fit: contain; }
.modal-portrait  .orbit-modal-img { width: auto; height: min(84vh, 1000px); max-width: 92vw; object-fit: contain; }

.orbit-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--color-on-primary);
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--r-full);
  transition: background 160ms ease, color 160ms ease;
}
.orbit-modal-link:hover {
  background: var(--color-on-primary);
  color: var(--color-ink);
}

/* ---- Static fallback: reduced motion or small screens ---- */
@media (prefers-reduced-motion: reduce) {
  .tornado-stage {
    height: auto;
    perspective: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
  }
  .tornado-world { position: static; transform: none; width: auto; height: auto; }
  .tornado-arm { position: static; animation: none; display: contents; }
  .tornado-out { transform: none; animation: none; }
  .tornado-card {
    position: static;
    transform: none;
    animation: none;
  }
}
@media (max-width: 760px) {
  .tornado-stage {
    height: auto;
    perspective: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
  }
  .tornado-world { position: static; transform: none; width: auto; height: auto; }
  .tornado-arm { position: static; animation: none; display: contents; }
  .tornado-out { transform: none; animation: none; }
  .tornado-card { position: static; transform: none; animation: none; }
  .frame-landscape img { width: min(66vw, 280px); }
  .frame-portrait  img { width: min(44vw, 180px); }
}
